pinia

Manage Vue 3 application state with centralized, type-safe Pinia stores.

Updated Apr 29, 2026
One-click install
npx skills add https://github.com/remiconnesson/nuxt-minimal-starter-v0-template --skill pinia-remiconnesson
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pinia
Source: https://github.com/remiconnesson/nuxt-minimal-starter-v0-template/tree/main/.agents/skills/pinia
Command: npx skills add https://github.com/remiconnesson/nuxt-minimal-starter-v0-template --skill pinia-remiconnesson

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Pinia provides a lightweight, type-safe, and scalable solution for managing Vue app state via centralized stores, replacing ad-hoc global state patterns.

Core Features & Use Cases

  • Define stores with state, getters, and actions using both option-style and setup-style definitions.
  • Support store-to-ref usage, devtools integration, and Nuxt/SSR support for seamless server rendering.
  • Works with plugins, composition utilities, and SSR hydration to keep state predictable across components.

Quick Start

Create a simple counter store with defineStore and consume it in a 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 application state with a centralized store?

You can manage Vue application state by defining a centralized store with state, getters, and actions using defineStore, which supports both option-style and setup-style patterns for type-safe state management.

How does state management work with Nuxt and server-side rendering in Vue 3?

State management with Nuxt and SSR works by utilizing SSR hydration to keep state predictable across components, ensuring seamless server rendering and synchronized client state hydration for Vue 3 applications.

Can I use composition API utilities like storeToRefs with Pinia stores?

Yes, you can use composition API utilities like storeToRefs to destructure store properties while maintaining reactivity, allowing seamless integration of store state and getters directly inside Vue setup functions.

What is the best way to define type-safe Vue stores using setup and option styles?

The best way to define type-safe Vue stores is using defineStore, which allows you to organize reactive state, getters, and actions using either the option-style or setup-style definition patterns natively.

Does Pinia support hot module replacement and plugins for Vue state management?

Yes, Pinia supports hot module replacement (HMR) and plugins to extend store functionality, allowing you to add custom logic and maintain predictable state updates during Vue development without losing application state.

When should I use a centralized store instead of ad-hoc global state patterns in Vue?

You should use a centralized store when your Vue application grows beyond simple component state, requiring scalable, type-safe state organization to replace ad-hoc global state patterns and ensure predictable state management.