Skip to main content
skill Claude Code CX Codex Cursor GitHub Copilot

vue-pinia-best-practices — skill for Claude Code: Pinia state

A skill covering Pinia best practices: avoid common store setup errors, preserve reactivity, and organize state management patterns in Vue projects.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add vuejs-ai/skills --skill vue-pinia-best-practices -a claude-code
Open on GitHub

What vue-pinia-best-practices does

This skill gathers typical Pinia pitfalls and shows how to handle them. Inside: guidance on setup stores, reactivity with destructuring, template method binding, and filter state management. Each issue points to detailed explanations—for example, if destructuring breaks reactivity, the skill directs you to the correct approach.

The skill includes patterns for large apps with DevTools and best practices to keep code predictable and easier to scale.

What it helps with

  • Avoid getActivePinia was called error on startup
  • Preserve reactivity when destructuring a store
  • Configure setup stores so DevTools sees all state
  • Call store methods correctly from templates
  • Manage filters and ephemeral state properly

Example prompts for the agent

  • Why does UI stop updating when I destructure the store?
  • How do I set up Pinia for a production app with DevTools?
  • I get getActivePinia was called on init — what's wrong?

How to install vue-pinia-best-practices

1Skills CLI (Vercel)

npx skills add vuejs-ai/skills --skill vue-pinia-best-practices -a claude-code

2Manually: put the files in place

~/.claude/skills/vue-pinia-best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/vue-pinia-best-practices/

From the same set3

The whole set →

Similar

design-review nexu-io Audits UI visually, fixes flaws with atomic commits, and captures before/after screenshots. Useful for tightening shipped interface code right before launch. Claude Code CX Codex Cursor +1 3,100installs flutter-expert https://github.com/Jeffallan Skill for building cross-platform apps with Flutter 3+ and Dart. Covers widgets, state management via Riverpod or Bloc, GoRouter navigation, and performance optimization. Claude Code CX Codex Cursor +1 14,300installs ui-skills-root ibelick A UI task router that picks the right skill before interface work. Run npx ui-skills start to launch it and let the agent select just enough context to solve the problem. Claude Code CX Codex Cursor +1 7,100installs material-ui-nextjs mui A skill for wiring Material UI into Next.js: SSR, Emotion cache, next/font, CSS layers, Link, and useSearchParams. Use it when setting up or debugging MUI in a Next.js app. Claude Code CX Codex Cursor +1 725installs expo-router expo Skill for file-based routing, stacks, modals and tabs in Expo Router. Use it when building navigation in a React Native mobile app. Claude Code CX Codex Cursor +1 27,700installs expo-brownfield expo Embeds React Native and Expo into existing native iOS and Android apps. Useful when adding cross-platform screens to SwiftUI, UIKit, or Kotlin hosts. Claude Code CX Codex Cursor +1 27,700installs frontend-design official anthropics This skill guides intentional visual design for new interfaces and redesigns. Use it when a generic generated UI is not enough. Claude Code Claude.ai 1,025,790installs design-taste-frontend Leonxlnx This skill directs the design of public pages and work screens, then checks the result in a browser through screenshots. Use it when an interface feels generic or unfinished. Claude Code CX Codex Cursor +1 673,100installs

Questions about vue-pinia-best-practices

How do I install vue-pinia-best-practices in Claude Code?

Run npx skills add vuejs-ai/skills --skill vue-pinia-best-practices -a claude-code, then open ~/.claude/skills/vue-pinia-best-practices/SKILL.md.

What is vue-pinia-best-practices?

A skill with Pinia best practices for Vue 3. It covers store setup, reactivity, method binding, and state management patterns.

When should I bind reactively to a store, and when can I destructure?

Destructuring a store breaks reactivity. To keep reactivity in a template, either use the store directly (store.count) or wrap it in computed() in your script.

Source text

SKILL.md · MIT
---
name: vue-pinia-best-practices
description: "Pinia stores, state management patterns, store setup, and reactivity with stores."
version: 1.0.0
license: MIT
author: github.com/vuejs-ai
---

Pinia best practices, common gotchas, and state management patterns.

### Store Setup
- Getting "getActivePinia was called" error at startup → See [pinia-no-active-pinia-error](reference/pinia-no-active-pinia-error.md)
- Setup stores missing state in DevTools or SSR → See [pinia-setup-store-return-all-state](reference/pinia-setup-store-return-all-state.md)

### Reactivity
- Store destructuring stops updating UI reactively → See [pinia-store-destructuring-breaks-reactivity](reference/pinia-store-destructuring-breaks-reactivity.md)
- Store methods lose context in template calls → See [store-method-binding-parentheses](reference/store-method-binding-parentheses.md)

### State Patterns
- Filters reset on refresh or can't be shared → See [state-url-for-ephemeral-filters](reference/state-url-for-ephemeral-filters.md)
- Building production app without DevTools or conventions → See [state-use-pinia-for-large-apps](reference/state-use-pinia-for-large-apps.md)

© github.com/vuejs-ai · MIT · vuejs-ai/skills

See also

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor