vitest

vitest is a skill for Claude Code from martineserios/thebrana. It costs 33 tokens per session (961 once invoked), scanned A, original, MIT.

A JavaScript and TypeScript tool for unit testing, which checks small pieces of code in isolation. It works with Vite, a frontend build tool, and uses an interface familiar to Jest users.

In plain words
What is it for?
Writing and filtering tests, using mocks and fixtures, testing TypeScript or JSX, taking snapshots, and measuring coverage.
Why use it?
It helps developers run focused tests, replace outside dependencies with test doubles, check code coverage, and rerun only affected tests.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the brana plugin — 56 skills, 4 commands, 14 agents, 13 hooks shipped together

Good fit Writing and filtering tests, using mocks and fixtures, testing TypeScript or JSX, taking snapshots, and measuring coverage.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/martineserios/thebrana/vitest
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add martineserios/thebrana --skill vitest
Clone the repo
git clone --depth 1 https://github.com/martineserios/thebrana

Made for: Claude Code.

Or install brana, the plugin that ships this one along with the rest of its 56 skills, 4 commands, 14 agents, 13 hooks.

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/martineserios/thebrana/vitest/github.svg)](https://agentmods.dev/skills/martineserios/thebrana/vitest)
Your own site
<a href="https://agentmods.dev/skills/martineserios/thebrana/vitest"><img src="https://agentmods.dev/badge/skills/martineserios/thebrana/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/martineserios/thebrana/vitest"><img src="https://agentmods.dev/badge/skills/martineserios/thebrana/vitest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 961 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.
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.00033 $0.00961
Opus 5 $0.00016 $0.00481
Sonnet 5 $0.00007 $0.00192
Haiku 4.5 $0.00003 $0.00096

Measured 9d ago against content hash ea40ed6b3f47, 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 9d 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.

system/skills/acquired/vitest/SKILL.md · 60 lines

How it starts

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

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 3.x, generated at 2026-01-28.

Core

Topic Description Reference
Configuration Vitest and Vite config integration, defineConfig usage core-config (upstream references/core-config.md, not installed locally)
CLI Command line interface, commands and options core-cli (upstream references/core-cli.md, not installed locally)
Test API test/it function, modifiers like skip, only, concurrent core-test-api (upstream references/core-test-api.md, not installed locally)
Describe API describe/suite for grouping tests and nested suites core-describe (upstream references/core-describe.md, not installed locally)
Expect API Assertions with toBe, toEqual, matchers and asymmetric matchers core-expect (upstream references/core-expect.md, not installed locally)
Hooks beforeEach, afterEach, beforeAll, afterAll, aroundEach core-hooks (upstream references/core-hooks.md, not installed locally)

Features

Topic Description Reference
Mocking Mock functions, modules, timers, dates with vi utilities features-mocking (upstream references/features-mocking.md, not installed locally)
Snapshots Snapshot testing with toMatchSnapshot and inline snapshots features-snapshots (upstream references/features-snapshots.md, not installed locally)
Coverage Code coverage with V8 or Istanbul providers features-coverage (upstream references/features-coverage.md, not installed locally)
Test Context Test fixtures, context.expect, test.extend for custom fixtures features-context (upstream references/features-context.md, not installed locally)
Concurrency Concurrent tests, parallel execution, sharding features-concurrency (upstream references/features-concurrency.md, not installed locally)
Filtering Filter tests by name, file patterns, tags features-filtering (upstream references/features-filtering.md, not installed locally)

Read the full file on GitHub · 60 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. 9d ago First seen · 60 lines · 33 tokens per session scan A ea40ed6b3f47

Subscribe to this mod's changes

vitest is a skill published in the GitHub repository martineserios/thebrana (3 stars, last pushed yesterday), licensed MIT. It adds 33 tokens to every session and 961 once invoked, about $0.0002 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-08-31.