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
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
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
- Core References
- Features
- Extensibility
- Composability
- Best Practices
- Advanced
- Key Recommendations
Key facts
- Repo
- antfu/skills
- 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
- skills.sh audits
- Gen Agent Trust Hub pass, Socket pass, Snyk pass
What it includes
Define stores, state, getters, actions, storeToRefs
Option Stores and Setup Stores (recommended), $patch, resetting and subscribing to state.
core-storesExtend stores with custom properties and behavior
How to write Pinia plugins.
features-pluginsUse Vue composables such as VueUse in stores
Patterns for composables inside stores.
features-composablesStore-to-store communication
Includes avoiding circular dependencies.
features-composing-storesUnit tests with @pinia/testing
Mocking, stubbing actions, mocking getters and setting initial state.
best-practices-testingUse stores in navigation guards, plugins and middleware
When a store is called outside a component setup.
best-practices-outside-componentServer rendering, state hydration and the Nuxt module
Covers the @pinia/nuxt module, auto-imports and fetching data in pages.
advanced-ssr and advanced-nuxtHot module replacement for stores
Adds HMR support to each store during development.
advanced-hmrSource 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
Sources
Docs, issue trackers and discussions this page is built from.
Show all 4Hide
- pinia SKILL.md · github.com
- antfu/skills README · github.com
- pinia GENERATION.md · github.com
- pinia advanced-nuxt.md · github.com