vitest Skill (antfu) for Claude Code: Vitest Test Help
Gives Claude the Vitest docs it needs to write tests, mock, configure coverage and filter runs. Generated by Anthony Fu.
- Installs
- 45.4K
- on skills.sh
- Stars
- 6K
- on GitHub
- Files
- 20
- besides SKILL.md
- Updated
- Oct 2026
- last repo commit
The vitest skill gives Claude a compact index of Vitest, with 19 reference pages behind it. It covers configuration, the CLI, test and describe APIs, expect matchers, hooks, mocking, snapshots, coverage, test context and fixtures, concurrency, filtering, tags, reporters, benchmarking, vi utilities, environments, type testing and multi-project setups.
It triggers when you write tests, mock, configure coverage, or filter tests. It is plain Markdown that was generated from the Vitest docs and is based on Vitest 5.1.0-beta.1. The author calls the whole collection a proof of concept that he has not fully tested in practice.
Good for
- Vite and Vue developers who test with Vitest
- Teams moving from Jest to a Jest-compatible runner
- Anyone who wants Claude to use current Vitest APIs instead of guessing
Install vitest
Claude Code
- 1
Copy this prompt.
Install the vitest skill in Claude Code. Run this command: npx skills add antfu/skills --skill vitest Then check that it loaded and tell me how to use it.
- 2
Paste it into Claude Code. It shows the change and asks before running it.
Requires Node.js.
The repo holds 20+ skills, so name this one with --skill or you install all of them. The skill is plain Markdown: SKILL.md, GENERATION.md and 19 reference pages.
From the vendor's docs. Source.
What's in the skill
When it loads
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.
Sections in SKILL.md
- Core
- Features
- Advanced
Key facts
- Repo
- antfu/skills
- Installs on skills.sh
- 45,396 (Nov 2, 2026)
- GitHub stars
- 6,032 (Nov 2, 2026)
- License
- MIT
- Last commit
- Oct 30, 2026
- Skill version
- 2026.10.23, based on Vitest 5.1.0-beta.1
- skills.sh checks
- Gen Agent Trust Hub pass, Socket pass, Snyk pass
What it includes
Config, CLI, test API, describe, expect and hooks
Six reference pages: core-config, core-cli, core-test-api, core-describe, core-expect, core-hooks.
Read ·
CoreMocking, snapshots, coverage, fixtures, filtering, tags, reporters, benchmarks
Nine reference pages. Coverage covers the V8 and Istanbul providers.
Read ·
Featuresvi utilities, environments, type testing and multi-project workspaces
Four reference pages: advanced-vi, advanced-environments, advanced-type-testing, advanced-projects.
Read ·
Advanced
From the official docs
Questions
How do I install the vitest skill?
Use the install box above, which installs only vitest. The author's README recommends his @antfu/skills pack with skills-npm, which keeps skills in sync through your package manager and includes curated skills from other authors. It also gives pnpx skills add antfu/skills --skill='*' to install every skill in the repo.
Does it need an API key?
No key is named. All 21 files are Markdown, so there are no scripts to run.
Does it work in the Claude app, Codex or Cursor?
You can zip the skill folder and upload it under Customize, then Skills, in the Claude app. That is our generic instruction. The README documents the skills CLI and a skills pack, not the Claude app. The skill is plain Markdown, so any agent that reads skill folders can load it.
Is it safe to use?
It is Markdown reference text with no scripts, so it cannot run anything itself. Like any skill, it shapes what Claude writes, and the author says he has not fully tested how well his skills perform, so review the tests Claude writes.
Is it up to date with Vitest?
It says it is based on Vitest 5.1.0-beta.1 and was generated on 2026-10-23. The README says the repo keeps skills in sync with source docs through git submodules. Check your installed Vitest version against that.
vitest vs the antfu skill?
The antfu skill holds Anthony Fu's own preferences for app and library projects, including eslint, pnpm, vitest and vue. The vitest skill is generated from the Vitest docs and is unopinionated. Use vitest for API help.
Information
updated Nov 2, 2026
- Repository
- antfu/skills
- Folder
skills/vitest
Sources
Docs, issue trackers and discussions this page is built from.
Show all 4Hide
- skills · github.com
- commands.md · github.com
- README.md · github.com
- SKILL.md · github.com