Back to Skills

pinia

verified

Provides comprehensive guidance for Pinia state management including stores, state, getters, actions, plugins, and TypeScript support. Use when the user asks about Pinia, needs to manage application state, create stores, implement state persistence, or migrate from Vuex.

View on GitHub

Marketplace

full-stack-skills

partme-ai/full-stack-skills

Plugin

development-skills-utils

Repository

partme-ai/full-stack-skills
39stars

skills/pinia/SKILL.md

Last Verified

February 1, 2026

Install Skill

Select agents to install to:

Scope:
npx add-skill https://github.com/partme-ai/full-stack-skills/blob/main/skills/pinia/SKILL.md -a claude-code --skill pinia

Installation paths:

Claude
.claude/skills/pinia/
Powered by add-skill CLI

Instructions

## When to use this skill

Use this skill whenever the user wants to:
- Set up Pinia state management in Vue 3 applications
- Create stores with defineStore()
- Work with state, getters, and actions
- Use Pinia with Composition API
- Use Pinia with Options API
- Implement SSR (Server-Side Rendering) with Pinia
- Create and use Pinia plugins
- Access stores in components
- Share state between components
- Persist state with plugins
- Test Pinia stores
- Migrate from Vuex to Pinia

## How to use this skill

This skill is organized to match the Pinia official documentation structure (https://pinia.vuejs.org/introduction.html, https://pinia.vuejs.org/core-concepts/, https://pinia.vuejs.org/api/). When working with Pinia:

1. **Identify the topic** from the user's request:
   - Introduction/介绍 → `examples/introduction/`
   - Core Concepts/核心概念 → `examples/core-concepts/`
   - Cookbook/食谱 → `examples/cookbook/`
   - SSR/服务端渲染 → `examples/ssr/`
   - API Reference/API 参考 → `api/`

2. **Load the appropriate example file** from the `examples/` directory:

   **Introduction (介绍)** - `examples/introduction/`:
   - `examples/introduction/introduction.md`

   **Core Concepts (核心概念)** - `examples/core-concepts/`:
   - `examples/core-concepts/actions.md`
   - `examples/core-concepts/defining-a-store.md`
   - `examples/core-concepts/getters.md`
   - `examples/core-concepts/index.md`
   - `examples/core-concepts/outside-component-usage.md`
   - `examples/core-concepts/plugins.md`
   - `examples/core-concepts/state.md`

   **Cookbook (食谱)** - `examples/cookbook/`:
   - `examples/cookbook/composables.md`
   - `examples/cookbook/composing-stores.md`
   - `examples/cookbook/hot-module-replacement.md`
   - `examples/cookbook/index.md`
   - `examples/cookbook/migration-v1-v2.md`
   - `examples/cookbook/migration-v2-v3.md`
   - `examples/cookbook/migration-vuex.md`
   - `examples/cookbook/options-api.md`
   - `examples/cookbook/testing.md`
   - `examples/cookbook/vscode-snippets.md`

   **S

Validation Details

Front Matter
Required Fields
Valid Name Format
Valid Description
Has Sections
Allowed Tools
Instruction Length:
4972 chars