Skip to content
Skill

Unit test vue pinia

Guides an agent to write and review Vue 3 unit tests with Vitest and Pinia

Unit test vue pinia is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
41.8K
Last commit
License
MIT
Listing updated

Similar skills

About Unit test vue pinia

This skill directs an AI coding agent to create or review unit tests for Vue 3 components, composables and Pinia stores in TypeScript projects using Vitest. It pushes tests toward observable behavior: driving components through props, clicks, form input and emitted events, then asserting rendered output, emitted payloads and store state changes rather than internal instance details.

The workflow has the agent first pick the behavior boundary and the narrowest test style, then choose the least powerful Pinia setup that still covers the case. It covers when to use createTestingPinia with spied or stubbed actions, seeding state with initialState, executing real actions, and plain createPinia for pure store tests. It also points to a checked-in pinia-patterns reference file and the Vue Test Utils guide for conventions.

The agent is expected to flag brittle selectors, implementation-coupled assertions and missing coverage during reviews, and to state the assumptions behind its Pinia strategy. The skill is plain markdown instructions with no scripts; it needs a Vue 3, TypeScript, Vitest and Pinia project.

When your agent uses it

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.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 2 files (9 KB) on GitHub on 3 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

Copy the skill folder to ~/.claude/skills/unit-test-vue-pinia to use it in all your projects:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/unit-test-vue-pinia &&
cp -R "$tmp/skills/unit-test-vue-pinia" ~/.claude/skills/unit-test-vue-pinia &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/unit-test-vue-pinia inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/unit-test-vue-pinia to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/unit-test-vue-pinia &&
cp -R "$tmp/skills/unit-test-vue-pinia" ~/.agents/skills/unit-test-vue-pinia &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/unit-test-vue-pinia inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/unit-test-vue-pinia to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/unit-test-vue-pinia &&
cp -R "$tmp/skills/unit-test-vue-pinia" ~/.cursor/skills/unit-test-vue-pinia &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/unit-test-vue-pinia inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/github/awesome-copilot.git --path skills/unit-test-vue-pinia

Or copy the folder to ~/.gemini/skills/unit-test-vue-pinia yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/unit-test-vue-pinia:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/github/awesome-copilot.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/unit-test-vue-pinia &&
cp -R "$tmp/skills/unit-test-vue-pinia" ~/.copilot/skills/unit-test-vue-pinia &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/unit-test-vue-pinia inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/github/awesome-copilot.git

Then copy awesome-copilot/skills/unit-test-vue-pinia into your agent's skills folder as unit-test-vue-pinia. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Behavior-first test design
Guides tests to assert rendered text, emitted events, callbacks and store changes instead of internals.
Pinia testing setups
Covers createTestingPinia options such as spies, stubbed actions, initial state and plugins.
Vue Test Utils conventions
Recommends shallow mounting, event-based child interaction and limited use of wrapper.vm.
Store unit testing
Describes pure store tests with createPinia and setActivePinia for state transitions.
Test review checklist
Flags brittle selectors, snapshot overuse and implementation-coupled assertions with coverage gaps.

Good for

  • Write Vitest unit tests for a Vue component that emits a submit event
  • Add store tests for a Pinia counter with state transitions
  • Mock a Pinia store in a component test using createTestingPinia
  • Review an existing Vue test suite for implementation-coupled assertions
  • Seed Pinia state for a component test with initial data

Unit test vue pinia FAQ

What does the skill need to run?

It is a set of markdown instructions with no scripts. It targets Vue 3, TypeScript, Vitest and Pinia projects and refers to Vue Test Utils and the Pinia testing cookbook.

When does the skill apply?

It applies when creating or updating tests for components, composables and stores, mocking Pinia with createTestingPinia, or reviewing tests for black-box assertions.

Does Unit test vue pinia mock Pinia actions by default?

Actions are stubbed and spied by default with createTestingPinia. Real actions are only enabled with stubActions set to false when the test must validate actual behavior.

How do I install Unit test vue pinia in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/unit-test-vue-pinia to use it in all your projects, or to .claude/skills/unit-test-vue-pinia in one project.

Does Unit test vue pinia run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Unit test vue pinia?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Unit test vue pinia?

The closest alternatives to Unit test vue pinia are Vue, Vitest skill, Vue data, Vue review and Build tooling.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from github/awesome-copilot

  1. A DevOps checklist for deploys, Docker, Kubernetes, CI/CD, rollback and mobile releases

    • Open source
    • 41.8K GitHub stars
    • Cloud and infrastructure
  2. Guides Qdrant scaling when data outgrows a node: tenants, time windows or sharding

    • Open source
    • 41.8K GitHub stars
    • Knowledge and memory
  3. Explains Qdrant's per-shard query subsampling for large limits across many auto-shards

    • Open source
    • 41.8K GitHub stars
    • Knowledge and memory