vitest

vitest is a skill for Claude Code from confluentinc/mcp-confluent. It costs 87 tokens per session (1,567 once invoked), scanned A, original, MIT.

A reference guide for Vitest, a JavaScript and TypeScript test runner, focused on creating test doubles such as mocks, spies, and stubs.

In plain words
What is it for?
It helps answer questions about Vitest mocking, assertions, fake timers, configuration, and test-runner behavior.
Why use it?
It reduces the need to search through testing documentation for the right API or configuration option.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

About the project

Confluent MCP Server is an open-source Model Context Protocol server that lets AI assistants interact with Confluent Cloud, Confluent Platform, and standalone Apache Kafka through natural language. Its tools cover Kafka, Flink SQL, Schema Registry, connectors, and Tableflow. The catalogue add-ons help agents operate and configure the server.

confluentinc/mcp-confluent · 167 stars · on GitHub

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.

agentmods
npx agentmods add skills/confluentinc/mcp-confluent/vitest
Any agent
npx skills add confluentinc/mcp-confluent --skill vitest
Clone the repo
git clone --depth 1 https://github.com/confluentinc/mcp-confluent

Made for: Claude Code.

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/confluentinc/mcp-confluent/vitest.svg)](https://agentmods.dev/skills/confluentinc/mcp-confluent/vitest)
Your own site
<a href="https://agentmods.dev/skills/confluentinc/mcp-confluent/vitest"><img src="https://agentmods.dev/badge/skills/confluentinc/mcp-confluent/vitest.svg" alt="Measured on agentmods" 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 1,567 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.01567
Opus 5 $0.00044 $0.00783
Sonnet 5 $0.00017 $0.00313
Haiku 4.5 $0.00009 $0.00157

Measured 6d ago against content hash 5f82171404fc, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, 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.

.claude/skills/vitest/SKILL.md · 144 lines

How it starts

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

Vitest Documentation Lookup

Look up Vitest APIs, patterns, and best practices via WebFetch against the official docs. Use this skill to answer questions about vi.*, mock instances, assertions, fake timers, and config options. Project-specific test conventions (naming, stubbing strategy, node-deps.ts pattern) live in .claude/rules/unit-tests.md - reference that rule rather than re-deriving the conventions.

Sources

Base URL: https://vitest.dev

Topic Path Use for
Getting started /guide/ General concepts, project setup, runner behavior
Mocking guide /guide/mocking Worked examples: modules, timers, dates, classes
Config reference /config/ vitest.config.ts options (restoreMocks, pool, coverage)
vi API /api/vi Top-level helpers (vi.fn, vi.spyOn, vi.mocked, timers)
Mock instance API /api/mock Methods on a Mock (.mockReturnValue, .mockImplementation)
Assertions /api/expect expect() matchers, argument matchers
Fake timers /api/vi#vi-usefaketimers vi.useFakeTimers, advanceTimersByTimeAsync
CLI /guide/cli vitest run, flags, watch mode

Process

  1. Determine the question type

    • API reference (exact signature, options, return type) → /api/* pages
    • Pattern guidance / worked examples → /guide/mocking or /guide/
    • Config option behavior → /config/
    • CLI flag / runner behavior → /guide/cli
  2. Check project rules first - read .claude/rules/unit-tests.md before fetching. It already documents: restoreMocks: true behavior, the node-deps.ts namespace pattern, createMockInstance, constructor-stub gotchas, and the vi.mock anti-pattern. Don't re-explain these; cite the rule and only fetch docs for anything beyond it.

Read the full file on GitHub · 144 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 · 144 lines · 87 tokens per session scan A 5f82171404fc

Subscribe to this mod's changes

vitest is a skill published in the GitHub repository confluentinc/mcp-confluent (167 stars, last pushed yesterday), licensed MIT. It adds 87 tokens to every session and 1,567 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-08-30.

Related

Other skills, from other repositories