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.
npx agentmods add skills/xobotyi/cc-foundry/vitestnpx skills add xobotyi/cc-foundry --skill vitestgit clone --depth 1 https://github.com/xobotyi/cc-foundryWrote 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.
[](https://agentmods.dev/skills/xobotyi/cc-foundry/vitest)<a href="https://agentmods.dev/skills/xobotyi/cc-foundry/vitest"><img src="https://agentmods.dev/badge/skills/xobotyi/cc-foundry/vitest.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00047 | $0.06390 |
| Opus 5 | $0.00023 | $0.03195 |
| Sonnet 5 | $0.00009 | $0.01278 |
| Haiku 4.5 | $0.00005 | $0.00639 |
Grade B, and why
vitest scanned grade B with 2 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 yesterday.
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.
Strips warnings and disclaimersmediumAnti-refusal
Omitting safety caveats hides risk from the user and is a common jailbreak preamble.
When **reviewing** tests, cite the violation and show the fix inline. Do not lecture. Runs shell commandslowCapability
Expected in a hook, worth knowing in a rule or an instructions file.
`vi.useFakeTimers({ toFake: ["nextTick"] }) is not supported in node:child_process. Use --pool=threads if mocking nextTick is required.` How it starts
The opening of the file, as written. The whole thing — 355 lines — stays where its author put it; the contents beside it link to each section on GitHub.
A test earns its place by failing when the behavior breaks, and at no other time. Three biases decide most calls:
- Mock the boundary, never the unit under test. Every mock asserts that the real thing cannot run here. Most such assertions are false, and each false one buys a test that keeps passing after the code is wrong.
- Prefer a fixture to a hook.
test.extendinitializes on demand, tears down in its own scope, and declares its dependencies in the signature. AbeforeEachruns for every test in scope whether that test needs it or not. - The installed major decides what may be written, not the shape recalled from an older one.
Version and Toolchain
Vitest 4 is the target. Read the installed version out of the lockfile before touching a config file — the configuration surface moved in 3.2, 4.0 and 4.1, and a key from the wrong one is silently ignored or loudly rejected.
Vitest 4.1 requires Node ^20 || ^22 || >=24 and Vite ^6 || ^7 || ^8. Vitest 4.0 shipped requiring Vite 6 and Node
20; 4.1 added Vite 8 and uses the installed vite rather than a bundled copy.
What changed, by version. Every removal below is rejected or ignored under Vitest 4; the 4.1 entries are additions and need 4.1 installed.
- 3.2 —
workspacedeprecated in favor ofprojects; fixture scopes (test,file,worker) added; AST-aware v8 coverage remapping added behindcoverage.experimentalAstAwareRemapping - 4.0 —
workspaceremoved;poolOptions.*flattened to top level;maxThreads/maxForksbecamemaxWorkers;singleThread/singleForkbecamemaxWorkers: 1, isolate: false;minWorkersremoved;coverage.allandcoverage.extensionsremoved;environmentMatchGlobsandpoolMatchGlobsremoved;deps.external/deps.inlinemoved underserver.deps; browser providers became separate packages taking a factory; thebasicreporter and the pre-3.0 reporter hooks removed; the third-argument options object ontestanddescriberemoved - 4.1 —
aroundEachandaroundAllhooks; thetest.extendbuilder pattern with type inference;test.override; test tags with--tags-filter;--detect-async-leaks;vi.defineHelper;vi.setTimerTickMode;experimental.viteModuleRunner
Read [${CLAUDE_SKILL_DIR}/references/configuration.md] when reconciling a config written against an older major — it
carries the rename inventory entry by entry, each with the major that made the change.
What ships with it
10 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.
- .dev/reference-inventory.json 6.5 KB
- references/browser-mode.md 5.4 KB
- references/configuration.md 12 KB
- references/coverage.md 5.2 KB
- references/fixtures-and-lifecycle.md 8.6 KB
- references/jest-migration.md 5.3 KB
- references/matchers.md 6.7 KB
- references/mocking.md 10 KB
- references/snapshots.md 4.3 KB
- references/type-testing.md 4.1 KB
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.
- yesterday Changed · +166 lines · +1 tokens per session 49f7067fff80
- 5d ago First seen · 189 lines · 46 tokens per session scan B d8685a34df2d
vitest is a skill published in the GitHub repository xobotyi/cc-foundry (20 stars, last pushed 2d ago), licensed MIT. It adds 47 tokens to every session and 6,390 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (strips warnings and disclaimers, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other skills, from other repositories
run-helix-tests
Submit and monitor .NET MAUI unit tests on Helix infrastructure. Supports running XAML, Resizetizer, Core, Essentials, and other unit test projects on distributed Helix queues.
migrate-xunit-to-xunit-v3
Migrate .NET test projects from xUnit.net v2 to xunit.v3 and fix v3 breaks. Use for package/CPM conversion, OutputType=Exe, preserving the VSTest or MTP runner (including projects currently using YTest.MTP.XUnit2), incompatible TFMs, async void tests, string-to-Type attributes, custom Fact/Theory/BeforeAfterTest…
nunit-testing
Use when writing or modifying tests in NUnit's own test projects, or when making a behavioral change to production code that needs test coverage. Covers test structure, attribute choice, helper visibility, platform guards, and which test projects are real.
detect-flaky-tests
Detects flaky Go tests by analyzing GitHub Actions workflow runs across the last 7 days and all PRs — covering both the run-tests job (unit/integration) and the e2e-test job (gVisor and microVM lanes). For each newly-detected flaky test or infra issue, opens a GitHub issue with full evidence and a draft fix PR. Does…
go-testing
Trigger: Go tests, go test coverage, Bubbletea teatest, golden files. Apply focused Go testing patterns.
add-go-test
Write or extend Go unit tests in this repo. Use when the user asks to add or update Go tests.