add-integration-test

add-integration-test is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 91 tokens per session (1,374 once invoked), scanned A, original, Apache-2.0.

A test for a complete path through multiple real software components, such as an API request, database operation, and returned result. Unlike a unit test, it checks how components work together.

In plain words
What is it for?
Use it to test API routes with databases, service-to-service calls, migrations with queries, and other multi-step flows, including success and failure cases.
Why use it?
It catches wiring and integration problems that isolated tests using mocks can miss.

Skill for Claude CodeCodex

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

Good fit Use it to test API routes with databases, service-to-service calls, migrations with queries, and other multi-step flows, including success and failure cases.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmj-90/gaffer/add-integration-test
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 tmj-90/gaffer --skill add-integration-test
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

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 add-integration-test

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/add-integration-test/github.svg)](https://agentmods.dev/skills/tmj-90/gaffer/add-integration-test)
Your own site
<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.

agentmods 80×15 button for add-integration-test

Your own site · 80×15
<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>
Per session 91 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,374 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.00091 $0.01374
Opus 5.5 $0.00036 $0.00550
Sonnet 5.5 $0.00018 $0.00275
Haiku 4.5 $0.00009 $0.00137

Measured 20d ago against content hash fafb9ff83cf6, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

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.

runner/skills/add-integration-test/SKILL.md · 91 lines

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

  1. Read the lore and copy the harness. Call search_lore for 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.
  2. 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.
  3. 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.
  4. Cover the happy path, then the failure paths the AC implies: invalid input, conflict, not-found, dependency unavailable.
  5. 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.all over 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, SIGSTOP the holder past the timeout, let another writer take over, SIGCONT the 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.
  6. 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.
  7. 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.)
  8. Run the repo's integration command (the context packet's; it may differ from the unit test script) 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 the record-evidence skill: one test_output row per AC with the command, the summary, and the schedule exercised. The runner submits for review, not you. (An independent tester keeps the black-box-test budget — one run, one more after fixing its own test — and records manual_notes.)

Read the full file on GitHub · 91 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. 20d ago Changed · +36 lines · +22 tokens per session fafb9ff83cf6
  2. 1mo ago First seen · 55 lines · 69 tokens per session scan A d27a3d6ca807

Subscribe to this mod's changes

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.

Related

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.

QBall-Inc/the-bulwark · 61 tokens

test-reporting

Run the Level 2 dummy agent integration test suite and produce a detailed HTML report with per-test input → outcome analysis.

aden-hive/hive · 0 tokens

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.

dork-labs/dorkos · 55 tokens

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.

QBall-Inc/the-bulwark · 0 tokens

mock-detection

Deep mock appropriateness analysis for Test Audit pipeline.

QBall-Inc/the-bulwark · 13 tokens

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.

QBall-Inc/the-bulwark · 38 tokens