pinia

Manage Vue app state with Pinia stores, state, getters, and actions.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/mheers/opencode-sandbox --skill pinia-mheers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pinia
Source: https://github.com/mheers/opencode-sandbox/tree/main/skills/pinia
Command: npx skills add https://github.com/mheers/opencode-sandbox --skill pinia-mheers

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Pinia provides a stable, type-safe approach to managing shared state in Vue applications, replacing ad-hoc global objects with a canonical store system that integrates with TypeScript and devtools.

Core Features & Use Cases

  • Stores, state, getters, and actions with a clean API that works with both Options API and Composition API.
  • storeToRefs enables ergonomic reactive access to state and getters in components.
  • Devtools integration and a scalable pattern for modular store composition across large apps.

Quick Start

Create a Pinia store to manage user authentication state with getters and actions and wire it to components using storeToRefs.

Frequently Asked Questions about pinia

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage shared state in a Vue app with TypeScript?

You can manage Vue app state type-safely by using stores that hold state, getters, and actions. This approach replaces ad-hoc global objects with a canonical system integrating directly with TypeScript.

What is the best way to handle Vue state management for scalable apps?

The best way to handle Vue state management for scalable apps is using a modular store composition pattern. This allows you to define stores using either the Options API or Composition API style, ensuring clean architecture as your application expands.

Can I use Composition API stores with Vue state management?

Yes, you can use Composition API stores with Vue state management. The system supports both Composition API and Options API styles, allowing you to define state, getters, and actions using your preferred Vue paradigm.

How do I access reactive state and getters in Vue components?

You access reactive state and getters in Vue components by using the storeToRefs utility. This enables ergonomic reactive access, allowing you to destructure properties while maintaining their reactivity.

Does Vue state management work with devtools?

Yes, Vue state management works with devtools. The store system includes devtools integration, allowing you to inspect state, getters, and actions for easier debugging during development.

Why do I need a store system instead of global objects for Vue state?

You need a store system instead of global objects for Vue state to ensure type-safety and scalability. A canonical store system integrates with devtools and TypeScript, replacing ad-hoc objects with structured state, getters, and actions.