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 skills add tmj-90/gaffer --skill add-unit-testgit clone --depth 1 https://github.com/tmj-90/gafferWrote 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/tmj-90/gaffer/add-unit-test)<a href="https://agentmods.dev/skills/tmj-90/gaffer/add-unit-test"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/add-unit-test/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.
<a href="https://agentmods.dev/skills/tmj-90/gaffer/add-unit-test"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/add-unit-test.svg" alt="Reviewed on agentmods" width="80" 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.00067 | $0.01148 |
| Opus 5.5 | $0.00027 | $0.00459 |
| Sonnet 5.5 | $0.00013 | $0.00230 |
| Haiku 4.5 | $0.00007 | $0.00115 |
Grade A, and why
add-unit-test 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 20d 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 — 83 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add a unit test
A unit test earns its place when it would fail if the behaviour the acceptance criterion names broke (Kent Beck's "behavioural" and "structure-insensitive" test desiderata). The recurring defect in live runs was not missing test files but tests that never exercised the criterion's own behaviour — they called the function and asserted something incidental, and the reviewer approved.
Procedure
- Find the unit and its existing tests. Locate the source file and any sibling test.
Read one or two existing tests to copy the framework, file naming, location and
assertion style (Vitest/Jest/
node:test/pytest/JUnit/go test). Callsearch_lorefor the repo's testing conventions. Never add a second framework or runner. - Map every AC to the behaviour that proves it. For each criterion write one line: input/state → action → observable outcome. That outcome is what the test asserts. An AC that says "rejects duplicate names" is proven by a duplicate being rejected, not by the create function returning something.
- Enumerate the cases per behaviour: the happy path, each branch the AC implies,
boundary values (0, 1, max, max+1, empty, unicode), and each documented error. If the
AC is a rule over many inputs ("round-trips", "never throws"), add a property test
(the
property-based-testskill). - Write the tests. One behaviour per test, Arrange-Act-Assert, a name that states the
behaviour (
rejects a duplicate name with 409). Include the AC id or wording in the test or describe name so the reviewer can map test → criterion. Use real collaborators when they are fast and deterministic (a "sociable" unit test); substitute only slow, non-deterministic or external ones (network, clock, randomness, filesystem when not the subject). - Prove each test can fail (the break-it check). For every AC test, temporarily break
the behaviour — invert the condition, return early, drop the write — run the test, see
it fail for the right reason, then undo the edit and confirm
git diffshows only your intended changes. A test that stays green against broken code is deleted or rewritten. (This is manual mutation testing; where the repo has Stryker/mutmut/PIT, run it on the unit instead. An independent tester never edits implementation files and skips this.) - Run the repo's test command from the context packet's verification commands, not the tool directly. Iterate until green. If a test reveals a real bug, fix it only when the ticket scopes it; otherwise note it.
- Evidence and stop. Use the
record-evidenceskill: onetest_outputrow per AC naming the command, the pass summary and the test(s) that prove that AC. The runner — not you — submits for review.
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.
- 20d ago Changed · +33 lines · +13 tokens per session eb780738ef4c
- 1mo ago First seen · 50 lines · 54 tokens per session scan A b2038c9ba652
add-unit-test is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 20d ago), licensed Apache-2.0. It adds 67 tokens to every session and 1,148 once invoked, about $0.0003 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-08-31.
Other skills, from other repositories
test-audit
Audit test suites for T1-T4 violations using AST analysis, mock detection, and multi-stage synthesis. Invoke when user asks to audit tests, check test quality, find mock violations, review test effectiveness, or inspect test suites for over-mocking. Triggers automatic rewrites when quality gates fail.
mock-detection
Deep mock appropriateness analysis for Test Audit pipeline.
bug-magnet-data
Curated edge case test data for boundary testing, verification scripts, and test generation. Provides pre-curated reference data organized by data type with context-specific loading guidance.
assertion-patterns
Real output verification vs mock calls. Use when transforming T1-T4 violating tests to verify observable behavior.
fix-bug
Run the Fix Validation pipeline to investigate, fix, and validate a bug. Ensures deterministic pipeline execution with IssueAnalyzer, FixWriter, TestWriter (conditional), TestAudit (conditional), and FixValidator stages.
test-classification
Prompt template for test classification stage in Test Audit pipeline.