Vitest fast unit testing framework powered by Vite with Jest-compatible API. Use when writing tests, mocking, configuring coverage, or working with test filtering and fixtures.
Paste into a coding agent with terminal access. Check the upstream requirements for the skill you’re installing.
Prompt
Install the "vitest" Agent Skill by Anthony Fu, from https://github.com/antfu/skills.
1. Fetch the whole folder skills/vitest — SKILL.md plus every script, reference, and asset beside it, not just SKILL.md. For example:
skill_checkout=$(mktemp -d)
git init "$skill_checkout"
git -C "$skill_checkout" fetch --depth 1 https://github.com/antfu/skills.git 4a6bb39e7b45e26402eb215393c51ccf5df1ca4c
git -C "$skill_checkout" checkout --detach FETCH_HEAD
2. Copy it into your skills directory as a folder named "vitest":
- Claude Code: ~/.claude/skills/vitest/ (all projects) or .claude/skills/vitest/ (this project only)
- Another agent: the directory you load Agent Skills from (folders containing a SKILL.md)
3. Check that vitest/SKILL.md exists and its frontmatter says name: vitest.
4. Read SKILL.md, then tell me in two or three sentences what the skill does and when it will trigger, and list any dependencies it mentions (Python packages, npm packages, CLIs) that aren't installed yet. Don't install them without asking.
skills CLI
One command; the skills.sh installer detects your agents (Claude Code, Cursor, Codex, and more).
Vitest is a next-generation testing framework powered by Vite. It provides a Jest-compatible API with native ESM, TypeScript, and JSX support out of the box. Vitest shares the same config, transformers, resolvers, and plugins with your Vite app.
Key Features:
Vite-native: Uses Vite’s transformation pipeline for fast HMR-like test updates
Jest-compatible: Drop-in replacement for most Jest test suites
Smart watch mode: Only reruns affected tests based on module graph
Native ESM, TypeScript, JSX support without configuration
Multi-threaded workers for parallel test execution
Built-in coverage via V8 or Istanbul
Snapshot testing, mocking, and spy utilities
The skill is based on Vitest 5.1.0-beta.1, generated at 2026-10-23.
Core
Topic
Description
Reference
Configuration
Vitest and Vite config integration, defineConfig usage