Official agent skill

Unit Test Vue Pinia

by github in github/awesome-copilot

Write and review unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases.

OfficialMITAuto-check passedTesting & QA

Install Unit Test Vue Pinia

skills CLI
$ npx skills add github/awesome-copilot --skill unit-test-vue-pinia -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install github/awesome-copilot unit-test-vue-pinia --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/github/awesome-copilot.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/unit-test-vue-pinia .claude/skills/unit-test-vue-pinia && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
unit-test-vue-pinia
GitHub stars
40k
Used in
1 other repo
Token cost
~1.8k tokens
SKILL.md length
720 words
Files
2 (incl. references)
Skills in repo
417
Repo updated
First seen
Licence
MIT

At a glance

Write and review unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases.

  • Works in 6 steps: Identify the behavior boundary first:… → Choose the narrowest test style that can… → Set up Pinia with the least powerful… → …
  • Updating tests for components
  • SKILL.md covers Workflow, Core Rules, Pinia Testing Approach and Vue Test Utils Approach, plus 5 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Unit Test Vue Pinia is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. Write and review unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases. Use when creating or updating tests for components, composables, and stores; mocking Pinia with createTestingPinia; applying Vue Test Utils patterns; and enforcing black-box assertions over implementation details.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 2 other files, including reference files (for example `references/pinia-patterns.md`).

It sits in Testing & QA, covering Unit testing. It works with Vue.js, Vitest and TypeScript. The repository describes itself as: Community-contributed instructions, agents, skills, and configurations to help you make the most of GitHub Copilot. The licence is MIT.

When your agent uses it

  • Updating tests for components
  • Mocking Pinia with createTestingPinia
  • Applying Vue Test Utils patterns
  • Enforcing black-box assertions over implementation details

Example prompts

  • “/unit-test-vue-pinia”

Workflow steps

6 steps, taken from the first numbered list in SKILL.md.

  1. Identify the behavior boundary first: component UI behavior, composable behavior, or store behavior.
  2. Choose the narrowest test style that can prove that behavior.
  3. Set up Pinia with the least powerful option that still covers the scenario.
  4. Drive the test through public inputs such as props, form updates, button clicks, emitted child events, and store APIs.
  5. Assert observable outputs and side effects before considering any instance-level assertion.
  6. Return or review tests with clear behavior-oriented names and note any remaining coverage gaps.

What it can do on your machine

Read from SKILL.md and the folder at commit 727ff2e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are typescript).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • test-utils.vuejs.org
    • pinia.vuejs.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Unit Test Vue Pinia loads about 1.8k tokens when it runs, and up to ~2.2k if it reads all its reference files. Until then it costs about 78 tokens; SKILL.md has 720 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~78
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~2.2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from github/awesome-copilot at commit 727ff2e, republished under its MIT licence (© github). 720 words, ~1,777 tokens.

Download SKILL.mdSave it as .claude/skills/unit-test-vue-pinia/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
unit-test-vue-pinia
description
Write and review unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases. Use when creating or updating tests for components, composables, and stores; mocking Pinia with createTestingPinia; applying Vue Test Utils patterns; and enforcing black-box assertions over implementation details.
category
testing

unit-test-vue-pinia

Use this skill to create or review unit tests for Vue components, composables, and Pinia stores. Keep tests small, deterministic, and behavior-first.

Workflow

  1. Identify the behavior boundary first: component UI behavior, composable behavior, or store behavior.
  2. Choose the narrowest test style that can prove that behavior.
  3. Set up Pinia with the least powerful option that still covers the scenario.
  4. Drive the test through public inputs such as props, form updates, button clicks, emitted child events, and store APIs.
  5. Assert observable outputs and side effects before considering any instance-level assertion.
  6. Return or review tests with clear behavior-oriented names and note any remaining coverage gaps.

