ia-writing-tests

ia-writing-tests is a skill for Claude Code from iliaal/whetstone. It costs 49 tokens per session (950 once invoked), scanned A, original, MIT.

A general guide for writing useful automated tests with real assertions and the project's own test setup. It explains how to find the correct test runner and commands before adding tests.

In plain words
What is it for?
Use it when adding test coverage, writing new tests, or fixing failing tests in any programming language or framework.
Why use it?
It reduces tests that cannot fail, test only mocks instead of real behavior, or pass locally but fail in continuous integration, where CI is the automated build system.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the whetstone plugin — 32 skills, 22 commands, 19 agents, 1 hook, 1 MCP server shipped together

Good fit Use it when adding test coverage, writing new tests, or fixing failing tests in any programming language or framework.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/iliaal/whetstone/ia-writing-tests
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.

Any agent
npx skills add iliaal/whetstone --skill ia-writing-tests
Clone the repo
git clone --depth 1 https://github.com/iliaal/whetstone

Made for: Claude Code.

Or install whetstone, the plugin that ships this one along with the rest of its 32 skills, 22 commands, 19 agents, 1 hook, 1 MCP server.

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

README.md
[![agentmods](https://agentmods.dev/badge/skills/iliaal/whetstone/ia-writing-tests/github.svg)](https://agentmods.dev/skills/iliaal/whetstone/ia-writing-tests)
Your own site
<a href="https://agentmods.dev/skills/iliaal/whetstone/ia-writing-tests"><img src="https://agentmods.dev/badge/skills/iliaal/whetstone/ia-writing-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 ia-writing-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/iliaal/whetstone/ia-writing-tests"><img src="https://agentmods.dev/badge/skills/iliaal/whetstone/ia-writing-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 950 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.
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.00049 $0.00950
Opus 5 $0.00024 $0.00475
Sonnet 5 $0.00010 $0.00190
Haiku 4.5 $0.00005 $0.00095

Measured 3d ago against content hash fd5d5650ac4d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

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

plugins/whetstone/skills/ia-writing-tests/SKILL.md · 41 lines

How it starts

The opening of the file, as written. The whole thing — 41 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Writing tests

Produce tests that prove the requested behavior and fail when that behavior breaks. Follow user scope and the repository's actual contracts; this skill does not authorize implementation, external actions, or changes to acceptance criteria.

Procedure

  1. Discover the repository's runner, pinned wrapper, configuration, neighboring tests, and CI command before writing tests. Learn both focused and full-suite commands. Use project tooling rather than a global default; keep tracked scripts portable and apply personal wrappers only to the outer invocation.
  2. Derive cases from user requirements, implemented behavior, and claims intended for the handoff. Map each acceptance criterion to a discriminating case that a plausible wrong implementation fails. Name tests by observable behavior; keep one behavior per test and make fixtures adversarial on the axis under test.
  3. For bug fixes, write the reproducer, observe the intended failure, apply the smallest fix, and observe green. For new features, develop tests alongside the implementation. Refactor after green. Never alter a specification, assertion, fixture, snapshot, or expected output merely to make the implementation pass.
  4. Prefer real internal objects, real temporary files, and real test databases. Mock only external boundaries, at the last owned adapter; framework-maintained fakes are appropriate where the framework recommends them. Check the real contract and side effects before mocking.
  5. Assert consumer-visible outcomes rather than private structure, mock calls, or framework behavior. Include relevant boundary, invalid-input, concurrency, and failure cases. If error handling catches, logs, substitutes, or rolls back, assert its observable result as well as error visibility.
  6. Prove absence/isolation assertions with a run-unique forbidden violation and observe that specific assertion fail. Confirm the control mutation actually landed and its build completed before evaluating it. Remove the control, restore the artifact, and verify green.
  7. Run the narrow checks during edits and the applicable complete checks before handoff. Inspect passed/executed counts; an empty or skipped suite is not positive evidence. Report failures and skipped checks accurately.

Read the full file on GitHub · 41 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. 3d ago Changed · -347 lines fd5d5650ac4d
  2. 4d ago First seen · 388 lines · 49 tokens per session scan A aa92eb5f1407

Subscribe to this mod's changes

ia-writing-tests is a skill published in the GitHub repository iliaal/whetstone (33 stars, last pushed 4d ago), licensed MIT. It adds 49 tokens to every session and 950 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-09-07.

Related

Other skills, from other repositories

experiment-review

Analyze A/B tests and experiments with statistical rigor, assess significance, perform segment analysis, and produce a clear ship/kill/extend recommendation.

shaan-ad/pm-os · 31 tokens

omh-verification-gate

This is a Hermes-native verification-gate workflow skill.

rlaope/oh-my-hermes · 76 tokens

brooks-sweep

Full-sweep mode: runs a unified analysis across all quality dimensions — code decay, architecture, tech debt, and test quality — then applies fixes directly to the codebase. Safe changes are auto-applied; risky changes are confirmed before execution. Drawing on twelve classic engineering books. Triggers when: user…

hyhmrright/brooks-lint · 178 tokens

brooks-test

Test quality review drawing on twelve classic engineering books — with primary focus on xUnit Test Patterns, The Art of Unit Testing, How Google Tests Software, and Working Effectively with Legacy Code — that diagnoses structural problems in an existing test suite: brittleness, mock abuse, coverage illusions, slow…

hyhmrright/brooks-lint · 161 tokens

crap-analyzer

Use to produce a risk-based refactor + test plan for recently-changed code on a diff/branch/PR by computing CRAP (complexity × untested) on changed methods. Multi-language — TypeScript, JavaScript, Python, Java, Kotlin, Go, Ruby, C#, Rust, PHP — auto-discovers how the repo generates coverage. Triggers …

swingerman/engineer · 109 tokens

pre-ship-review

Run a structured quality review before shipping code at any checkpoint such as PRs, releases, or milestones. Use whenever the user says.

terrylica/cc-skills · 32 tokens