pinia
Pinia official Vue state management library, type-safe and extensible. Use when defining stores, working with state/getters/actio…
What it does
- Prefer Setup Stores for complex logic, composables, and watchers
- Use storeToRefs() when destructuring state/getters to preserve reactivity
- Actions can be destructured directly - they're bound to the store
- Call stores inside functions not at module scope, especially for SSR
- Add HMR support to each store for better development experience
- Use @pinia/testing for component tests with mocked stores
Derived from the skill's own SKILL.md documentation · extracted 2026-07-23
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.
Source
Repository: https://github.com/antfu/skills
pinia FAQ
What does the pinia skill do?
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. Prefer Setup Stores for complex logic, composables, and watchers Use storeToRefs() when destructuring state/getters to preserve reactivity
How do I install pinia?
Run: npx -y skills add https://github.com/antfu/skills --skill pinia --agent claude-code — the source lives at github.com/antfu/skills.
Maintain pinia?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[](https://getagentictools.com/skills/antfu-skills-pinia?ref=badge) npx agentictools info skills/antfu-skills-pinia The second line is the CLI lookup for this page — handy in READMEs and docs.