writing-tests

writing-tests is a skill for Claude Code, Codex from clubpay/ronykit. It costs 47 tokens per session (545 once invoked), scanned A, original, BSD-3-Clause.

A language-independent approach to writing tests that check what software does, including test-driven development, or TDD: write a failing test, make it pass, then improve the code.

In plain words
What is it for?
Use it to choose between unit, integration, and end-to-end tests, add tests before new behavior, test bug fixes, and judge whether test coverage is useful.
Why use it?
It helps tests detect real behavior changes instead of merely matching internal implementation details, while keeping failures focused and understandable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Install

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.

agentmods
npx agentmods add skills/clubpay/ronykit/writing-tests
Any agent
npx skills add clubpay/ronykit --skill writing-tests
Clone the repo
git clone --depth 1 https://github.com/clubpay/ronykit

Made for: Claude Code, Codex.

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 writing-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/clubpay/ronykit/writing-tests.svg)](https://agentmods.dev/skills/clubpay/ronykit/writing-tests)
Your own site
<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>
Per session 47 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 545 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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.00047 $0.00545
Opus 5 $0.00023 $0.00272
Sonnet 5 $0.00009 $0.00109
Haiku 4.5 $0.00005 $0.00055

Measured 6d ago against content hash 4c2b8198d2d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

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.

ronyup/internal/skeleton/skills/writing-tests/SKILL.md · 65 lines

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-code when 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

  1. Unit (most): pure logic, fast, no I/O. Milliseconds.
  2. Integration (some): real boundaries — DB, queue, HTTP — wired together.
  3. End-to-end (few): full system through the public interface.

Push assertions down to the cheapest level that still proves the behavior.

TDD loop

  1. Red — write the smallest failing test for the next behavior.
  2. Green — write the least code to pass it.
  3. 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.

Read the full file on GitHub · 65 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. 6d ago First seen · 65 lines · 47 tokens per session scan A 4c2b8198d2d0

Subscribe to this mod's changes

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.

Related

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 /…

finom/vovk · 342 tokens

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 +…

finom/vovk · 354 tokens

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…

finom/vovk · 261 tokens

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…

finom/vovk · 275 tokens

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…

finom/vovk · 250 tokens

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…

finom/vovk · 228 tokens