Core Rules

  • Test one behavior per test.
  • Assert observable input/output behavior first (rendered text, emitted events, callback calls, store state changes).
  • Avoid implementation-coupled assertions.
  • Access wrapper.vm only in exceptional cases when there is no reasonable DOM, prop, emit, or store-level assertion.
  • Prefer explicit setup in beforeEach() and reset mocks every test.
  • Use checked-in reference material in references/pinia-patterns.md as the local source of truth for standard Pinia test setups.

Pinia Testing Approach

Use references/pinia-patterns.md first, then fall back to Pinia's testing cookbook when the checked-in examples do not cover the case.

Default pattern for component tests

Use createTestingPinia as a global plugin while mounting. Prefer createSpy: vi.fn as the default for consistency and easier action-spy assertions.

ts
const wrapper = mount(ComponentUnderTest, {
	global: {
		plugins: [
			createTestingPinia({
				createSpy: vi.fn,
			}),
		],
	},
});

By default, actions are stubbed and spied. Use stubActions: true (default) when the test only needs to verify whether an action was called (or not called).

Accepted minimal Pinia setups

The following are also valid and should not be flagged as incorrect:

  • createTestingPinia({}) when the test does not assert Pinia action spy behavior.
  • createTestingPinia({ initialState: ... }) or createTestingPinia({ stubActions: ... }) without createSpy, when the test only needs state seeding or action stubbing behavior and does not inspect generated spies.
  • setActivePinia(createTestingPinia(...)) in store/composable-focused tests (without mounting a component) when mocking/seeding dependent stores is needed.

Use createSpy: vi.fn when action spy assertions are part of the test intent.

Execute real actions only when needed

Use stubActions: false only when the test must validate the action's real behavior and side effects. Do not switch it on by default for simple "was called" assertions.

ts
const wrapper = mount(ComponentUnderTest, {
	global: {
		plugins: [
			createTestingPinia({
				createSpy: vi.fn,
				stubActions: false,
			}),
		],
	},
});
Seed store state with initialState
ts
const wrapper = mount(ComponentUnderTest, {
	global: {
		plugins: [
			createTestingPinia({
				createSpy: vi.fn,
				initialState: {
					counter: { n: 20 },
					user: { name: "Leia Organa" },
				},
			}),
		],
	},
});
Add Pinia plugins through createTestingPinia
ts
const wrapper = mount(ComponentUnderTest, {
	global: {
		plugins: [
			createTestingPinia({
				createSpy: vi.fn,
				plugins: [myPiniaPlugin],
			}),
		],
	},
});
Getter override pattern for edge cases
ts
const pinia = createTestingPinia({ createSpy: vi.fn });
const store = useCounterStore(pinia);

store.double = 999;
// @ts-expect-error test-only reset of overridden getter
store.double = undefined;
Pure store unit tests

Prefer pure store tests with createPinia() when the goal is to validate store state transitions and action behavior without component rendering. Use createTestingPinia() only when you need stubbed dependent stores, seeded test doubles, or action spies.

ts
beforeEach(() => {
	setActivePinia(createPinia());
});

it("increments", () => {
	const counter = useCounterStore();
	counter.increment();
	expect(counter.n).toBe(1);
});
Show full SKILL.md (301 more words)Show less

Vue Test Utils Approach

Follow Vue Test Utils guidance: https://test-utils.vuejs.org/guide/

  • Mount shallow by default for focused unit tests.
  • Mount full component trees only when integration behavior is the subject.
  • Drive behavior through props, user-like interactions, and emitted events.
  • Prefer findComponent(...).vm.$emit(...) for child stub events instead of touching parent internals.
  • Use nextTick only when updates are async.
  • Assert emitted events and payloads with wrapper.emitted(...).
  • Access wrapper.vm only when no DOM assertion, emitted event assertion, prop assertion, or store-level assertion can express the behavior. Treat it as an exception and keep the assertion narrowly scoped.

Key Testing Snippets

Emit and assert payload:

ts
await wrapper.find("button").trigger("click");
expect(wrapper.emitted("submit")?.[0]?.[0]).toBe("Mango Mission");

Update input and assert output:

ts
await wrapper.find("input").setValue("Agent Violet");
await wrapper.find("form").trigger("submit");
expect(wrapper.emitted("save")?.[0]?.[0]).toBe("Agent Violet");

