pinia
An agent skill by antfu, from antfu/skills. Tags: architecture, development, state-management, vue.
What it does
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.
Install
With the skills CLI, which installs into Claude Code, Codex, Cursor and other agents:
npx skills add antfu/skills --skill pinia
Or copy the skill folder into Claude Code's skills directory by hand (~/.claude/skills for every project, or .claude/skills inside one):
git clone --depth 1 https://github.com/antfu/skills
cp -r skills/skills/pinia ~/.claude/skills/pinia
Safety box score
Grade A, minimal risk: 7 of 100 risk points, rated 2026-10-20. The grade rates what the skill and its scripts can reach on the machine of whoever installs it, across eight categories from shell execution to secrets access. How the score works.
This skill is documentation for using Pinia in Vue/Nuxt apps; it does not ship executable scripts or touch the filesystem directly. The main risk is that it includes package-install commands such as `npx nuxi@latest module add pinia` and `npm i ...`, which will fetch and run third-party registry code if you follow them.
| Category | Level | Why |
|---|---|---|
| Code & shell execution | 1 (low) | The docs include commands that execute package-manager actions, including `npx nuxi@latest module add pinia` and `npm i -D @pinia/testing`, so a user may run remote registry code. |
| Network access | 1 (low) | Several setup steps download dependencies from the npm registry, e.g. `npx nuxi@latest module add pinia` and `npm i pinia @vue/devtools-api`, so installing the skill's recommendations requires outbound network access. |
| Filesystem reach | 0 (none) | No shipped scripts or instructions read, write, or delete files outside the project; the content is limited to code examples and prose. |
| Secrets & credentials | 0 (none) | The skill does not ask for tokens, passwords, `.env` files, keychains, or browser sessions, and it does not reference credential stores. |
| Privilege & persistence | 0 (none) | There is no use of sudo, services, global installs, shell startup edits, or other OS-level configuration changes in the skill files. |
| Instruction hijack surface | 0 (none) | The files do not instruct the agent to ignore its rules, hide behavior, or follow remote instructions; they are ordinary Pinia usage examples. |
| Irreversible actions | 0 (none) | The apparent "purchase" wording in `references/features-composing-stores.md` is just an app-level example function name, not an instruction for the agent to buy, book, deploy, or send anything. |
| Transparency | 0 (none) | All files are readable markdown; there are no binaries, base64 blobs, or hidden runtime payloads. |
Before installing
- Check `references/advanced-nuxt.md` for the `npx nuxi@latest` command and decide whether you want a pinned version instead of `@latest`.
- Inspect `references/best-practices-testing.md` if you plan to install `@pinia/testing`; it adds a dev dependency from npm.
- Run the install commands in a throwaway branch or sandbox first if you want to see exactly what gets added to `package.json` and lockfiles.
Rated 2026-10-20 by an automated review of 11 files from the skill's repository.
Source
- Repository
- antfu/skills (all skills from this repository)
- Path
- skills/pinia/SKILL.md
- Branch
- main
- Updated
- 2026-09-22
Related skills
- architect — Sketch types, signatures, and module structure before code, then stay in the loop while implementation fills in.
- expo-brownfield — Framework (OSS). Integrate Expo and React Native into an existing native iOS or Android app.
- expo-module — Framework (OSS). Guide for creating and writing Expo native modules and views using the Expo Modules API (Swift, Kotlin, TypeScript).
- expo-project-structure — Framework (OSS). Folder structure for a new Expo app.
- expo-web-to-native — Framework (OSS). Migrate an existing web React app to a native iOS/Android app with Expo.
- how — Use for "how does X work", code walkthroughs before changing something, and placement / ownership / layering questions ("where should this live".