vitest

vitest is a skill for Claude Code from jezweb/claude-skills. It costs 87 tokens per session (3,089 once invoked), scanned A, original, MIT.

A setup workflow for Vitest, a JavaScript and TypeScript test runner. It detects the project type, creates test configuration and supporting files, and adds an example test.

In plain words
What is it for?
Use it to configure tests for React, Node, libraries, or Cloudflare Workers, including mocks, coverage, workspaces, and Jest migration.
Why use it?
It removes much of the manual work needed to start testing or move a project from Jest to Vitest.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: positional $N argument.

Needs its repository: it reads a path above its own folder, which exists only inside the repository. The line is import { app } from "../index";.

Part of the dev-tools plugin — 16 skills, 14 commands shipped together

not rated 999repo +6 2mo ago A scan Socket: passSnyk: passSkillSpector: pass 87 tokens original MIT

Good fit Use it to configure tests for React, Node, libraries, or Cloudflare Workers, including mocks, coverage, workspaces, and Jest migration.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/jezweb/claude-skills
agentmods
npx agentmods add skills/jezweb/claude-skills/vitest

Made for: Claude Code.

Or install dev-tools, the plugin that ships this one along with the rest of its 16 skills, 14 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for vitest

README.md
[![agentmods](https://agentmods.dev/badge/skills/jezweb/claude-skills/vitest/github.svg)](https://agentmods.dev/skills/jezweb/claude-skills/vitest)
Your own site
<a href="https://agentmods.dev/skills/jezweb/claude-skills/vitest"><img src="https://agentmods.dev/badge/skills/jezweb/claude-skills/vitest/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for vitest

Your own site · 80×15
<a href="https://agentmods.dev/skills/jezweb/claude-skills/vitest"><img src="https://agentmods.dev/badge/skills/jezweb/claude-skills/vitest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 87 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,089 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket pass 14 May 2026
  • Snyk pass 14 May 2026
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00087 $0.03089
Opus 5 $0.00044 $0.01545
Sonnet 5 $0.00017 $0.00618
Haiku 4.5 $0.00009 $0.00309

Measured 6d ago against content hash bcb50ff99faf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

vitest scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/dev-tools/skills/vitest/SKILL.md · 456 lines

How it starts

The opening of the file, as written. The whole thing — 456 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Vitest Setup

Detect the project type, generate the right Vitest configuration, and produce working test infrastructure. Not a reference card — this skill creates files.

Workflow

  1. Detect — scan the project to determine type and existing setup
  2. Configure — generate vitest.config.ts tailored to the environment
  3. Scaffold — create test setup, utilities, and a sample test
  4. Wire up — add package.json scripts and TypeScript config

Step 1: Detect Project Type

Read these files to determine the project:

package.json          → dependencies, scripts, type field
tsconfig.json         → paths, compiler options
wrangler.toml         → Cloudflare Workers project
vite.config.ts        → existing Vite setup (extend, don't replace)
vitest.config.ts      → already configured? just fill gaps
jest.config.*         → migration candidate
src/                  → source structure

Classify as one of:

Type Signals Environment
Cloudflare Workers wrangler.toml, @cloudflare/workers-types, cloudflare vite plugin node with Workers-specific setup
React (Vite) @vitejs/plugin-react, react-dom jsdom or happy-dom
React (SSR/TanStack Start) @tanstack/start, vinxi Split: node for server, jsdom for client
Node/Hono API hono, express, no react-dom node
Library exports field, no framework deps node

If a vite.config.ts already exists, extend it rather than creating a separate vitest.config.ts — Vitest reads Vite config natively.

Step 2: Install Dependencies

Generate the install command based on detected type:

# Base (always)
pnpm add -D vitest

# React projects — add jsdom and Testing Library
pnpm add -D @vitest/coverage-v8 jsdom @testing-library/react @testing-library/jest-dom @testing-library/user-event

# Workers projects — add Cloudflare test utilities
pnpm add -D @vitest/coverage-v8 @cloudflare/vitest-pool-workers

# Node/Hono projects
pnpm add -D @vitest/coverage-v8

# If migrating from Jest, also remove:
pnpm remove jest ts-jest @types/jest jest-environment-jsdom babel-jest

Read the full file on GitHub · 456 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 456 lines · 87 tokens per session scan A bcb50ff99faf

Subscribe to this mod's changes

vitest is a skill published in the GitHub repository jezweb/claude-skills (999 stars, last pushed 2mo ago), licensed MIT. It adds 87 tokens to every session and 3,089 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

test-fixing

Run tests and systematically fix all failing tests using smart error grouping. Use when user asks to fix failing tests, mentions test failures, runs test suite and failures occur, or requests to make tests pass.

mhattingpete/claude-skills-marketplace · 44 tokens

accessibility-testing

Skill "accessibility-testing" from vibeeval/vibecosystem, covering accessibility testing, axe-core setup, jest-axe (unit / component tests), playwright-axe (e2e) and cypress-axe.

vibeeval/vibecosystem · 31 tokens

test-coverage-improver

Analyze test coverage gaps and generate tests to improve coverage. Use when improving test coverage, finding untested code, or writing missing tests.

OneWave-AI/claude-skills · 34 tokens

jacoco

Check JaCoCo code coverage for a Maven/Java project against a gate, then drill into per-module, per-class, and per-line gaps to target tests. Use when the user says "what's our test coverage", "check coverage", "which classes need tests", "are we above the coverage gate", or is planning tests to reach a threshold.

alexmond/alexmskills · 75 tokens

testing-guide

A testing guide covering common testing levels, including unit, integration, system, and end-to-end testing. It also supports ISTQB and industry testing-pyramid approaches.

ValorVie/custom-skills · 81 tokens

writing-tests

Write unit, integration, and E2E tests that follow the testing pyramid, the Arrange-Act-Assert pattern, the shouldXwhenY naming convention, and meet a 75% (target 80%) branch coverage gate per supported OS. Use when the user asks to write tests, add coverage, build a test suite, fix flaky tests, or verify a feature…

Cristhianzl/claude-skills-czl · 103 tokens