本文へ移動
cccskills
無料GitHub で公開

pinia

Pinia official Vue state management library, type-safe and extensible. Use when defining stores, working with state/getters/actions, or implementing store patterns in Vue apps.

インストール方法を見る

含まれるファイル(11)

  • SKILL.md2.7 KB
  • GENERATION.md135 B
  • references/advanced-hmr.md1.4 KB
  • references/advanced-nuxt.md2.6 KB
  • references/advanced-ssr.md2.4 KB
  • references/best-practices-outside-component.md2.2 KB
  • references/best-practices-testing.md4.7 KB
  • references/core-stores.md7.6 KB
  • references/features-composables.md2.7 KB
  • references/features-composing-stores.md2.6 KB
  • references/features-plugins.md3.6 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Pinia

Pinia is the official state management library for Vue, designed to be intuitive and type-safe. It supports both Options API and Composition API styles, with first-class TypeScript support and devtools integration.

The skill is based on Pinia v4.0.3, generated at 2026-09-25.

Core References

TopicDescriptionReference
StoresDefining stores, state, getters, actions, storeToRefs, subscriptionscore-stores

Features

Extensibility

TopicDescriptionReference
PluginsExtend stores with custom properties, state, and behaviorfeatures-plugins

Composability

TopicDescriptionReference
ComposablesUsing Vue composables within stores (VueUse, etc.)features-composables
Composing StoresStore-to-store communication, avoiding circular dependenciesfeatures-composing-stores

Best Practices

TopicDescriptionReference
TestingUnit testing with @pinia/testing, mocking, stubbingbest-practices-testing
Outside ComponentsUsing stores in navigation guards, plugins, middlewaresbest-practices-outside-component

Advanced

TopicDescriptionReference
SSRServer-side rendering, state hydrationadvanced-ssr
NuxtNuxt integration, auto-imports, SSR best practicesadvanced-nuxt
HMRHot module replacement for developmentadvanced-hmr

Key Recommendations

  • Prefer Setup Stores for complex logic, composables, and watchers
  • Use storeToRefs() when destructuring state/getters to preserve reactivity
  • Actions can be destructured directly - they're bound to the store
  • Call stores inside functions not at module scope, especially for SSR
  • Add HMR support to each store for better development experience
  • Use @pinia/testing for component tests with mocked stores

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

antfu

無料

Anthony Fu's opinionated tooling and conventions for JavaScript/TypeScript projects. Use when setting up new projects, configuring ESLint/Prettier alternatives, monorepos, library publishing, or when the user mentions Anthony Fu's preferences.

日本語の概要は準備中です。原文の説明を表示しています。

antfu/skills5,9642026年10月9日 更新

Create a reviewable GitHub pull request from the current branch with a Conventional Commits title, a concise evidence-based body, and before/after screenshots for UI changes. Use when asked to open, create, publish, or prepare a PR.

日本語の概要は準備中です。原文の説明を表示しています。

antfu/skills5,9642026年10月9日 更新

nitro

無料

Nitro is the framework-agnostic server toolkit (powering Nuxt) for building and deploying web servers anywhere. Use when working with nitro.config, server routes/event handlers, route rules, caching, storage, tasks, websockets, or deploying to Node/Bun/Deno/Cloudflare/Vercel.

日本語の概要は準備中です。原文の説明を表示しています。

antfu/skills5,9642026年10月9日 更新

nuxt

無料

Nuxt full-stack Vue framework with SSR, auto-imports, and file-based routing. Use when working with Nuxt apps, server routes, useFetch, middleware, or hybrid rendering.

日本語の概要は準備中です。原文の説明を表示しています。

antfu/skills5,9642026年10月9日 更新

pnpm

無料

Node.js package manager with strict dependency resolution. Use when running pnpm specific commands, configuring workspaces via pnpm-workspace.yaml, or managing dependencies with catalogs, patches, overrides, config dependencies, or the global virtual store.

日本語の概要は準備中です。原文の説明を表示しています。

antfu/skills5,9642026年10月9日 更新

unocss

無料

UnoCSS instant atomic CSS engine, superset of Tailwind CSS. Use when configuring UnoCSS, writing utility rules, shortcuts, or working with presets like Wind, Icons, Attributify.

日本語の概要は準備中です。原文の説明を表示しています。

antfu/skills5,9642026年10月9日 更新

antfu のスキルをすべて見る

このスキルの問題を報告する