api-contract-testing

api-contract-testing is a skill for Claude Code, Codex from makifbaysal/tasktrooper. It costs 42 tokens per session (775 once invoked), scanned B, original, Apache-2.0.

An API contract-testing guide for checking HTTP endpoints against their documented request, response, status, authentication, and error behavior. An API is an interface that lets software communicate over the web.

In plain words
What is it for?
It helps build request test matrices and curl checks for valid and invalid input, authentication, permissions, missing resources, duplicates, wrong methods, pagination, and idempotency.
Why use it?
It catches breaking changes and common security or validation mistakes instead of testing only the successful path. It checks the public contract rather than merely confirming that the implementation matches itself.

Skill for Claude CodeCodex

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

Good fit It helps build request test matrices and curl checks for valid and invalid input, authentication, permissions, missing resources, duplicates, wrong methods, pagination, and idempotency.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/makifbaysal/tasktrooper/api-contract-testing
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 makifbaysal/tasktrooper --skill api-contract-testing
Clone the repo
git clone --depth 1 https://github.com/makifbaysal/tasktrooper

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 api-contract-testing

README.md
[![agentmods](https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/api-contract-testing/github.svg)](https://agentmods.dev/skills/makifbaysal/tasktrooper/api-contract-testing)
Your own site
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/api-contract-testing"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/api-contract-testing/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 api-contract-testing

Your own site · 80×15
<a href="https://agentmods.dev/skills/makifbaysal/tasktrooper/api-contract-testing"><img src="https://agentmods.dev/badge/skills/makifbaysal/tasktrooper/api-contract-testing.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 42 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 775 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 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.00042 $0.00775
Opus 5.5 $0.00017 $0.00310
Sonnet 5.5 $0.00008 $0.00155
Haiku 4.5 $0.00004 $0.00077

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

Security

Grade B, and why

api-contract-testing scanned grade B with 2 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 6d 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.

Sends data to an external URLmediumData exfiltration

A POST to an outside endpoint may be telemetry or may be exfiltration; either way the mod talks to somewhere, and you should know where.

curl -sS -D "$QA/h.txt" -o "$QA/b.json" -w '%{http_code} %{time_total}s\n' -X POST "$BASE/api/tasks" -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -d '{"title":"qa-T-12 a"}'; jq . "$QA/b.json" # n

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

description: Use when a task adds or changes an HTTP endpoint, its request/response shape, status codes, auth or error format - the request matrix, curl templates and what counts as a contract break
catalog/agents/qa-agent/skills/api-contract-testing/SKILL.md · 63 lines

How it starts

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

API Contract Testing

Contract source

The task, its acceptance criteria and the spec document first; then the repo's OpenAPI file or README API docs (the named boot-docs exception). Never the handler source — a contract derived from the implementation only proves the implementation matches itself.

Request template

curl -sS -D "$QA/h.txt" -o "$QA/b.json" -w '%{http_code} %{time_total}s\n' -X POST "$BASE/api/tasks" -H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' -d '{"title":"qa-T-12 a"}'; jq . "$QA/b.json"  # no jq (stock Windows, some Linux): read_file the body instead

Per changed endpoint, the matrix

One case each, mapped to the category enum:

Case Category
2xx happy path happy_path
400/422 for invalid body, with the error payload shape negative
401 no token auth
403 other user's resource (BOLA: create as A, read/update/delete as B) auth
404 unknown id negative
409 duplicate where uniqueness is implied negative
405 wrong method negative
extra unknown/privileged field ignored, e.g. "role":"admin" (mass assignment) auth
pagination edges (limit 0, max, max+1) boundary
idempotency: PUT/DELETE twice, POST with Idempotency-Key twice when claimed negative
content-type (missing, wrong) negative

Compatibility

Existing fields keep their name, type and nullability. A removed or renamed field is a break unless the task explicitly asks for it. Compare against the OpenAPI file, or a request to the same endpoint on stage/the default branch.

Side effects

Verify them the same way backend-manual-testing does — a 2xx with the wrong DB row or missed outbound call is a FAIL, not a pass with a note.

Optional depth: schema fuzzing

Local boot only, and only when the repo ships an OpenAPI file:

uvx schemathesis run <openapi> --url <base> -H "Authorization: Bearer $TOKEN" --include-path-regex '<changed path>' --checks not_a_server_error,status_code_conformance,response_schema_conformance --max-examples 20 --max-failures 5

Read the full file on GitHub · 63 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. 6d ago Changed 07a4a24f7435
  2. 8d ago First seen · 63 lines · 42 tokens per session scan B c3d1cabaf839

Subscribe to this mod's changes

api-contract-testing is a skill published in the GitHub repository makifbaysal/tasktrooper (113 stars, last pushed yesterday), licensed Apache-2.0. It adds 42 tokens to every session and 775 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it B with 2 findings (sends data to an external url, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-05.

Related

Other skills, from other repositories

qa-acceptance

Produce QA acceptance criteria and a manual validation plan for a feature change — golden path, edge cases, error states, performance limits, and explicit pass/fail evidence.

paperclipai/paperclip · 38 tokens

proof-api

Build API test suites — endpoint testing, contract testing, load testing for REST/GraphQL/gRPC APIs. Use when asked to "test this API", "API tests", "endpoint testing", "contract tests", or "load test".

tonone-ai/tonone · 51 tokens

ambient-healthcare-agent-with-nemotron-voice-agent

Customize NVIDIA Nemotron Voice Agent's Generic Pipecat example for healthcare appointment, five-field patient intake, or custom tool-calling workflows without a separate backend.

NVIDIA/skills · 44 tokens

earth2studio-create-datasource

Create and validate Earth2Studio data source wrappers (DataSource, ForecastSource, DataFrameSource, ForecastFrameSource) from remote stores. Do NOT use for fetching data with existing sources, model inference, or installation tasks.

NVIDIA/skills · 53 tokens

nemo-automodel-recipe-development

Create and modify NeMo AutoModel training and evaluation recipes, including YAML structure, builders, and execution flow.

NVIDIA/skills · 31 tokens

nemo-fabric-build-adapter

Build, migrate, review, and maintain third-party NVIDIA NeMo Fabric adapters against the public adapter contract. Use when creating adapter or target descriptors, mapping AgentConfig into an agent harness or custom-agent runtime, implementing start/invoke/stop, declaring schemas and capabilities, packaging discovery…

NVIDIA/skills · 87 tokens