Test Writing Workflow

  1. Identify the behavior boundary to test.
  2. Build minimal fixture data (only fields needed by that behavior).
  3. Configure Pinia and required test doubles.
  4. Trigger behavior through public inputs.
  5. Assert public outputs and side effects.
  6. Refactor test names to describe behavior, not implementation.

Constraints and Safety

  • Do not test private/internal implementation details.
  • Do not overuse snapshots for dynamic UI behavior.
  • Do not assert every field in large objects if only one behavior matters.
  • Keep fake data deterministic; avoid random values.
  • Do not claim a Pinia setup is wrong when it is one of the accepted minimal setups above.
  • Do not rewrite working tests toward deeper mounting or real actions unless the behavior under test requires that extra surface area.
  • Flag missing test coverage, brittle selectors, and implementation-coupled assertions explicitly during review.

Output Contract

  • For create or update, return the finished test code plus a short note describing the selected Pinia strategy.
  • For review, return concrete findings first, then missing coverage or brittleness risks.
  • When the safest choice is ambiguous, state the assumption that drove the chosen test setup.

References

© github, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file (references) in skills/unit-test-vue-pinia of github/awesome-copilot.

  • SKILL.md
  • references/pinia-patterns.md

Open the folder on GitHubat commit 727ff2e

Used in 1 other repository

We found 1 copy of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in github/awesome-copilot, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Unit Test Vue Pinia next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Unit Test Vue Pinia compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Unit Test Vue Pinia this skillgithub/awesome-copilot40k1 repos~1.8kAutomated safety check: PassMIT
Vue Idiomsirahardianto/awesome-agv157—~6kAutomated safety check: PassMIT
Test Writing WorkflowiOfficeAI/AionUi33k1 repos~1.2kAutomated safety check: PassApache-2.0
Creating A Packagec15t/c15t1.9k—~913Automated safety check: PassApache-2.0
Svelte Testingspences10/sveltest113—~579Automated safety check: PassMIT
Effect TStellahq/opensession392—~3.7kAutomated safety check: PassMIT

Similar skills

  • Vue Idioms

    irahardianto/awesome-agv

    Vue 3 Composition API patterns: <script setup syntax, reactive state with Pinia stores, reusable composables, and Vitest component testing.

    157 GitHub stars~6k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Test Writing Workflow

    iOfficeAI/AionUi

    Sets the test-writing workflow for the repository: risk-first scenario lists, behavior-focused Vitest tests, a full run before each commit and a coverage target.

    33k GitHub starsUsed in 1 repo~1.2k tokens
    Testing & QAAuto-check passed
  • Scaffold a new workspace package in the c15t monorepo. An agent skill from c15t/c15t.

    1.9k GitHub stars~913 tokensUpdated today
    Testing & QAAuto-check passed
  • Svelte Testing

    spences10/sveltest

    Fix and create Svelte 5 tests with vitest-browser-svelte and Playwright.

    113 GitHub stars~579 tokensUpdated yesterday
    Testing & QAAuto-check passed
  • Effect TS

    tellahq/opensession

    Write idiomatic Effect v4 TypeScript verified against the pinned effect@4.0.0-rc.112 source.

    392 GitHub stars~3.7k tokensUpdated today
    Testing & QAAuto-check passed
  • Ha Frontend Testing

    home-assistant/frontend

    Home Assistant frontend testing and validation workflow. An agent skill from home-assistant/frontend.

    5.7k GitHub stars~1.7k tokensUpdated today
    Testing & QAAuto-check passed

More from github/awesome-copilot

