api-design-standards
Skill18 starsChanged 3 months agoMITView on GitHub
API design discipline grounded in the Microsoft/Google REST guidelines, resource and URL conventions, a chosen versioning strategy, what counts as a backward-compatible vs breaking change, and consumer-driven contract testing. Use when designing a new API endpoint, changing an existing API's request/response shape, deciding how to version an API, or asking whether a change to a public interface is breaking.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- Vimalk0703/shipworthytheir own version, first seen Apr 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- Vimalk0703/shipworthy★ 6same name
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 repository33 other files it gives its agents.
- architecture-diagramSkill
- capacity-estimationSkill
- codebase-designSkill
- code-reviewSkill
- code-style-lintSkill
- dependency-upgrade-managementSkill
- diagnosing-bugsSkill
- domain-modelingSkill
- explain-plainlySkill
- grillingSkill
- handoffSkill
- improve-codebase-architectureSkill
- incident-responseSkill
- observabilitySkill
- project-groundworkSkill
- prototypeSkill
- release-versioningSkill
- repo-secureSkill
- repo-shipSkill
- researchSkill
- resolving-merge-conflictsSkill
- safe-deploymentSkill
- secure-codingSkill
- spec-to-ticketsSkill
- tddSkill
- teachSkill
- test-strategySkill
- to-questionnaireSkill
- triageSkill
- wait-whatSkill
- wayfinderSkill
- wizardSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
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 48
Run the schema validation and the contract verification as CI gates, not manual pre-release checklist items.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Design Standards
An API is a promise to callers you don't control and usually can't see. Adding to that promise is free; changing or removing part of it breaks someone who already depended on it. Every API change is classified against that promise (additive or breaking) before it ships, not discovered after a caller files a bug.
Phase 1: Resource and URL conventions
- URLs name resources (nouns), never actions (verbs):
POST /orders, notPOST /createOrder. The HTTP method carries the verb. - Collections are plural (
/orders), a specific member is the collection plus an identifier (/orders/{id}), and nesting reflects real ownership (/orders/{id}/items), not an arbitrary path someone found convenient. - HTTP methods map to a fixed meaning, and only that meaning:
GET(read, no side effects, safe to retry and cache),POST(create, or a non-idempotent action),PUT(full replace, idempotent, calling it twice with the same body leaves the same state),PATCH(partial update),DELETE(remove, idempotent). - Status codes communicate outcome precisely:
2xxsuccess (201for created with aLocationheader,204for success with no body),4xxthe caller's fault (400malformed request,401unauthenticated,403authenticated but not authorized,404not found,409conflict,422semantically invalid),5xxthe server's fault. Returning200with an error payload embedded in the body hides the failure from every generic HTTP-aware tool (retries, caches, monitoring).
Phase 2: Versioning strategy
Pick one signal and use it consistently across the whole API; mixing strategies forces every client to handle more than one:
| Strategy | How | Tradeoff |
URI path (/v2/orders) | version segment in the path | most discoverable and cacheable, but encourages whole-API version bumps for a change that only touched one resource |
Header / content negotiation (Accept: application/vnd.api+json;version=2) | version encoded in a request header | most correct REST semantics (a version is a different representation of the same resource, not a different resource) but far less discoverable: undebuggable by just reading a URL |
Query parameter (?version=2) | version as a query param | simplest to add after the fact, easiest to accidentally omit and silently get a default |
Version the API only when a breaking change (Phase 3) actually requires it. A version bump for a purely additive change forces every existing client to migrate for no reason; that cost is the same mistake a hand-picked SemVer bump is, applied to an API instead of a package.
Phase 3: What's backward-compatible vs breaking
| Change | Compatible? |
| Adding a new optional request field | Compatible: old clients that don't send it are unaffected |
| Adding a new field to a response | Compatible if clients are expected to ignore unknown fields: state this expectation explicitly in the API's docs, since some client generators fail closed on unknown fields |
| Adding a new endpoint | Compatible |
| Removing or renaming a field, endpoint, or enum value | Breaking |
| Changing a field's type or meaning (a string that used to be an ID now being a display name) | Breaking |
| Making a previously-optional field required | Breaking |
| Changing default behavior for an omitted parameter | Breaking |
| Tightening validation on an existing field (was permissive, now rejects previously-valid values) | Breaking |
When a breaking change is unavoidable (security fix, correcting a genuinely wrong design): communicate it ahead of the change, support the old and new shape in parallel for a stated deprecation window (see dependency-upgrade-management for the deprecation-signal mechanics), and only remove the old shape after that window closes.
Phase 4: Contract testing
- An OpenAPI (or equivalent) schema is the API's published, machine-readable shape; validate requests and responses against it in CI so a gross schema violation is caught before it reaches a client.
- For APIs consumed by services you also control (internal microservices), add consumer-driven contract testing: the consumer writes a test capturing exactly what it expects from the provider, the provider verifies against that captured contract in its own CI. This catches a breaking change (a renamed field, a removed endpoint) at the point the provider would have shipped it, not after deploy, in the consumer's production logs.
- Run the schema validation and the contract verification as CI gates, not manual pre-release checklist items; a check that depends on someone remembering to run it will eventually not run.
Done when
- Every endpoint uses resource-noun URLs and the HTTP method matching its actual semantics.
- The API uses one versioning signal consistently, and a version bump happened only because Phase 3 classified the change as breaking.
- Every changed field, endpoint, or default was checked against the Phase 3 table before shipping.
- Any unavoidable breaking change has a stated deprecation window with the old and new shape both live during it.
- Schema validation and (for internally-consumed APIs) contract tests run as CI gates.
- Generated prose uses commas, colons, periods, or reworded sentences instead of em dashes.
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.

