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 lukasrepublic/agentic-foundry --skill vitest-unitgit clone --depth 1 https://github.com/lukasrepublic/agentic-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/lukasrepublic/agentic-foundry/vitest-unit)<a href="https://agentmods.dev/skills/lukasrepublic/agentic-foundry/vitest-unit"><img src="https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/vitest-unit/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/lukasrepublic/agentic-foundry/vitest-unit"><img src="https://agentmods.dev/badge/skills/lukasrepublic/agentic-foundry/vitest-unit.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.00000 | $0.01443 |
| Opus 5.5 | $0.00000 | $0.00577 |
| Sonnet 5.5 | $0.00000 | $0.00289 |
| Haiku 4.5 | $0.00000 | $0.00144 |
Grade A, and why
vitest-unit 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 2mo 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.
How it starts
The opening of the file, as written. The whole thing — 73 lines — stays where its author put it; the contents beside it link to each section on GitHub.
When to trigger
- Authoring a unit test for a function, React component, hook, or async handler.
- Coverage-gate work: ensuring the target package meets its coverage threshold.
- Snapshot review: deciding whether to update or reject a snapshot diff.
- Async-pattern test work: testing promises, async/await, timeouts, or event-driven code.
- Mock-strategy decisions: which layer to mock (module boundary vs. network boundary).
Procedure
-
Place test file colocated with implementation:
<file>.test.ts(non-React) or<file>.test.tsx(React components) in the same directory as the source file. This makes it obvious when a test is missing and prevents "lost test" drift. -
Test pyramid discipline: write many unit tests, fewer integration tests, fewest e2e tests. A unit test covers one function or component in isolation. If a test requires multiple real modules to be wired together, consider whether it should be an integration test.
-
Coverage threshold for the target package is
{{ profile.test_recipe.coverage_gate }}. Do not invent a threshold; use the profile's gate. Verify with the project's coverage run that the PR does not lower the threshold below the defined minimum. -
Snapshots only for stable serialization (config objects, API response shapes, serialized schemas). Never snapshot rendered React DOM — rendered output is brittle (class names, whitespace, auto-generated IDs change between builds). Replace DOM snapshots with role/testid assertions.
-
Async patterns: always
awaitreturned promises. Never use thedonecallback pattern (deprecated idiom; async/await is the supported form in Vitest). For timer-based code, usevi.useFakeTimers()+vi.runAllTimers(). -
Mocks via
vi.mockat the module boundary:vi.mock('../path/to/module')hoists the mock above imports. Scope mocks to the test file — never useglobalThisorvi.doMockfor cross-file state. Reset mocks between tests withvi.clearAllMocks()inafterEach.
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.
- 2mo ago First seen · 73 lines · 0 tokens per session scan A 6def233a3e20
vitest-unit is a skill published in the GitHub repository lukasrepublic/agentic-foundry (0 stars, last pushed 7d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,443 tokens. 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.
vitest-unit compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| vitest-unitlukasrepublic/agentic-foundry | Skill | 0 | 7d ago | MIT | A | 0 | Claude Code |
| proof-strategytonone-ai/tonone | Skill | 77 | 3d ago | MIT | A | 53 | Claude Code |
| proof-recontonone-ai/tonone | Skill | 77 | 3d ago | MIT | A | 50 | Claude Code |
| web3-testingwshobson/agents | Skill | 42k | 5d ago | MIT | A | 46 | Claude Code |
| temporal-python-testingwshobson/agents | Skill | 42k | 5d ago | MIT | A | 45 | Claude Code |
| principle-test-behavior-not-implementationmichael-denyer/pstack-claude | Skill | 4.3k | today | MIT | A | 50 | Claude Code |
| lens-metricstonone-ai/tonone | Skill | 77 | 3d ago | MIT | A | 68 | Claude Code |