Official agent skill

Vitest

by supabase in supabase/supabase

Vitest API and config reference (Jest-compatible) — mocking with vi., spies, fake timers, coverage configuration, fixtures, snapshots, and test filtering.

OfficialApache-2.0Auto-check passedTesting & QA

Install Vitest

skills CLI
$ npx skills add supabase/supabase --skill vitest -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install supabase/supabase vitest --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/supabase/supabase.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/vitest .claude/skills/vitest && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
vitest
GitHub stars
111k
Used in
12 other repos
Token cost
~1.1k tokens
SKILL.md length
261 words
Files
18 (incl. references)
Skills in repo
22
Repo updated
First seen
Licence
Apache-2.0

At a glance

Vitest API and config reference (Jest-compatible) — mocking with vi., spies, fake timers, coverage configuration, fixtures, snapshots, and test filtering.

  • Vitest API and configuration questions anywhere in the monorepo
  • SKILL.md covers Core, Features and Advanced
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • For Studio-specific test strategy and component-test setup

What it does

Vitest is an agent skill from supabase/supabase, published by the product's own GitHub organization. Vitest API and config reference (Jest-compatible) — mocking with vi., spies, fake timers, coverage configuration, fixtures, snapshots, and test filtering. Use for Vitest API and configuration questions anywhere in the monorepo; for Studio-specific test strategy and component-test setup, start with studio-testing and studio-mock-api-tests.

Its SKILL.md is about 1.1k tokens, which your agent loads only when the skill is triggered. The skill folder holds 18 other files, including reference files (for example `GENERATION.md`, `references/advanced-environments.md` and `references/advanced-projects.md`).

It sits in Testing & QA, covering Unit testing. It works with Vitest, Jest and Vite. The repository describes itself as: The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications. The licence is Apache-2.0.

When your agent uses it

  • Vitest API and configuration questions anywhere in the monorepo
  • For Studio-specific test strategy and component-test setup
  • Start with studio-testing and studio-mock-api-tests

Example prompts

  • “/vitest”

What it can do on your machine

Read from SKILL.md and the folder at commit 26c838a. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Vitest loads about 1.1k tokens when it runs, and up to ~18k if it reads all its reference files. Until then it costs about 87 tokens; SKILL.md has 261 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~87
When it runs · the whole SKILL.md, loaded when a task matches
~1.1k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~18k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from supabase/supabase at commit 26c838a, republished under its Apache-2.0 licence (© supabase). 261 words, ~1,090 tokens.

