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 agentmods add skills/orlando-japan/claude-code-setting/contract-testingnpx skills add orlando-japan/claude-code-setting --skill contract-testinggit clone --depth 1 https://github.com/orlando-japan/claude-code-settingWrote 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/orlando-japan/claude-code-setting/contract-testing)<a href="https://agentmods.dev/skills/orlando-japan/claude-code-setting/contract-testing"><img src="https://agentmods.dev/badge/skills/orlando-japan/claude-code-setting/contract-testing.svg" alt="Measured on agentmods" 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 | $0.00028 | $0.00658 |
| Opus 5 | $0.00014 | $0.00329 |
| Sonnet 5 | $0.00006 | $0.00132 |
| Haiku 4.5 | $0.00003 | $0.00066 |
Grade A, and why
contract-testing 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 4d 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 — 55 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Contract testing
Integration tests between services are slow, flaky, and hard to run. Contract tests are the alternative: each side asserts the shape of the interface independently, and a CI check fails when they disagree.
The pattern
- Consumer writes a contract: "when I call
GET /users/:id, I expect a JSON object withid: string,email: string, andcreated_at: ISO8601." - Consumer tests run against a mock that enforces the contract. No real network.
- Provider pulls the contract and runs a verification test: "can my real
GET /users/:idsatisfy that contract?" - If either side changes in an incompatible way, the verification fails before the change merges.
Tools: Pact is the dominant framework; Spring Cloud Contract, Postman contract tests, and OpenAPI + schema validation are alternatives.
When contract tests help
- Multiple services under independent teams with independent deploys.
- APIs that are stable contracts, not constantly evolving shapes.
- Cross-team coordination is expensive.
When they don't
- Monolith with shared types (the type system is your contract).
- Prototype / exploratory service where the API is in flux.
- Single consumer and single provider owned by the same team.
Rules
- Consumer drives the contract. The consumer says what it needs; the provider proves it can supply. Not the other way around.
- Only test your consumer's usage. If your consumer only uses 3 fields of a 20-field response, the contract has 3 fields. Don't over-spec.
- Contracts are not docs. Don't try to make the contract describe the whole API. That's OpenAPI's job.
- Version contracts with consumers. When consumer v2 needs a new field, the contract changes. The old consumer v1 contract still exists until v1 is retired.
- Provider verification runs on provider's CI. Consumer contract tests run on consumer's CI. Contracts are a shared artifact in the middle.
Failure modes
- Flaky because real service involved. Contract tests should not hit a real service. Consumer uses mocks, provider runs in isolation.
- Contracts drift from reality. The consumer updated the contract but never pushed it to the shared store. Automate.
- Over-spec. Contract tests assert things the consumer doesn't actually care about. Every extra assertion is a false positive waiting to happen.
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.
- 4d ago First seen · 55 lines · 28 tokens per session scan A f8256bdc075c
contract-testing is a skill published in the GitHub repository orlando-japan/claude-code-setting (2 stars, last pushed 3mo ago), licensed MIT. It adds 28 tokens to every session and 658 once invoked, about $0.0001 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.
Other skills, from other repositories
contract-testing
Consumer-driven contract testing for microservices using Pact, schema validation, API versioning, and backward compatibility testing. Use when testing API contracts or coordinating distributed teams.
Contract-First Testing
Contract-first testing approach using Pact, Spring Cloud Contract, or Dredd for ensuring API consumer-provider compatibility.
Contract Testing with Pact
Consumer-driven contract testing skill using Pact, covering consumer tests, provider verification, Pact Broker integration, and CI/CD workflows.
api-contract-tester
Implement consumer-driven contract testing with Pact to ensure API compatibility.
api-testing-patterns
Comprehensive API testing patterns including contract testing, REST/GraphQL testing, and integration testing. Use when testing APIs or designing API test strategies.
release-changelog
Polish a published qiankun GitHub Release's aggregated notes into a bilingual (English then Chinese) write-up with an agent. Use after a release goes out — turning the mechanically-aggregated, per-package release notes into a clean, human-readable, English + Chinese write-up (highlights, de-duped cross-package lines…