Borrowing it
Nothing to install: this file belongs to kavo-labs/kavo. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/kavo-labs/kavo/main/.claude/skills/write-tests/SKILL.mdgit clone --depth 1 https://github.com/kavo-labs/kavoWrote 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/kavo-labs/kavo/write-tests)<a href="https://agentmods.dev/skills/kavo-labs/kavo/write-tests"><img src="https://agentmods.dev/badge/skills/kavo-labs/kavo/write-tests/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/kavo-labs/kavo/write-tests"><img src="https://agentmods.dev/badge/skills/kavo-labs/kavo/write-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.00056 | $0.01281 |
| Opus 5.5 | $0.00022 | $0.00512 |
| Sonnet 5.5 | $0.00011 | $0.00256 |
| Haiku 4.5 | $0.00006 | $0.00128 |
Grade A, and why
write-tests 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.
How it starts
The opening of the file, as written. The whole thing — 110 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing tests for Kavo
Placement and setup
- Tests go in each package's
tests/directory — never insrc/, so they are not shipped indist/. The layout is flat:packages/core/tests/*.spec.ts, with shared fixtures inpackages/core/tests/support/. - Vitest aliases
@kavo/*to packagesrc/(seevitest.config.ts), so tests import the package by name and exercise sources directly. Never import fromdist/. - The SWC vitest plugin is mandatory: TypeORM entities and Nest DI need decorator metadata that esbuild cannot emit. If a test loses metadata unexpectedly, suspect the transform before the logic.
pnpm test # whole monorepo
pnpm vitest run packages/core/tests/filter-parser.spec.ts # one file
pnpm vitest run -t "coerces JavaScript number syntax" # one test by name
Reuse the fixtures
Check packages/core/tests/support/ before building anything: there are
existing entity fixtures (user-fixture.ts, blog-fixture.ts,
account-fixture.ts) and shared query cases. A new ad-hoc entity in a spec file
is usually a fixture that already exists.
Test through the real seams
Kavo is built from injected seams — handlers, serializer/deserializer, query normalizer, pagination strategies, error handler. Prefer driving the real engine with a test adapter over mocking the pipeline. A test that mocks the thing it is testing passes when the implementation is wrong.
Assert observable behavior, not internals. Call counts, private fields and the order of injected seams break on every refactor and catch no bugs.
The cases a change must pin down
For each behavior you add or change, write the test that would fail if it silently regressed:
- Happy path — the intended result, with the full shape asserted, not
toBeDefined(). - Validation — rejected input produces the right rejection, not a crash.
- Error path — assert the thrown
*Exceptiontype and itsKAVO_SNAKE_CASEcode. The code is a public contract; asserting only the message lets the code drift silently. - Edge cases — empty results,
nullvs. absent, boundary pagination values, the field-path recursion cap (ADR-0008), unknown include paths, non-allowlisted filter fields, disabled operations. - Regression — a bugfix without a test that fails against the old code is unfinished. Write that test first and watch it fail.
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 · -3 tokens per session a38a2f7dd193
- 1mo ago First seen · 110 lines · 59 tokens per session scan A 8cbad024ef6c
write-tests is a skill published in the GitHub repository kavo-labs/kavo (17 stars, last pushed today), licensed MIT. It adds 56 tokens to every session and 1,281 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-09-02.
Other skills, from other repositories
github-copilot-upgrader
Use this to update the Github Copilot CLI/SDK.
typescript
TypeScript strict mode with eslint and jest.
nestjs
Use when building or structuring a NestJS backend — feature modules, providers and DI wiring, provider scopes and request-lifecycle order, where to bind guards/pipes/interceptors/filters, and testing with Test.createTestingModule. NOT a bare Express/Fastify service with no DI (that is nodejs), NOT framework-agnostic…
authoring-data-quality-checks
Adds and runs data quality checks (dbt-test style assertions) on a project's warehouse tables and saved-query views, and HogQL catalog metrics: not-null, uniqueness, accepted values, referential integrity, row-count bounds, freshness, and custom HogQL. Metrics support custom SQL checks only. Use when asked to test a…
write-tests
Add or update PHPUnit tests using this repository's E2E, functional, integration, and unit test conventions.
jest-unit
Unit testing skill using Jest for TypeScript and JavaScript, covering mocking, spies, snapshots, coverage, async testing, and custom matchers.