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 contract-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/contract-test)<a href="https://agentmods.dev/skills/tmj-90/gaffer/contract-test"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/contract-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/contract-test"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/contract-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.00088 | $0.01278 |
| Opus 5.5 | $0.00035 | $0.00511 |
| Sonnet 5.5 | $0.00018 | $0.00256 |
| Haiku 4.5 | $0.00009 | $0.00128 |
Grade A, and why
contract-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 16d 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 — 93 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Write a contract test for a boundary
A contract test pins the agreement at a boundary so either side can change safely: the provider proves it still produces what consumers rely on; the consumer proves it still handles what the provider produces. It catches "we renamed a field and broke the mobile app" before deploy, without a slow end-to-end environment.
A contract test checks the shape and meaning of messages, not side effects. Pact's
own guidance: contract tests are not functional tests of the provider — whether the order
was actually persisted, or every validation rule, belongs in the provider's own
integration tests (the add-integration-test skill). Mixing them makes contracts brittle
and still leaves the behaviour untested.
Procedure
- Name the boundary and every consumer. Identify the provider (API, producer,
exported module) and each consumer:
grepthe repo, callsearch_lorefor declared boundaries, andfind_dependents(Memory MCP) where the repo map has them. The contract is the union of what consumers actually use, not everything the provider emits. - Find the existing contract artefact and test against it: OpenAPI/JSON Schema,
protobuf/Avro, a Pact directory or broker, a shared TypeScript type package, a versioned
event schema. If none exists, the test becomes the contract and you should propose
committing a schema (the
openapi-contractskill for HTTP). - Choose the style that fits.
- Consumer-driven (Pact): both sides are under your control, consumers are identifiable, and the provider can set up state per interaction ("given a user Mary exists"). The consumer test generates the pact; the provider verifies it against the real service with provider states.
- Schema-based: public or many-consumer APIs, or a provider you cannot seed through anything but the API under test. Validate real responses against the published schema; consumers validate against the same schema.
- Write the provider side. Call the real handler/publisher with each consumer-relied request and validate the response or message: field presence, types, enums, nullability, pagination and error envelopes (RFC 9457 problem details if the repo uses them), status codes. Cover error responses — consumers branch on them.
- Write the consumer side when the consumer lives here: feed it the provider's examples (from the schema or recorded from the real provider, never hand-typed guesses) and assert it parses and behaves, including an unknown extra field, which it must ignore (tolerant reader).
- Match loosely, assert what matters. Use type/regex matchers for values the consumer does not branch on (ids, timestamps); exact values only where the consumer depends on them (an enum, a status). Over-specified contracts break on harmless changes.
- Make the compatibility rules executable — one test each:
- removed or renamed field, narrowed enum, changed type, changed status code → FAIL;
- new optional field, widened enum the consumer tolerates → PASS.
- Version when you must break. Follow the
api-versioningskill: a new version beside the old, contract tests pinned to both, a deprecation note. When another repo consumes the contract, raiserequest_decisionbefore changing it. (Independent tester: you never change a contract or raiserequest_decision; followblack-box-testand record a break as a FAIL finding.) - Run in the same command CI runs, then record evidence with the
record-evidenceskill (test_output): the contract file or tests touched and which consumers they protect. Publishing to a Pact broker andcan-i-deployare CI's job; you have no broker credentials and no deploy step.
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.
- 16d ago Changed · +30 lines · +14 tokens per session 21b0ab8c8af6
- 19d ago First seen · 63 lines · 74 tokens per session scan A 0dbbbcdf1991
contract-test is a skill published in the GitHub repository tmj-90/gaffer (2 stars, last pushed 17d ago), licensed Apache-2.0. It adds 88 tokens to every session and 1,278 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-09-28.
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.
test-classification
Prompt template for test classification stage in Test Audit pipeline.
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.