PlugWiki

Pinia Skill by Anthony Fu: Vue State Management With Claude

pinia (by Anthony Fu) gives Claude current Pinia guidance for Vue: defining stores, plugins, composing stores, testing, SSR, Nuxt and hot reload.

Installs
20K
on skills.sh
Stars
6K
on GitHub
Files
10
besides SKILL.md
Updated
Oct 2026
last repo commit

The skill loads when you define stores, work with state, getters and actions, or apply store patterns in a Vue app. SKILL.md is an index of 9 reference pages, plus six recommendations: prefer Setup Stores, use storeToRefs() when destructuring, destructure actions directly, call stores inside functions, add HMR support, and use @pinia/testing for component tests.

The references cover stores, plugins, composables in stores, composing stores, testing, using stores outside components, SSR, Nuxt and HMR. The Nuxt page notes that since Pinia v4, @vue/devtools-api is a required peer dependency.

The skill is generated from the Pinia docs and fine-tuned by Anthony Fu, and SKILL.md says it is based on Pinia v4.0.3, generated on 2026-09-25. It is a proof-of-concept collection, so check the version against the one in your project.

Good for

  • Vue and Nuxt developers who manage app state with Pinia
  • Developers moving to Setup Stores or writing store tests
  • Teams building server-rendered Vue apps that hit SSR hydration issues

Install pinia

Claude Code

  1. 1

    Copy this prompt.

    Install the pinia skill in Claude Code. Run this command:
    
    npx skills add https://github.com/antfu/skills --skill pinia
    
    Then check that it loaded and tell me how to use it.
  2. 2

    Paste it into Claude Code. It shows the change and asks before running it.

Requires Node.js.

From its listing on skills.sh. Source.

What's in the skill

When it loads

Pinia official Vue state management library, type-safe and extensible. Use when defining stores, working with state/getters/actions, or implementing store patterns in Vue apps.

Sections in SKILL.md

  1. Core References
  2. Features
  3. Extensibility
  4. Composability
  5. Best Practices
  6. Advanced
  7. Key Recommendations

Key facts

Installs on skills.sh
20,024 as of 2026-11-02
GitHub stars (whole repo)
6,032 as of 2026-11-02
License
MIT
Last repo commit
2026-10-30
Files in the skill folder
11 files including SKILL.md

What it includes

  • Define stores, state, getters, actions, storeToRefs

    Option Stores and Setup Stores (recommended), $patch, resetting and subscribing to state.

    core-stores

  • Extend stores with custom properties and behavior

    How to write Pinia plugins.

    features-plugins

  • Use Vue composables such as VueUse in stores

    Patterns for composables inside stores.

    features-composables

  • Store-to-store communication

    Includes avoiding circular dependencies.

    features-composing-stores

  • Unit tests with @pinia/testing

    Mocking, stubbing actions, mocking getters and setting initial state.

    best-practices-testing

  • Use stores in navigation guards, plugins and middleware

    When a store is called outside a component setup.

    best-practices-outside-component

  • Server rendering, state hydration and the Nuxt module

    Covers the @pinia/nuxt module, auto-imports and fetching data in pages.

    advanced-ssr and advanced-nuxt

  • Hot module replacement for stores

    Adds HMR support to each store during development.

    advanced-hmr

  • Source commit and generation date

    Records the Pinia source commit and the 2026-09-25 generation date.

    GENERATION.md

From the official docs

Questions

What does the pinia skill do?

It gives Claude Pinia v4 guidance for Vue: how to define stores, use state, getters and actions, compose stores, write tests, and handle SSR, Nuxt and hot reload.

How do I install it in Claude Code or Codex?

Use the install box above. The antfu/skills README documents the skills CLI for this repo and a separate @antfu/skills pack that your package manager keeps in sync.

Does it need an API key?

No. The folder is 11 markdown files, and none needs a key or a service.

Is it safe to install?

It is documentation only, with no scripts. Following it can make Claude add packages such as @pinia/testing or @pinia/nuxt to your project, so review dependency changes.

Which Pinia version does it cover?

SKILL.md says it is based on Pinia v4.0.3, generated on 2026-09-25. If your project uses an older Pinia, check the advice against your version.

Does it cover Nuxt?

Yes, with an advanced-nuxt page about installation, auto-imports, fetching data in pages and using stores outside components. It mentions npm users may need an ERESOLVE workaround.

Information

updated Nov 2, 2026

Repository
antfu/skills
Folder
skills/pinia

antfu/skillsskills.sh

Sources

Docs, issue trackers and discussions this page is built from.

Show all 4
  1. pinia SKILL.md · github.com
  2. antfu/skills README · github.com
  3. pinia GENERATION.md · github.com
  4. pinia advanced-nuxt.md · github.com

Updated Nov 2, 2026.