add-integration-test

add-integration-test is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 69 tokens per session (778 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

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/tmj-90/gaffer/add-integration-test
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.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.svg" alt="Measured on agentmods" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 778 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.00069 $0.00778
Opus 5 $0.00034 $0.00389
Sonnet 5 $0.00014 $0.00156
Haiku 4.5 $0.00007 $0.00078

Measured 5d ago against content hash d27a3d6ca807, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, 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 5d 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 · 55 lines

How it starts

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

Add an integration test

Add a test that exercises real wiring between components — the seams a unit test mocks away — matching the repo's existing integration setup, not a new harness.

Steps

  1. Read the lore first. Call search_lore (Memory MCP) for the repo's integration-test conventions: how the test DB/containers are provisioned, fixtures, and where these tests live (they're often separated from unit tests).
  2. Find an existing integration test and copy its bootstrap — the test client, DB setup/teardown, seeding, and how external services are stubbed at the boundary. Use real collaborators internally; stub only true externals (third-party APIs).
  3. Enumerate the flow from the ticket/AC: the entry point, the path through the components, and the observable outcome (HTTP status + body, persisted row, emitted event). Cover the happy path plus at least one failure path.
  4. Write the test in the repo's integration location and convention, with proper setup/teardown so it's isolated and repeatable. Assert on real outcomes, not internals.
  5. Run it with the repo's integration command (see the context packet; it may differ from the unit test script). Iterate until green and stable.
  6. Evidence: the command + passing summary and the new test paths. Then use the record-evidence skill to record test_output against the AC and submit for review.

SQLite isolation (this repo)

The packages/memory suite talks to a real SQLite DB (better-sqlite3). Copy its isolation conventions rather than inventing new ones:

  • Fresh DB per test, in-memory. A newDb() helper builds each one from scratch — new BetterSqlite3(":memory:"), then db.pragma("foreign_keys = ON"), then runMigrations(db) — so every test starts on the current schema with no leaked rows. Prefer this over sharing one DB across a file.
  • When you need a real on-disk DB (path handling, WAL, openDb()), create it under a temp dir in beforeEachmkdtempSync(join(tmpdir(), "memory-<area>-")) — and tear it down in afterEach with rmSync(dir, { recursive: true, force: true }). openDb(path) already applies migrations and pragmas, so use it instead of hand-rolling setup.
  • Keep foreign_keys = ON so the test exercises the same referential constraints production does; a test that silently drops them can pass on data the app would reject.
  • One DB lifecycle per test (beforeEach/afterEach), never a module-level singleton — that's what keeps runs order-independent and repeatable.

Read the full file on GitHub · 55 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. 5d 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 5d ago), licensed Apache-2.0. It adds 69 tokens to every session and 778 once invoked, about $0.0003 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-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

agent-browser

Automates browser interactions for web testing, form filling, screenshots, and data extraction. Use when the user needs to navigate websites, interact with web pages, fill forms, take screenshots, test web applications, or extract information from web pages.

nek1987/auto-agent-harness · 51 tokens

browser-testing-with-screenshots

Use when testing web applications with visual verification - automates Chrome browser interactions, element selection, and screenshot capture for confirming UI functionality.

nek1987/auto-agent-harness · 32 tokens

agent-production-validator

Agent skill for production-validator - invoke with $agent-production-validator.

ruvnet/ruflo · 16 tokens

develop-web-game

Use when Codex is building or iterating on a web game (HTML/JS) and needs a reliable development + testing loop: implement small changes, run a Playwright-based test script with short input bursts and intentional pauses, inspect screenshots/text, and review console errors with rendergametotext.

netease-youdao/LobsterAI · 64 tokens

write-frontend-tests

Analyze the current branch diff against dev, plan integration tests for changed frontend pages/components, and write them. TRIGGER when user asks to write frontend tests, add test coverage, or 'write tests for my changes'.

Significant-Gravitas/AutoGPT · 48 tokens