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 skills add monkilabs/opencastle --skill vitest-testinggit clone --depth 1 https://github.com/monkilabs/opencastleWrote 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/monkilabs/opencastle/vitest-testing)<a href="https://agentmods.dev/skills/monkilabs/opencastle/vitest-testing"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/vitest-testing/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.
<a href="https://agentmods.dev/skills/monkilabs/opencastle/vitest-testing"><img src="https://agentmods.dev/badge/skills/monkilabs/opencastle/vitest-testing.svg" alt="Reviewed on agentmods" width="80" 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.00038 | $0.00518 |
| Opus 5.5 | $0.00015 | $0.00207 |
| Sonnet 5.5 | $0.00008 | $0.00104 |
| Haiku 4.5 | $0.00004 | $0.00052 |
Grade A, and why
vitest-testing 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 1mo 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.
What it actually says
Vitest Testing
Project test configuration: .opencastle/stack/testing-config.md. Coverage thresholds, environment and setup files: the project's vitest.config.* (or the test block of vite.config.*) — read them, never assume a number.
Running
vitestalone starts watch mode in a terminal and never exits. Agents runvitest run [file] [-t "name"].- Type tests (
*.test-d.ts,expectTypeOf) run withvitest --typecheck(orvitest run --typecheck). The oldvitest typechecksubcommand is gone since 1.0. - Coverage:
vitest run --coverage. Below threshold → read the uncovered lines in the text report, add tests for those branches, re-run.
Mocking gotchas
-
vi.mock()is hoisted above every import, so its factory cannot use variables declared in the file. Declare them withvi.hoisted():const { getUser } = vi.hoisted(() => ({ getUser: vi.fn() })) vi.mock('./database', () => ({ getUser })) -
Partial mock:
vi.mock('./config', async (importOriginal) => ({ ...(await importOriginal<typeof import('./config')>()), API_URL: 'http://test' })). -
vi.spyOn(namespace, 'fn')on a module's export misses calls made inside that module, and fails in Browser Mode; mock the module instead. -
vi.restoreAllMocks()only restoresvi.spyOnspies (Vitest 3+). It does not resetvi.fn()call history; usevi.clearAllMocks(), orrestoreMocks/clearMocksin the config, so state cannot leak between tests. -
Fake timers:
vi.useFakeTimers()inbeforeEach,vi.useRealTimers()inafterEach; advance withvi.advanceTimersByTime(ms)orawait vi.advanceTimersByTimeAsync(ms)when promises are involved. -
One file needs a DOM in a
nodeproject:// @vitest-environment jsdomon its first line.
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.
- 1mo ago Changed · -133 lines · -2 tokens per session a1d7947d5698
- 1mo ago First seen · 163 lines · 40 tokens per session scan A c98fe36d64eb
vitest-testing is a skill published in the GitHub repository monkilabs/opencastle (82 stars, last pushed 10d ago), licensed MIT. It adds 38 tokens to every session and 518 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-10-04.
vitest-testing compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| vitest-testingmonkilabs/opencastle | Skill | 82 | 10d ago | MIT | A | 38 | Claude Code, Codex |
| testing-pyramidrrezartprebreza/spring-boot-skills | Skill | 370 | 13d ago | MIT | A | 44 | Claude Code, Codex |
| testing-patternsDDS-Solutions/AI-TadPole-OS | Skill | 9 | 4d ago | MIT | A | 32 | Claude Code |
| product-architectankitjha67/product-architect | Skill | 118 | 2mo ago | MIT | A | 253 | Claude Code, Codex |
| cursor-promptingzebbern/agent-collab | Skill | 35 | 2mo ago | Apache-2.0 | A | 31 | Claude Code |
| goal-runnerzebbern/agent-collab | Skill | 35 | 2mo ago | Apache-2.0 | A | 62 | Claude Code |
| cursor-result-handlingzebbern/agent-collab | Skill | 35 | 2mo ago | Apache-2.0 | A | 16 | Claude Code |