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/clubpay/ronykit/writing-testsnpx skills add clubpay/ronykit --skill writing-testsgit clone --depth 1 https://github.com/clubpay/ronykitWrote 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/clubpay/ronykit/writing-tests)<a href="https://agentmods.dev/skills/clubpay/ronykit/writing-tests"><img src="https://agentmods.dev/badge/skills/clubpay/ronykit/writing-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.00047 | $0.00545 |
| Opus 5 | $0.00023 | $0.00272 |
| Sonnet 5 | $0.00009 | $0.00109 |
| Haiku 4.5 | $0.00005 | $0.00055 |
Grade A, and why
writing-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 6d 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 — 65 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Writing Tests
Test behavior, not implementation. A good test fails only when the contract breaks, and tells you exactly what broke.
When to use
- Before/while writing new behavior (TDD), or backfilling tests for legacy code
(read
working-with-legacy-codewhen there is no safety net yet). - Deciding what deserves a test and at which level.
- A bug was found — write the failing test first, then fix it.
The test pyramid
- Unit (most): pure logic, fast, no I/O. Milliseconds.
- Integration (some): real boundaries — DB, queue, HTTP — wired together.
- End-to-end (few): full system through the public interface.
Push assertions down to the cheapest level that still proves the behavior.
TDD loop
- Red — write the smallest failing test for the next behavior.
- Green — write the least code to pass it.
- Refactor — clean up with tests green.
Commit at green. Never refactor and change behavior in the same step.
What makes a test valuable
- Tests behavior, not internals. Assert on observable outputs and effects, not private fields or call counts (avoid over-mocking).
- One reason to fail. Each test pins one behavior; the name says which.
- Deterministic. No reliance on time, ordering, network, or shared state.
- Readable. A reviewer understands the contract from the test alone.
- Fast. Slow suites get skipped; isolate slow tests behind tags/build flags.
Coverage
Coverage finds untested code; it does not prove correctness. Chase missing branches and error paths, not a percentage. A line covered without an assertion is not tested.
Anti-patterns
- Asserting implementation details that change during refactors.
- Tests that pass when the feature is broken (no real assertion).
- Mocking the thing under test, or mocking value objects.
- Shared mutable fixtures that couple unrelated tests.
- Snapshot tests so large nobody reviews the diff.
Checklist
- Each new behavior and each fixed bug has a test that fails without the change.
- Test names read as specifications.
- Suite is deterministic and runnable in isolation and in any order.
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.
- 6d ago First seen · 65 lines · 47 tokens per session scan A 4c2b8198d2d0
writing-tests is a skill published in the GitHub repository clubpay/ronykit (38 stars, last pushed 5d ago), licensed BSD-3-Clause. It adds 47 tokens to every session and 545 once invoked, about $0.0002 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-08-30.
Other skills, from other repositories
procedure
Vovk.ts procedures — atomic unit of server-side logic in Vovk project. Use whenever user asks to build ANYTHING producing or consuming data on server — page loading data ("users page", "dashboard", "product list"), endpoint, API handler, server action, form submission, controller, validation with Zod / Valibot /…
rpc
Vovk.ts RPC client — how vovk generate turns controllers into type-safe client modules, composed vovk-client vs segmented clients, call shape (apiRoot, params, body, query, meta, init, disableClientValidation, validateOnClient, interpretAs, transform, fetcher), customizing generation via outputConfig.imports.fetcher +…
tools
Building LLM tools with Vovk.ts — deriveTools() (procedures → tools), createTool() (standalone tools, no controller/procedure needed), @operation.tool({ name, title, description, hidden }) decorator, x-tool metadata, ToModelOutput.DEFAULT vs ToModelOutput.MCP formatters, the tools + toolsByName return shape, the meta…
mixins
Vovk.ts OpenAPI mixins — importing third-party OpenAPI 3.x schemas as typed client modules that share the same call signature as native Vovk RPC modules. Use whenever the user asks to "call a third-party API from my Vovk app", "mixin an OpenAPI schema", "import an OpenAPI spec as a client", "wrap an external service…
bundle
Vovk.ts vovk bundle CLI — packages composed TypeScript client as zero-dep publishable npm package. Covers bundle.build async fn, [email protected] recipe, outputConfig.origin / package / reExports / imports.validateOnClient: null, prebundleOutDir / outDir / keepPrebundleDir, --include/--exclude segments, --openapi- mixin…
decorators
Vovk.ts decorators — built-in (@prefix, @operation, @get/@post/@put/@patch/@del, .auto()) and custom via createDecorator. Covers authorization / auth decorators, middleware-style wrapping (pre-handler + post-handler logic), req.vovk.meta() for cross-decorator state, stacking order, the decorate() alternative for…