vitest
Skill1 starsChanged 3 months agoMITView on GitHub
Build, review, debug, configure, migrate, teach, or plan Vitest testing with current docs and a full usage guide. Use for vitest, vitest.config, defineConfig from vitest/config, describe/it/test/expect, vi mocks, snapshots, coverage (@vitest/coverage-v8), browser mode (@vitest/browser-playwright), projects, pools/maxWorkers, reporters, UI, bench, typecheck, and Jest or Vitest 3 to Vitest 4 migration.
54 other projects use a version of this.
Adopted by
Most recently taken up by
- Inrixia/TidaLunatheir own version, first seen Nov 29, 2026
- oberemokis/skillstheir own version, first seen Nov 29, 2026
- meza/skillstheir own version, first seen Nov 29, 2026
- Ghost7802/awesome-api-skillstheir own version, first seen Nov 29, 2026
- marcioaltoe/skillstheir own version, first seen Nov 29, 2026
- fedeya/wisp-aitheir own version, first seen Nov 29, 2026
Used with
Projects with it also use nitro, react-hook-form and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
SentrySkillnitro
Build and deploy universal JavaScript servers with Nitro v3. Use when working with nitro.config.ts, defineNitroConfig, defineHandler, defineConfig, server.ts entry, filesystem routing, route rules, useStorage, defineCachedHandler, useDatabase, definePlugin, runtime hooks, Vercel/Cloudflare deployment, or migrating from Nitro v2/nitropack.
Also in 5 projects that use this
SupabaseSkillreact-hook-form
Correct React Hook Form usage anywhere in the monorepo — data flow, subscriptions,
Also in 3 projects that use this
midudevSkilltailwind-css-patterns
Provides comprehensive Tailwind CSS utility-first styling patterns including responsive design, layout utilities, flexbox, grid, spacing, typography, colors, and modern CSS best practices. Use when styling React/Vue/Svelte components, building responsive layouts, implementing design systems, or optimizing CSS workflow.
Also in 4 projects that use this
xenitV1Skillnodejs-best-practices
Node.js development principles and decision-making. Framework selection, async patterns, security, and architecture. Teaches thinking, not copying.
Also in 5 projects that use this
VercelSkillnext-cache-components
Next.js 16 Cache Components - PPR, use cache directive, cacheLife, cacheTag, updateTag
Also in 4 projects that use this
nicepkgSkilltailwind-v4-shadcn
Production-tested setup for Tailwind CSS v4 with shadcn/ui, Vite, and React.
Also in 3 projects that use this
Other versions54 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 54
- supabase/supabase★ 116ksame name
- prowler-cloud/prowler★ 15ksame name
- joe-bell/cva★ 6.9ksame name
- antfu/skills★ 6.1ksame name
- TheEdoRan/next-safe-action★ 3.1ksame name
- compozy/compozy★ 2.9ksame name
- midudev/tailwind-animations★ 1.5ksame name
- sanity-io/next-sanity★ 955same name
- onmax/nuxt-skills★ 731same name
- pedronauck/skills★ 659same name
44 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository81 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agents-mdSkill
- base-uiSkill
- better-authSkill
- brainstormSkill
- bullmqSkill
- bunSkill
- clickhouseSkill
- clone-to-tempSkill
- compound-uiSkill
- copywritingSkill
- create-durable-planSkill
- d3Skill
- date-fnsSkill
- decimal-jsSkill
- deduplicateSkill
- design-engineerSkill
- designSkill
- drizzle-ormSkill
- effectSkill
- elysia-architectureSkill
- elysiaSkill
- evlogSkill
- feedsmithSkill
- grokSkill
- handoffSkill
- heyapiSkill
- impitSkill
- intlayerSkill
- jsdocSkill
- kafkaSkill
- kill-legacySkill
- legend-stateSkill
- loopSkill
- mantine-hooksSkill
- mobbinSkill
- motionSkill
- oxfmtSkill
- oxlintSkill
- permixSkill
- plain-languageSkill
- playwrightSkill
- react-boundariesSkill
- react-emailSkill
- reactSkill
- reorganizeSkill
- researchSkill
- schema-dtsSkill
- sentrySkill
- seoSkill
- setup-competitors-mdSkill
- setup-copywriting-mdSkill
- setup-icp-mdSkill
- setup-project-mdSkill
- simplify-layoutSkill
- storybookSkill
- subagentsSkill
- tailwindSkill
- tailwind-variantsSkill
- takumiSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 13 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Use this skill when work touches Vitest: writing/running tests, config, mocks/snapshots, coverage, browser mode, projects/pools, reporters, …
- Very specific: line 24
Prefer Vitest 4.x APIs (projects, maxWorkers, browser provider factories).
- Very specific: line 25
Verify with the narrowest useful command (vitest run path -t "name", coverage, or browser project).
- Very specific: line 31
Import from vitest unless globals: true.
- Very specific: line 34
Default pool is forks. Prefer it over threads when native addons misbehave.
- Distinctive: line 42
Prefer repository-owned commands.
“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Vitest
Use this skill when work touches Vitest: writing/running tests, config, mocks/snapshots, coverage, browser mode, projects/pools, reporters, or migrating from Jest / Vitest 3.
Workflow
- Inspect the local Vitest surface:
- Package versions:
vitestand aligned@vitest/*(snapshot 4.1.10). Node^20 || ^22 || >=24. Vite peer^6 || ^7 || ^8. - Config: dedicated
vitest.config.*(overridesvite.configentirely) vstest: {}inside Vite config. - Scripts: prefer
vitest runfor CI; do not usebun test(Bun’s runner) when the project uses Vitest — usebun run test/bunx vitest. - Environment:
node(default) vsjsdom/happy-domvs Browser Mode projects.
- Package versions:
- For day-to-day how-to, follow usage-guide.md first.
- Refresh docs when versions drift or the task is browser/coverage/migration. Start from source-map.md.
- Route deeper detail:
- Config, CLI, test API, environments, setup: config-cli-api.md.
vimocks, timers, env stubs, snapshots: mocking-snapshots.md.- Coverage, browser mode, projects, pools, reporters: coverage-browser-projects.md.
- Jest / Vitest 3 → 4: migration.md.
- Prefer Vitest 4.x APIs (
projects,maxWorkers, browser provider factories). Keep@vitest/*packages on the same version asvitest. - Verify with the narrowest useful command (
vitest run path -t "name", coverage, or browser project).
Core Judgment
- Vitest is a Vite-powered test runner with a Jest-compatible API — not Bun’s built-in
bun test. - CI / hooks: always
vitest run(or--run). Plainvitestwatches and hangs non-interactively unless CI/non-TTY forces run. - Import from
vitestunlessglobals: true. Prefer explicit imports for agent clarity. vi.mock/vi.hoistedare hoisted — factories cannot close over non-hoisted locals.- Concurrent tests + snapshots/asserts: use context
expectfrom the test callback, not globalexpect. - Default pool is
forks. Prefer it overthreadswhen native addons misbehave. - A dedicated
vitest.config.*ignoresvite.configoptions — usemergeConfigwhen extending Vite plugins/aliases. - Coverage is root-only in projects; set
coverage.includeexplicitly (v4 no longer hascoverage.all). - Browser Mode is not
environment: 'jsdom'— usebrowser.enabled+ provider packages. - Vite transforms tests but does not typecheck — use optional
typecheckor projecttscseparately.
Verification
Prefer repository-owned commands. For meaningful Vitest work, cover the relevant subset:
bunx vitest --versionand confirm@vitest/*version alignment.- Focused
vitest run <file> -t "<name>"(or:linefilter). - Snapshot updates only with deliberate
-u/ watchu; review diffs. - Coverage:
vitest run --coveragewhen thresholds or reports matter. - Browser project: headless chromium smoke when UI/component tests change.
- Migration: no remaining
workspace, string browser providers,poolOptions, ortest(name, fn, options).
Report which checks ran, which did not, and any Vitest version assumptions that remain.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

