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-integration-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-integration-test)<a href="https://agentmods.dev/skills/tmj-90/gaffer/add-integration-test"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/add-integration-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-integration-test"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/add-integration-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.00091 | $0.01374 |
| Opus 5.5 | $0.00036 | $0.00550 |
| Sonnet 5.5 | $0.00018 | $0.00275 |
| Haiku 4.5 | $0.00009 | $0.00137 |
Grade A, and why
add-integration-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 — 91 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Add an integration test
Integration tests exercise the real wiring a unit test mocks away: the route, the store, the file system, the second process. In live runs, two builds shipped the same class of defect past every review — concurrent writers colliding on temp-file names (HTTP 500), unsynchronised read-modify-write losing updates, and a time-only stale-lock lease that lost an acknowledged write when the holder was paused. Every one passed a happy-path test. For any criterion about persistence, concurrency or failure, the schedule is the test.
Procedure
- Read the lore and copy the harness. Call
search_lorefor integration-test conventions (how the test DB, containers or temp dirs are provisioned, where these tests live, the integration command). Find an existing integration test and reuse its bootstrap: test client, setup/teardown, seeding. Do not stand up a new harness. - Map each AC to an observable outcome at the boundary: HTTP status + body, a row read back, a file's contents, an emitted event, an exit code. Name each test after the AC it proves. A test that only shows "the endpoint returns 200" does not prove "saves the note" — read the note back.
- Use real collaborators inside the boundary (database, file system, queue, your own services); fake only true externals you do not own (third-party APIs) at their network edge. A narrow integration test covers one integration point; prefer several narrow ones to one sprawling journey.
- Cover the happy path, then the failure paths the AC implies: invalid input, conflict, not-found, dependency unavailable.
- When an AC concerns persistence, concurrency or failure, run the real schedule —
real processes, real files in a temp dir, injected faults:
- Concurrent writers: fire 10–20 real operations at the same resource at once
(
Promise.allover real HTTP requests, or N spawned CLI processes) and repeat the burst several times — races are probabilistic. Assert: no 5xx or crash; the number of acknowledged writes equals what reads back (N increments → N); the store still parses; no stray temp or lock files. - Durability: write, stop the process (clean, then
SIGKILL), start a new one on the same data, read back. Every acknowledged write survives. - Crash mid-operation: kill the process during a write loop; after restart the state is the old or new value, never partial.
- Paused holder: for locks, leases or leader election,
SIGSTOPthe holder past the timeout, let another writer take over,SIGCONTthe first; its late write must be rejected (fencing token or version check) and no acknowledged write lost. - Injected faults: read-only directory, corrupt or missing data file, closed port for a dependency, a transaction that throws halfway. Assert the documented error and an uncorrupted store.
- Concurrent writers: fire 10–20 real operations at the same resource at once
(
- Isolate every run. Fresh database or temp directory per test, free ports (bind to port 0), explicit teardown that also kills spawned processes. Poll for readiness with a deadline; never a fixed sleep.
- Prove the test bites. Temporarily break the behaviour (skip the lock, write in place
instead of temp-file-and-rename, drop the fsync or transaction), confirm the test fails,
restore it and check
git diff. A concurrency test that passes against the unguarded code is not testing concurrency — raise the parallelism or tighten the schedule. (An independent tester never edits implementation files and skips this step.) - Run the repo's integration command (the context packet's; it may differ from the
unit
testscript) once when the tests are complete and once more after a fix — a race test repeats its burst inside the test, not by re-running the command. Then use therecord-evidenceskill: onetest_outputrow per AC with the command, the summary, and the schedule exercised. The runner submits for review, not you. (An independent tester keeps theblack-box-testbudget — one run, one more after fixing its own test — and recordsmanual_notes.)
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 · +36 lines · +22 tokens per session fafb9ff83cf6
- 1mo ago First seen · 55 lines · 69 tokens per session scan A d27a3d6ca807
add-integration-test is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 20d ago), licensed Apache-2.0. It adds 91 tokens to every session and 1,374 once invoked, about $0.0004 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-fixture-creation
Guidelines for creating unbiased test fixtures that integrate with project infrastructure. Use when creating fixtures for manual testing, setting up E2E test scenarios, or building code samples with deliberate issues for LLM review. Ensures fixtures work with hook automation and pass Phase 1 checks.
test-reporting
Run the Level 2 dummy agent integration test suite and produce a detailed HTML report with per-test input → outcome analysis.
browser-testing
Methodology for writing and maintaining DorkOS browser tests. Use when writing, running, debugging, or maintaining Playwright browser tests in apps/e2e, when deciding between a browser test and a unit test, or when e2e behavior needs verification.
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.