All 417 skills in this repo
  • Acquire Codebase Knowledge

    github/awesome-copilot

    Official

    Maps an unfamiliar codebase into seven evidence-backed documents in docs/codebase/, using a scan script and templates, for onboarding or architecture write-ups.

    40k GitHub starsUsed in 1 repo~2.3k tokens
    Auto-check passed
  • Azure Architecture Autopilot

    github/awesome-copilot

    Official

    Designs Azure infrastructure from a natural-language description, or diagrams an existing resource group, then refines the design through conversation and deploys it with Bicep.

    40k GitHub starsUsed in 1 repo~1.9k tokens
    Auto-check passed
  • Draw.io Diagram Generator

    github/awesome-copilot

    Official

    Generates, edits and validates draw.io files with correct mxGraph XML, covering flowcharts, architecture, sequence, ER and UML class diagrams.

    40k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed
  • Credit Risk Data Cleaning

    github/awesome-copilot

    Official

    Cleans raw credit data and screens variables before loan modeling, dropping unstable, noisy or redundant features and writing an Excel report of every step.

    40k GitHub starsUsed in 1 repo~1.5k tokens
    Auto-check passed
  • Daily Focus Board

    github/awesome-copilot

    Official

    Builds a warm, browser-based daily focus board the user updates by talking to their agent, with Eisenhower priorities, a brain-dump box and kind not-today carryover.

    40k GitHub stars~3k tokensUpdated today
    Auto-check passed
  • Python Pypi Package Builder

    github/awesome-copilot

    Official

    End-to-end skill for building, testing, linting, versioning, and publishing a production-grade Python library to PyPI.

    40k GitHub starsUsed in 1 repo~4.6k tokens
    Auto-check passed

Categories

Questions about Unit Test Vue Pinia

What does Unit Test Vue Pinia do?

Write and review unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases. Unit Test Vue Pinia is an agent skill from github/awesome-copilot, published by the product's own GitHub organization. Write and review unit tests for Vue 3 + TypeScript + Vitest + Pinia codebases.

When should I use Unit Test Vue Pinia?

Unit Test Vue Pinia fits situations like: updating tests for components; mocking Pinia with createTestingPinia; applying Vue Test Utils patterns; enforcing black-box assertions over implementation details.

How do I install Unit Test Vue Pinia in Claude Code?

Run `npx skills add github/awesome-copilot --skill unit-test-vue-pinia -a claude-code`. Or copy the skill folder (skills/unit-test-vue-pinia in github/awesome-copilot) into .claude/skills/unit-test-vue-pinia in your project. Claude Code loads it when a task matches its description.

How do I install Unit Test Vue Pinia in Codex?

Run `npx skills add github/awesome-copilot --skill unit-test-vue-pinia -a codex`. Or copy the skill folder (skills/unit-test-vue-pinia in github/awesome-copilot) into .agents/skills/unit-test-vue-pinia in your project. Codex loads it when a task matches its description.

Can I use Unit Test Vue Pinia in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add github/awesome-copilot --skill unit-test-vue-pinia -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/unit-test-vue-pinia, .gemini/skills/unit-test-vue-pinia, .github/skills/unit-test-vue-pinia and .opencode/skills/unit-test-vue-pinia in your project.

What does Unit Test Vue Pinia need to run?

SKILL.md names no scripts, command-line tools or credentials: Unit Test Vue Pinia is instructions for the agent only.

Does Unit Test Vue Pinia access the network?

SKILL.md names 2 domains. As links in the text: test-utils.vuejs.org and pinia.vuejs.org. This is read from the text; nothing was executed.

Is Unit Test Vue Pinia safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Unit Test Vue Pinia use?

Unit Test Vue Pinia is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Unit Test Vue Pinia use?

About 1.8k tokens (SKILL.md is roughly 7.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 455 tokens, read only when the agent opens those files.

What are the alternatives to Unit Test Vue Pinia?

Skills that share tags, products or a category with Unit Test Vue Pinia: Vue Idioms (irahardianto/awesome-agv, 157 stars), Test Writing Workflow (iOfficeAI/AionUi, 33k stars), Creating A Package (c15t/c15t, 1.9k stars) and Svelte Testing (spences10/sveltest, 113 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Unit Test Vue Pinia?

github (a GitHub organization, an official publisher) maintains it in github/awesome-copilot, which has 39,748 GitHub stars. The repository holds 417 skills in this directory. The repository was last updated on October 7, 2026.

Source: github/awesome-copilot on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.