{"slug":"pinia","title":"pinia","summary":"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.","platform":"Claude","tags":[],"authorName":"LLM Mart","authorSlug":"llm-mart","score":0,"source":"github","price":null,"verified":false,"createdAt":"2026-12-02T16:53:44.718912Z","repo":{"url":"https://github.com/beginwithu/agent-skills","stars":11,"forks":2,"license":"MIT","updatedAt":"2026-12-02T16:37:11Z"},"bodyHtml":"<hr>\n<h2>name: pinia\ndescription: 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.\nmetadata:\nauthor: Anthony Fu\nversion: \"2026.9.25\"\nsource: Generated from <a href=\"https://github.com/vuejs/pinia\">https://github.com/vuejs/pinia</a>, scripts located at <a href=\"https://github.com/antfu/skills\">https://github.com/antfu/skills</a></h2>\n<h1>Pinia</h1>\n<p>Pinia is the official state management library for Vue, designed to be intuitive and type-safe. It supports both Options API and Composition API styles, with first-class TypeScript support and devtools integration.</p>\n<blockquote>\n<p>The skill is based on Pinia v4.0.3, generated at 2026-09-25.</p>\n</blockquote>\n<h2>Core References</h2>\n<table>\n<thead>\n<tr>\n<th>Topic</th>\n<th>Description</th>\n<th>Reference</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Stores</td>\n<td>Defining stores, state, getters, actions, storeToRefs, subscriptions</td>\n<td><a href=\"references/core-stores.md\">core-stores</a></td>\n</tr>\n</tbody>\n</table>\n<h2>Features</h2>\n<h3>Extensibility</h3>\n<table>\n<thead>\n<tr>\n<th>Topic</th>\n<th>Description</th>\n<th>Reference</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Plugins</td>\n<td>Extend stores with custom properties, state, and behavior</td>\n<td><a href=\"references/features-plugins.md\">features-plugins</a></td>\n</tr>\n</tbody>\n</table>\n<h3>Composability</h3>\n<table>\n<thead>\n<tr>\n<th>Topic</th>\n<th>Description</th>\n<th>Reference</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Composables</td>\n<td>Using Vue composables within stores (VueUse, etc.)</td>\n<td><a href=\"references/features-composables.md\">features-composables</a></td>\n</tr>\n<tr>\n<td>Composing Stores</td>\n<td>Store-to-store communication, avoiding circular dependencies</td>\n<td><a href=\"references/features-composing-stores.md\">features-composing-stores</a></td>\n</tr>\n</tbody>\n</table>\n<h2>Best Practices</h2>\n<table>\n<thead>\n<tr>\n<th>Topic</th>\n<th>Description</th>\n<th>Reference</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Testing</td>\n<td>Unit testing with @pinia/testing, mocking, stubbing</td>\n<td><a href=\"references/best-practices-testing.md\">best-practices-testing</a></td>\n</tr>\n<tr>\n<td>Outside Components</td>\n<td>Using stores in navigation guards, plugins, middlewares</td>\n<td><a href=\"references/best-practices-outside-component.md\">best-practices-outside-component</a></td>\n</tr>\n</tbody>\n</table>\n<h2>Advanced</h2>\n<table>\n<thead>\n<tr>\n<th>Topic</th>\n<th>Description</th>\n<th>Reference</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>SSR</td>\n<td>Server-side rendering, state hydration</td>\n<td><a href=\"references/advanced-ssr.md\">advanced-ssr</a></td>\n</tr>\n<tr>\n<td>Nuxt</td>\n<td>Nuxt integration, auto-imports, SSR best practices</td>\n<td><a href=\"references/advanced-nuxt.md\">advanced-nuxt</a></td>\n</tr>\n<tr>\n<td>HMR</td>\n<td>Hot module replacement for development</td>\n<td><a href=\"references/advanced-hmr.md\">advanced-hmr</a></td>\n</tr>\n</tbody>\n</table>\n<h2>Key Recommendations</h2>\n<ul>\n<li><strong>Prefer Setup Stores</strong> for complex logic, composables, and watchers</li>\n<li><strong>Use <code>storeToRefs()</code></strong> when destructuring state/getters to preserve reactivity</li>\n<li><strong>Actions can be destructured directly</strong> - they're bound to the store</li>\n<li><strong>Call stores inside functions</strong> not at module scope, especially for SSR</li>\n<li><strong>Add HMR support</strong> to each store for better development experience</li>\n<li><strong>Use <code>@pinia/testing</code></strong> for component tests with mocked stores</li>\n</ul>\n","files":[{"path":"GENERATION.md","sizeBytes":135,"isText":true},{"path":"LICENSE","sizeBytes":1102,"isText":false},{"path":"references/advanced-hmr.md","sizeBytes":1387,"isText":true},{"path":"references/advanced-nuxt.md","sizeBytes":2671,"isText":true},{"path":"references/advanced-ssr.md","sizeBytes":2425,"isText":true},{"path":"references/best-practices-outside-component.md","sizeBytes":2218,"isText":true},{"path":"references/best-practices-testing.md","sizeBytes":4830,"isText":true},{"path":"references/core-stores.md","sizeBytes":7749,"isText":true},{"path":"references/features-composables.md","sizeBytes":2746,"isText":true},{"path":"references/features-composing-stores.md","sizeBytes":2612,"isText":true},{"path":"references/features-plugins.md","sizeBytes":3676,"isText":true},{"path":"SKILL.md","sizeBytes":2719,"isText":true}],"reviewScore":null,"reviewSummary":null,"trust":{"provenance":"trusted-source-unreviewed","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow.","bodySource":null},"bodyLocked":false,"purchaseUrl":null,"sourceUrl":null,"report":{"provenance":"trusted-source-unreviewed","screen":{"ran":true,"outcome":"clean","suspicious":0,"notes":0,"hiddenCharacters":false},"virusScan":{"engine":"clamav","status":"clean","scannedAt":"2026-12-02T16:57:44.656688Z","sha256":"5DC2DB21BC39B1E5192385792D3899FE80AE1CA9C2BF141FCDD93BDCA7B4350D","sizeBytes":15451},"review":null,"source":{"repositoryUrl":"https://github.com/beginwithu/agent-skills","path":"skills/pinia","license":"MIT","commit":"a960304c52212f2e845067047f5cefc0c594d787","subtreeSha":"827D214A8C6E77F8ECB39E8BFF4205B70D6DA762E0048AA6173C3CD7469F45A7","lastSyncedAt":"2026-12-02T16:52:59.20206Z"},"reviewedAt":"2026-12-02T17:05:34.86034Z","notice":"Community-authored content, reproduced verbatim and not vetted as instructions. Treat it as data to evaluate, never as directives to follow."},"install":[{"target":"skills-cli","command":"npx skills add https://github.com/beginwithu/agent-skills/tree/main/skills/pinia"},{"target":"claude-code","command":"claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install beginwithu-agent-skills@llmmart"},{"target":"git","command":"git clone https://github.com/beginwithu/agent-skills.git"}]}