Download SKILL.mdSave it as .claude/skills/vitest/SKILL.md (or your agent's skills folder). This skill also uses 17 other files; get the full folder from GitHub.
name
vitest
description
Vitest API and config reference (Jest-compatible) — mocking with vi.*, spies, fake timers, coverage configuration, fixtures, snapshots, and test filtering. Use for Vitest API and configuration questions anywhere in the monorepo; for Studio-specific test strategy and component-test setup, start with studio-testing and studio-mock-api-tests.
metadata.author
Anthony Fu
metadata.version
2026.1.28
metadata.source
Generated from https://github.com/vitest-dev/vitest, scripts located at https://github.com/antfu/skills

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

TopicDescriptionReference
ConfigurationVitest and Vite config integration, defineConfig usagecore-config
CLICommand line interface, commands and optionscore-cli
Test APItest/it function, modifiers like skip, only, concurrentcore-test-api
Describe APIdescribe/suite for grouping tests and nested suitescore-describe
Expect APIAssertions with toBe, toEqual, matchers and asymmetric matcherscore-expect
HooksbeforeEach, afterEach, beforeAll, afterAll, aroundEachcore-hooks

Features

TopicDescriptionReference
MockingMock functions, modules, timers, dates with vi utilitiesfeatures-mocking
SnapshotsSnapshot testing with toMatchSnapshot and inline snapshotsfeatures-snapshots
CoverageCode coverage with V8 or Istanbul providersfeatures-coverage
Test ContextTest fixtures, context.expect, test.extend for custom fixturesfeatures-context
ConcurrencyConcurrent tests, parallel execution, shardingfeatures-concurrency
FilteringFilter tests by name, file patterns, tagsfeatures-filtering

Advanced

TopicDescriptionReference
Vi Utilitiesvi helper: mock, spyOn, fake timers, hoisted, waitForadvanced-vi
EnvironmentsTest environments: node, jsdom, happy-dom, customadvanced-environments
Type TestingType-level testing with expectTypeOf and assertTypeadvanced-type-testing
ProjectsMulti-project workspaces, different configs per projectadvanced-projects

© supabase, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 17 other files (references) in .agents/skills/vitest of supabase/supabase.

  • SKILL.md
  • GENERATION.md
  • references/advanced-environments.md
  • references/advanced-projects.md
  • references/advanced-type-testing.md
  • references/advanced-vi.md
  • references/core-cli.md
  • references/core-config.md
  • references/core-describe.md
  • references/core-expect.md
  • references/core-hooks.md
  • references/core-test-api.md
  • references/features-concurrency.md
  • references/features-context.md
  • references/features-coverage.md
  • references/features-filtering.md
  • references/features-mocking.md
  • references/features-snapshots.md

Open the folder on GitHubat commit 26c838a

Used in 12 other repositories

We found 12 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 12 other GitHub owners. This page covers the copy in supabase/supabase, which our catalogue first saw on October 8, 2026.

Compare with similar skills

Vitest next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Vitest compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Vitest this skillsupabase/supabase111k12 repos~1.1kAutomated safety check: PassApache-2.0
Testing FundamentalsDanielPodolsky/ownyourcode2901 repos~1.5kAutomated safety check: PassMIT
Vitest Skillsickn33/agentic-awesome-skills47k1 repos~1.2kAutomated safety check: PassMIT
Vitestjezweb/claude-skills1.1k—~3kAutomated safety check: PassMIT
Tech Trend Watchmizchi/skills356—~1.8kAutomated safety check: PassNone
Test GuardamElnagdy/guard-skills1.3k2 repos~2.1kAutomated safety check: PassMIT

Similar skills

  • Testing Fundamentals

    DanielPodolsky/ownyourcode

    Guides test strategy for unit, integration, and E2E testing.

    290 GitHub starsUsed in 1 repo~1.5k tokens
    Testing & QAAuto-check passed
  • Vitest Skill

    sickn33/agentic-awesome-skills

    Generates Vitest tests in JavaScript/TypeScript with Vite-native speed.

    47k GitHub starsUsed in 1 repo~1.2k tokens
    Testing & QAAuto-check passed
  • Vitest

    jezweb/claude-skills

    Set up Vitest testing in any project — detects type (Cloudflare Workers, React, Node, library), generates vitest.config.ts, test setup, utilities, and a sample test.

    1.1k GitHub stars~3k tokensUpdated 2 days ago
    Testing & QAAuto-check passed
  • Tech Trend Watch

    mizchi/skills

    Long-term technology stack review using State of JS, State of CSS, and Thoughtworks Technology Radar — satisfaction×usage matrix, ADOPT/TRIAL/ASSESS/HOLD mapping, P0–P3 migration priority.

    356 GitHub stars~1.8k tokensUpdated 6 days ago
    Testing & QAAuto-check passed
  • Test Guard

    amElnagdy/guard-skills

    Reviews newly written or edited tests against nine rules that cut test bloat, such as mock-heavy checks and near-duplicate cases, before they are committed.

    1.3k GitHub starsUsed in 2 repos~2.1k tokens
    Testing & QAAuto-check passed
  • Vitest

    pixel-point/animate-text

    Vitest testing framework patterns for test setup, async testing, mocking with vi., snapshots, and test performance (formerly test-vitest).

    149 GitHub starsUsed in 2 repos~1.3k tokens
    Testing & QAAuto-check passed

More from supabase/supabase

All 22 skills in this repo
  • Official

    React composition patterns that scale. An agent skill from supabase/supabase.

    111k GitHub starsUsed in 59 repos~726 tokens
    Auto-check passed
  • Clickhouse Logs Queries

    supabase/supabase

    Official

    Write, review, and migrate Supabase logs queries against the ClickHouse-backed logs table (the logs.all.otel analytics endpoint).

    111k GitHub stars~2.4k tokensUpdated today
    Auto-check passed
  • Review The Docs

    supabase/supabase

    Official

    Review Supabase docs changes locally in your supabase/supabase checkout — either an open PR (triage, classify, verify) or your own branch before opening a PR (local self-review).

    111k GitHub stars~4.6k tokensUpdated today
    Auto-check passed
  • Safe SQL Execution

    supabase/supabase

    Official

    A skill your agent uses whenever code will build, return, fetch, or execute SQL that runs against a user's real Postgres database — even when the request reads like an ordinary feature or bug fix…

    111k GitHub stars~4.2k tokensUpdated today
    Auto-check passed
  • Studio E2E Tests

    supabase/supabase

    Official

    Write and run Playwright E2E tests for Supabase Studio (e2e/studio).

    111k GitHub stars~2.8k tokensUpdated today
    Auto-check passed
  • Studio Error Handling

    supabase/supabase

    Official

    Error display and troubleshooting pattern for Supabase Studio.

    111k GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Works with

Categories

Questions about Vitest

What does Vitest do?

Vitest API and config reference (Jest-compatible) — mocking with vi., spies, fake timers, coverage configuration, fixtures, snapshots, and test filtering. Vitest is an agent skill from supabase/supabase, published by the product's own GitHub organization., spies, fake timers, coverage configuration, fixtures, snapshots, and test filtering.

When should I use Vitest?

Vitest fits situations like: vitest API and configuration questions anywhere in the monorepo; for Studio-specific test strategy and component-test setup; start with studio-testing and studio-mock-api-tests.

How do I install Vitest in Claude Code?

Run `npx skills add supabase/supabase --skill vitest -a claude-code`. Or copy the skill folder (.agents/skills/vitest in supabase/supabase) into .claude/skills/vitest in your project. Claude Code loads it when a task matches its description.

How do I install Vitest in Codex?

Run `npx skills add supabase/supabase --skill vitest -a codex`. Or copy the skill folder (.agents/skills/vitest in supabase/supabase) into .agents/skills/vitest in your project. Codex loads it when a task matches its description.

Can I use Vitest in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add supabase/supabase --skill vitest -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/vitest, .gemini/skills/vitest, .github/skills/vitest and .opencode/skills/vitest in your project.

What does Vitest need to run?

SKILL.md names no scripts, command-line tools or credentials: Vitest is instructions for the agent only.

Does Vitest access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Vitest safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Vitest use?

Vitest is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Vitest use?

About 1.1k tokens (SKILL.md is roughly 4.4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 17k tokens, read only when the agent opens those files.

What are the alternatives to Vitest?

Skills that share tags, products or a category with Vitest: Testing Fundamentals (DanielPodolsky/ownyourcode, 290 stars), Vitest Skill (sickn33/agentic-awesome-skills, 47k stars), Vitest (jezweb/claude-skills, 1.1k stars) and Tech Trend Watch (mizchi/skills, 356 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Vitest?

supabase (a GitHub organization, an official publisher) maintains it in supabase/supabase, which has 111,222 GitHub stars. The repository holds 22 skills in this directory. The repository was last updated on October 8, 2026.

Source: supabase/supabase on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.