Pinia

From YuDefine/nuxt-supabase-starter · View interactive version

Pinia is an AI agent skill from the GitHub repository YuDefine/nuxt-supabase-starter. 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.

How to use this skill

Skill file

Pinia

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.

The skill is based on Pinia v4.0.3, generated at 2026-09-25.

Core References

| Topic | Description | Reference |

|-------|-------------|-----------|

| Stores | Defining stores, state, getters, actions, storeToRefs, subscriptions | core-stores |

Features

Extensibility

| Topic | Description | Reference |

|-------|-------------|-----------|

| Plugins | Extend stores with custom properties, state, and behavior | features-plugins |

Composability

| Topic | Description | Reference |

|-------|-------------|-----------|

| Composables | Using Vue composables within stores (VueUse, etc.) | features-composables |

| Composing Stores | Store-to-store communication, avoiding circular dependencies | features-composing-stores |

Best Practices

| Topic | Description | Reference |

|-------|-------------|-----------|

| Testing | Unit testing with @pinia/testing, mocking, stubbing | best-practices-testing |

| Outside Components | Using stores in navigation guards, plugins, middlewares | best-practices-outside-component |

Advanced

| Topic | Description | Reference |

|-------|-------------|-----------|

| SSR | Server-side rendering, state hydration | advanced-ssr |

| Nuxt | Nuxt integration, auto-imports, SSR best practices | advanced-nuxt |

| HMR | Hot module replacement for development | advanced-hmr |

Key Recommendations

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.