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/kavo-labs/kavo/write-testsnpx skills add kavo-labs/kavo --skill write-testsgit 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.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.00059 | $0.01283 |
| Opus 5 | $0.00030 | $0.00642 |
| Sonnet 5 | $0.00012 | $0.00257 |
| 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 3d 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.
- 3d 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 (12 stars, last pushed today), licensed Apache-2.0. It adds 59 tokens to every session and 1,283 once invoked, about $0.0003 per session on Opus 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
pest-testing
Use this skill for Pest PHP testing in Laravel projects only. Trigger whenever any test is being written, edited, fixed, or refactored — including fixing tests that broke after a code change, adding assertions, converting PHPUnit to Pest, adding datasets, and TDD workflows. Always activate when the user asks how to…
test-writer
Generate comprehensive Vitest tests for code examples in JavaScript concept documentation pages, following project conventions and referencing source lines.
completion-rule
大模型代码生成任务的自动自检与纠错规则。 在代码输出后强制执行功能自测、单元测试设计和 Linter 检查。 未通过则自动修正并循环,直到全部通过或达到最大迭代次数。 适用于大模型生成或修改代码且要求正确、可测试、规范的场景。 支持 Python、TypeScript、Go、Java,语言规则通过 references 加载。.
noodle-use
Teach agents to create, organize, maintain, evaluate, import, convert, and automate noodle terminal REST client collections using supported CLI commands plus YAML and dotenv files.
refactor
Refactor Java code in this repo without changing behavior. Not for bug fixes or new features.
ocli-api
Turn any OpenAPI/Swagger API into CLI commands and call them. Search endpoints with BM25, check parameters, execute — no MCP server needed.