vitest

vitest is a skill for Claude Code from fubits1/svelte-skills. It costs 49 tokens per session (1,821 once invoked), scanned A, original, MIT.

A set of instructions for configuring Vitest, a JavaScript and TypeScript test runner, including projects that run in Node.js or in a browser. It also covers browser testing with Playwright and Svelte.

In plain words
What is it for?
Use it when editing Vitest configuration, separating Node and browser test projects, upgrading Vitest packages, or debugging browser tests.
Why use it?
It helps avoid configuration conflicts, flaky browser tests, and assertions that check only whether something exists instead of whether it has the right result.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the svelte-5 plugin — 8 skills shipped together

Good fit Use it when editing Vitest configuration, separating Node and browser test projects, upgrading Vitest packages, or debugging browser tests.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/fubits1/svelte-skills/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 fubits1/svelte-skills --skill vitest
Clone the repo
git clone --depth 1 https://github.com/fubits1/svelte-skills

Made for: Claude Code.

Or install svelte-5, the plugin that ships this one along with the rest of its 8 skills.

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/fubits1/svelte-skills/vitest/github.svg)](https://agentmods.dev/skills/fubits1/svelte-skills/vitest)
Your own site
<a href="https://agentmods.dev/skills/fubits1/svelte-skills/vitest"><img src="https://agentmods.dev/badge/skills/fubits1/svelte-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/fubits1/svelte-skills/vitest"><img src="https://agentmods.dev/badge/skills/fubits1/svelte-skills/vitest.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,821 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.00049 $0.01821
Opus 5.5 $0.00020 $0.00728
Sonnet 5.5 $0.00010 $0.00364
Haiku 4.5 $0.00005 $0.00182

Measured 12d ago against content hash da0040a49e2d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 12d 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/svelte-5/skills/vitest/SKILL.md · 39 lines

How it starts

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

Vitest

Config

  • Docs: if unsure about an API, fetch https://vitest.dev/llms.txt. Do not guess
  • Config file: use vitest.config.{ts,mts,js,mjs} for test / test.projects. Vitest-only-in-vite.config merges badly with multiple projects and Storybook
  • Gate: no vitest.config.* but vite.config has test: (or no Vitest file), ask before adding projects or Storybook whether to introduce vitest.config.ts and move test out of Vite
  • Projects inherit the root (Vitest 5): inline test.projects get the root's plugins, resolve, optimizeDeps, and setupFiles; extends: false opts out. NEVER repeat an inherited root plugin inside a project: a second svelte() compiles components twice. Inheritance rules, sharedViteServer, tags: references/config-projects.md
  • Upgrade: bump all @vitest/* together. Vitest 4 to 5 breaking changes and post-upgrade cleanup: references/vitest-5-upgrade.md
  • browser.provider: import { playwright } from '@vitest/browser-playwright' to provider: playwright() (factory, not a string). Use import { page } from 'vitest/browser': not @vitest/browser/context
  • rune_outside_svelte: a rune "is only available inside .svelte and .svelte.js/ts files"; in browser mode, until the page has loaded Svelte's client runtime (a component, vitest-browser-svelte or an import from svelte itself, e.g. tick), a $state call shows ReferenceError: $state is not defined instead (the form in a node project is not covered here). Cause: the rune sits in a .js/.ts file without the .svelte. infix (foo.svelte.ts and foo.svelte.test.ts have it); rename it, update its imports, and for a test file check which project's include and exclude the new name matches. On Vite 8, a dependency's file must end in .svelte.js/.svelte.ts; report one that does not to the library. More in svelte-5:testing-svelte troubleshooting
  • optimizeDeps.exclude does not fix rune_outside_svelte on Vite 8: the file name decides whether vite-plugin-svelte compiles the runes, pre-bundled or not (pre-bundling uses Rolldown since Vite 8, esbuild before)
  • optimizeDeps.include: deps that trigger mid-test optimization (e.g. minisearch) to reduce flakes; once you list one msw entry point, list every one you import, or narrow frames with frame.protocol (svelte-5:msw). Symptoms, fixes and optimizeDeps.entries: references/flake-hygiene.md
  • Storybook: vitest.config.ts + storybookTest + browser playwright(): svelte-5:storybook-vitest, manual setup
  • Reports and coverage: file-reporter paths go in test.outputFile (reporter options beat the CLI; the HTML reporter takes outputDir); coverage thresholds take flat metric keys, a Jest-style global key enforces nothing: references/config-projects.md

Read the full file on GitHub · 39 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 12d ago Changed · +1 lines da0040a49e2d
  2. 1mo ago Changed · -119 lines scan C → A c3938939d1fa
  3. 2mo ago First seen · 157 lines · 49 tokens per session scan C 4a693f84f416

Subscribe to this mod's changes

vitest is a skill published in the GitHub repository fubits1/svelte-skills (10 stars, last pushed 12d ago), licensed MIT. It adds 49 tokens to every session and 1,821 once invoked, about $0.0002 per session on Opus 5.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.

Related

vitest compared with skills from other repositories

vitest next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
vitestfubits1/svelte-skillsSkill1012d agoMITA49Claude Code
verify-omnigentomnigent-ai/omnigentSkill11kyesterdayApache-2.0A100Claude Code, Codex
test-masterJeffallan/claude-skillsSkill12k7d agoMITA104Claude Code
eval-dataset-designbojieli/ai-agent-bookSkill57k29d agoApache-2.0A138Claude Code, Codex
dogfoodcallstack/agent-deviceSkill5.3kyesterdayMITA55Claude Code
cua-driverdavidondrej/skillsSkill4.3k3d agoMITA68Claude Code, Codex
test-warp-uiwarpdotdev/warpSkill66kyesterdayAGPL-3.0A55Claude Code