kavo: Skill for Claude Code

.claude/skills/write-tests/SKILL.md

write-tests is a skill for Claude Code from kavo-labs/kavo. It costs 56 tokens per session (1,281 once invoked), scanned A, original, MIT.

A guide for writing tests in the Kavo monorepo, a repository containing several related packages. It covers where tests belong, how the test tools are configured, and which shared fixtures to reuse.

In plain words
What is it for?
Use it when adding or changing tests in Kavo's core, TypeORM, or Nest packages, including running the full suite, one file, or one test by name.
Why use it?
It prevents tests from being placed in shipped code and helps them run against the real package setup, including framework metadata.

Skill for Claude Code

Written for Claude Code: installed under .claude/.

This is kavo-labs/kavo's own configuration. It tells Claude Code how to work on kavo itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything kavo configures →

Reuse

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.

Copy the file
curl -O https://raw.githubusercontent.com/kavo-labs/kavo/main/.claude/skills/write-tests/SKILL.md
Clone the repo
git clone --depth 1 https://github.com/kavo-labs/kavo

Made for: Claude Code.

Wrote 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.

agentmods badge for write-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/kavo-labs/kavo/write-tests/github.svg)](https://agentmods.dev/skills/kavo-labs/kavo/write-tests)
Your own site
<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.

agentmods 80×15 button for write-tests

Your own site · 80×15
<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>
Per session 56 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,281 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 1mo ago against content hash a38a2f7dd193, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

.claude/skills/write-tests/SKILL.md · 110 lines

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 in src/, so they are not shipped in dist/. The layout is flat: packages/core/tests/*.spec.ts, with shared fixtures in packages/core/tests/support/.
  • Vitest aliases @kavo/* to package src/ (see vitest.config.ts), so tests import the package by name and exercise sources directly. Never import from dist/.
  • 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 *Exception type and its KAVO_SNAKE_CASE code. The code is a public contract; asserting only the message lets the code drift silently.
  • Edge cases — empty results, null vs. 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.

Read the full file on GitHub · 110 lines

Changes

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.

  1. 1mo ago Changed · -3 tokens per session a38a2f7dd193
  2. 1mo ago First seen · 110 lines · 59 tokens per session scan A 8cbad024ef6c

Subscribe to this mod's changes

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.