api-contract
Skill2 starsChanged 8 days agoMITView on GitHub
Design, change or consume an HTTP API without breaking the clients you cannot see. Use when adding endpoints, changing a response shape, introducing versioning, pagination, idempotency or error codes, when a mobile client will lag behind the server, or when a "small" response change has to stay compatible with old builds.
20 other projects use a version of this.
Adopted by
Most recently taken up by
- zdanovichnick/dotnet-pilottheir own version, first seen Nov 29, 2026
- Vacayy/explorertheir own version, first seen Nov 29, 2026
- Reactive-Skills/skillstheir own version, first seen Nov 29, 2026
- TomorrowLM/lm-skilltheir own version, first seen Nov 22, 2026
- chatquill/claude-code-websitestheir own version, first seen Nov 22, 2026
- jDxve/avengers-kittheir own version, first seen Nov 8, 2026
Used with
Projects with it also use design-system, release-notes and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
AnthropicSkilldesign-system
Audit, document, or extend your design system. Use when checking for naming inconsistencies or hardcoded values across components, writing documentation for a component's variants, states, and accessibility notes, or designing a new pattern that fits the existing system.
Also in 4 projects that use this
Microsoft AzureSkillrelease-notes
Author and update release notes for Azure App Configuration libraries and providers. USE FOR: write release notes, add release note entry, update release notes, draft release notes, new version release notes, format release notes. DO NOT USE FOR: generating changelogs from git history, writing internal engineering notes.
Also in 4 projects that use this
OpenAISkillsystematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes
Also in 3 projects that use this
CloudflareSkillsecurity-audit
Security guidance and vulnerability review for codebases, APIs, services, CLI tools, libraries, and daemons. Use for security questions, focused reviews, vulnerability research, security audits, or pen tests. Run the complete workflow only for explicit codebase audit or pen-test requests, full/comprehensive/end-to-end reviews, or requested report artifacts.
Also in 3 projects that use this
GoogleSkillcode-review
Adversarial systems, concurrency, memory-model, and architecture code review protocol. Use this skill whenever asked to review code, PRs, diffs, or branches in Filament.
Also in 5 projects that use this
MicrosoftSkillrelease
Use ONLY when the user explicitly asks to cut/publish a Huabu desktop release or tag a version. Performs an outward action — bumps the version in apps/desktop/package.json, commits + annotated-tags vX.Y.Z, and pushes the branch + tag. That tag push auto-builds the macOS/Windows installers and publishes a GitHub Release. Provides `status`, `bump`, `tag-push`, and a one-command `run` (bump → tag-push).
Also in 3 projects that use this
Other versions20 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 20
- ChenyCHENYU/Robot_Admin★ 1ksame name
- zdanovichnick/dotnet-pilot★ 5same name
- Eliahhango/nullbyte-security★ 4same name
- gonimar/claude-web-studio★ 4same name
- digitaldreams/tuhin★ 3same name
- PatriotAgenticLLC/better_claude_skillz★ 3same name
- vndee/engineering-skills★ 3same name
- 1398281322-a11y/java-backend-guardrails★ 2same name
- Echo-Scion/orioncortex★ 2same name
- Echo-Scion/portable-brainvibing★ 2same name
10 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository8 other files it gives its agents.
- bilingual-docsSkill
- debug-connectivitySkill
- diagnose-slowSkill
- plan-migrationSkill
- release-verifySkill
- review-diffSkill
- write-a-skillSkill
- write-postmortemSkill
The file
We split this skill into the rules it gives an agent
1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
1
Distinctive
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 9
Every field you remove is a client you break at a moment you do not control.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
HTTP API contracts
Every field you remove is a client you break at a moment you do not control. An API contract is an agreement with software you cannot upgrade — old mobile builds, partner integrations, a script someone wrote in 2021 — and it deserves the same care as a database schema you can no longer migrate.
When to use
- Adding or changing any endpoint a client consumes.
- Adding versioning, deprecation, pagination, filtering, idempotency or rate limits.
- A mobile app ships in weeks but the server deploys in minutes — the version skew is the design constraint.
- Someone proposes renaming a field, changing a status code, or "just returning an array instead".
Ground rules
- Additive changes are safe; everything else is a breaking change. New optional field, new endpoint, new enum value for a client that tolerates unknowns: safe. Rename, removal, type change, tighter validation, new required field, changed default, changed status code: breaking.
- The client you must not break is the one you cannot update. Assume at least one client is six months old.
- Errors are part of the contract. A stable machine-readable
codeplus a human message, the same shape on every endpoint, and a status code that matches the category. - Money, time and identifiers have rules. Minor units for money, RFC 3339 UTC for time, opaque string ids (never expose autoincrement).
- Every write that can be retried needs an idempotency key — retries happen inside load balancers, SDKs and mobile networks whether you planned for them or not.
- The document and the server must agree. An OpenAPI file that is hand-maintained and stale is worse than none; generate it or test it.
Procedure
- Write the contract before the code: method, path, request, response, errors, and what the other side does next. If you cannot describe the client's behaviour after the call, the design is incomplete.
- Classify the change against the breaking list in rule 1, and say which bucket it is in, in the pull request.
- Shape the response for growth: an object at the top level (never a bare array), a stable
envelope for lists (
items, plus pagination fields), and every new field optional in the schema until all known clients ignore its absence safely. - Design errors once. One envelope:
error.code(stable, machine-readable),error.message(human),error.details(structured, optional), plus a request id the support person can quote. - Make writes safe to repeat:
Idempotency-Keyon creation and payment paths, stored with the response, replayed on repeat, and rejected if the payload differs under the same key. - Paginate from the first version, with a cursor rather than an offset if the data changes underneath. Decide the page-size cap and enforce it.
- Version only when you must, in the path (
/v2) or via a header — but choose one and never both. Prefer evolution (additive) over versions, and when you deprecate: announce, keep both running, return the sunset in headers, and set a date. - Prove it: contract tests for the response shape, a test that old fixtures still parse, and a check that the published schema is generated from the code.
Anti-patterns
| Tempting move | Why it is wrong |
| Returning a bare array | No room to add pagination or metadata without a breaking change |
200 OK with { "success": false } | The status code stops meaning anything; every client grows a special case |
| Exposing database ids and column names | Couples your storage to the public contract forever |
| Silent default changes | A new default is a breaking change wearing a disguise |
| "We will version it later" | Later is after the first partner integrates |
| Deprecating without observation | You have no evidence anyone stopped using the old path, so you keep it forever |
Definition of done
- The change is classified breaking or additive, in writing.
- Response shape can grow: object at the top level, list envelope with pagination.
- Errors use the shared envelope with a stable code; status codes match categories.
- Retryable writes have idempotency keys, with a test for the duplicate case.
- Time, money and identifiers follow the stated formats.
- The schema is generated or tested against the implementation; old fixtures still parse.
- If deprecating: sunset header, announcement, date, and a way to observe remaining usage.
Report format
Change: <method path> — <what is different>
Class: additive | breaking (and why)
Client impact: <what an old build does after this ships>
Errors: <codes added or changed>
Pagination: <shape, cap, cursor vs offset>
Idempotency: <key header, storage, replay behaviour>
Verified: <contract test, old-fixture test, generated schema>
Deprecation: <none, or sunset date + how usage is measured>The checklist that turns this into a review of an existing API, and the exact rules for compatibility, are in references/contract-checklist.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

