
vue-pinia-best-practices
Pinia stores, state management patterns, store setup, and reactivity with stores
by vuejs-aiFree
Description
vue-pinia-best-practices is an agent skill from the vuejs-ai/skills collection, listed on skills.sh. It gives an AI agent Pinia best practices for Vue, covering store setup, reactivity with stores, and state management patterns. The skill is organized as common problems, each with a short rule and a link to a reference note. For store setup, it covers the 'getActivePinia was called' error at startup, and setup stores whose state is missing in DevTools or during server-side rendering, where every piece of state needs to be returned from the store. For reactivity, it covers destructuring a store in a way that stops the UI from updating, and store methods losing their context when they are called from a template. For state, it recommends keeping ephemeral filters in the URL, so they survive a refresh and can be shared, and using Pinia for large apps so that DevTools and team conventions are in place. The listing shows the skill as free, and its source is on GitHub.…
Highlights
- Fixes common Pinia startup and setup problems
- Keeps store reactivity intact when destructuring
- URL state for filters that should survive a refresh
- Links to a reference note for each problem
Ratings & Reviews
No ratings yet
Be the first to rate vue-pinia-best-practices.
People also visit

unit-test-vue-pinia
Write and review unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases
vue-pinia-best-practices FAQ
What does the vue-pinia-best-practices skill do?
It guides an AI agent through Pinia store setup, reactivity and state patterns in Vue projects.
How do I install it?
Run: npx skills add https://github.com/vuejs-ai/skills --skill vue-pinia-best-practices
What startup error does it cover?
The getActivePinia was called error, which appears when Pinia is used before it is set up.
Why does my store lose reactivity when I destructure it?
The skill lists destructuring a store as a common cause of UI not updating, and links a reference note with the fix.
When should filters go in the URL?
The skill recommends it for ephemeral filters that need to survive a refresh or be shared.
What do the security audits say?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best vue-pinia-best-practices alternatives?
Popular alternatives to vue-pinia-best-practices include pinia, vue-patterns and vue-best-practices. See all vue-pinia-best-practices alternatives













