pinia

Define type-safe state stores for Vue applications with Pinia.

3|Updated Feb 9, 2026
One-click install
npx skills add https://github.com/marcus-friction/agents --skill pinia-marcus-friction
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pinia
Source: https://github.com/marcus-friction/agents/tree/main/.agent/skills/pinia
Command: npx skills add https://github.com/marcus-friction/agents --skill pinia-marcus-friction

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Pinia provides a simple, type-safe state management solution for Vue apps.

Core Features & Use Cases

  • Stores: defineStore with state, getters, and actions to manage app data across components.
  • Setup Stores and storeToRefs: use Composition API for flexible, type-safe state management and reactivity.
  • SSR & Nuxt integration: supports server-side rendering hydration and Nuxt modules, with devtools support.

Quick Start

Create a store with defineStore and use it inside a Vue component to share reactive state across your app.

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 across Vue components with type safety?

Setup stores in Pinia let you use the Composition API to define state, getters, and actions directly within defineStore, offering flexible and composable type-safe state management for Vue applications.

How does Pinia state management handle SSR and Nuxt integration?

Pinia state management handles SSR and Nuxt integration through dedicated hydration patterns and Nuxt modules that keep client and server state in sync, while also providing devtools support for debugging.

Can I use storeToRefs to extract reactive state from a Pinia store?

Yes, you can use storeToRefs to extract reactive state and getters from a Pinia store. This function maintains reactivity when destructuring store properties, ensuring type-safe state management across your Vue app.

What's the best way to keep client and server state in sync for Vue apps?

The best way to keep client and server state in sync for Vue apps is using Pinia's hydration patterns and SSR integration. These features ensure consistent state during server-side rendering and Nuxt module initialization.

Does Pinia support plugins for Vue state management customization?

Yes, Pinia supports plugins to extend Vue state management capabilities. Plugins allow you to add custom functionality to stores created with defineStore, enhancing actions, getters, and state hydration across your application.