pinia

Create and use Pinia stores in Vue apps with defineStore.

Updated Jan 11, 2026
One-click install
npx skills add https://github.com/UmmItKin/ummit.dev --skill pinia-ummitkin
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pinia
Source: https://github.com/UmmItKin/ummit.dev/tree/main/.agents/skills/pinia
Command: npx skills add https://github.com/UmmItKin/ummit.dev --skill pinia-ummitkin

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Pinia solves Vue state management complexity.

Core Features & Use Cases

  • Stores: defineStore() with Options or Setup syntax to manage state, getters, and actions
  • Plugins and SSR/Nuxt integration: extend stores and support SSR, devtools, and Vue ecosystem
  • Store-to-Refs and reactivity: use storeToRefs() to destructure without losing reactivity
  • Devtools and TypeScript: first-class TS support and devtools integration

Quick Start

Create a basic Pinia store using defineStore and demonstrate usage in a Vue component.

Frequently Asked Questions about pinia

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

FAQPage Schema
How do I manage Vue state without losing reactivity when destructuring?

To manage Vue state without losing reactivity, use the storeToRefs() function to destructure properties from a Pinia store. This ensures that your state and getters maintain their reactive references when accessed outside the store.

What is the best way to define a Vue store using TypeScript?

The best way to define a type-safe Vue store is using the Pinia defineStore() function. It supports both Options API and Composition API setup syntax to manage state, getters, and actions with first-class TypeScript support.

Does Pinia state management work with Nuxt SSR applications?

Yes, Pinia state management works with Nuxt SSR applications. It provides built-in server-side rendering support and devtools integration, allowing you to extend stores and maintain state across your Vue ecosystem.

Can I use the Composition API to setup a Pinia store?

Yes, you can use the Composition API to setup a Pinia store. The defineStore function allows you to use a setup syntax similar to Vue components, enabling you to define reactive state, computed getters, and functions as actions.

How do I add plugins to extend Vue store functionality?

To add plugins and extend Vue store functionality, Pinia allows you to integrate additional features directly into your stores. This plugin system supports extending state management capabilities while maintaining SSR and devtools compatibility.

Why do I need a dedicated state management library for my Vue app?

You need a dedicated state management library like Pinia to solve Vue state complexity across components. It provides a structured way to access stores via useStore, ensuring type safety and reactivity without prop drilling.