api-design
Skill1 starsChanged 57 days agoMITView on GitHub
HTTP and GraphQL contract design covering resource naming, method and status-code semantics, RFC 7807 error bodies, pagination, idempotency, conditional requests, health endpoints, rate-limit headers and tiers, and versioning. Use when you say "design this endpoint", "what status code should this return", "review our API contract", "add cursor pagination to this list", or "how do we deprecate v1". Not for the service code behind the endpoint, use `backend-patterns`.
125 other projects use a version of this.
Adopted by
Most recently taken up by
- AllThingsSmitty/proven-skillstheir own version, first seen Oct 6, 2026
- SkillMedev/api-integration-engineeringtheir own version, first seen Oct 5, 2026
- SkillMedev/full-stack-web-devtheir own version, first seen Oct 5, 2026
- cellrishi-code/claude-skills-atlastheir own version, first seen Oct 4, 2026
- mnzralee/claude-multi-agent-architecturetheir own version, first seen Oct 3, 2026
- vekzz-dev/opencode-skillstheir own version, first seen Oct 3, 2026
Used with
Projects with it also use data-modeling, ci-pipeline and 7 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.
mmondoraSkilldata-modeling
Schema design, multi-tenant data isolation, and migration management. Firestore and PostgreSQL patterns, RLS, UUID v7 conventions. Use when designing database schemas, writing migrations, or implementing multi-tenant data access.
Also in 7 projects that use this
vndeeSkillci-pipeline
Use when creating or updating CI/CD pipelines with GitHub Actions or GitLab CI for Go, Python, or React projects
Also in 4 projects that use this
pluginagentmarketplaceSkillmicroservices
Microservices architecture patterns and best practices. Service decomposition, inter-service communication, and distributed data management.
Also in 4 projects that use this
kevinaimonsterSkilltypescript-strict
TypeScript strict mode and advanced type system assistant. Helps write strictly-typed TypeScript code with generics, type guards, utility types, conditional types, mapped types, and template literal types. Trigger when user says 'TypeScript types' 'type gymnastics' 'TypeScript generics' 'strict TypeScript' 'type guard' 'TS类型' 'TypeScript严格模式' '类型体操' '泛型怎么写' 'TS type help'. Keywords: TypeScript, strict mode, generics, type guard, utility types, conditional types, mapped types, template literal types, infer, extends, keyof, typeof, type narrowing, discriminated unions, type assertion, type predicate, type gymnastics, TS, 类型体操, 泛型, 类型守卫, 严格类型
Also in 4 projects that use this
DatabricksSkillload-testing
Load test a Databricks App to find its maximum QPS. Use when: (1) User says 'load test', 'benchmark', 'QPS', 'throughput', or 'performance test', (2) User wants to find how many queries per second their app can handle, (3) User wants to set up load testing scripts for their agent, (4) User wants to view load test results/dashboard, (5) User wants to validate results or observe latency/error rate with MLflow tracing.
Also in 4 projects that use this
CloudAI-XSkilldatabase-design
Designs database schemas, indexing strategies, query optimization, and migration patterns for SQL and NoSQL databases. Use when designing tables, optimizing queries, fixing N+1 problems, planning migrations, or when asked about database performance, normalization, ORMs, or data modeling.
Also in 15 projects that use this
Other versions125 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 125
- xu-xiang/everything-claude-code-zh★ 2ksame name
- Aaronontheweb/dotnet-skills★ 1.2ksame name
- nth5693/gemini-kit★ 373same name
- loulanyue/awesome-claude-notes★ 272same name
- KbWen/agentic-os★ 206same name
- margelo/react-native-skills★ 173same name
- tpavanipradeep/everything-claude-code★ 134same name
- templetongroup/radiant★ 113same name
- cohen-liel/hivemind★ 110same name
- microsoft/haste★ 106same name
115 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 repository59 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- agentic-engineeringSkill
- ai-regression-testingSkill
- angularSkill
- ansibleSkill
- architecture-decision-recordsSkill
- ascend-memorySkill
- ascend-web-hunterSkill
- audio-scribeSkill
- automation-inventorySkill
- backend-patternsSkill
- bashSkill
- build-dependency-managementSkill
- code-formatterSkill
- code-reviewerSkill
- coding-standardsSkill
- dart-flutter-patternsSkill
- database-migrationsSkill
- deployment-patternsSkill
- design-systemSkill
- docker-patternsSkill
- e2e-runbooksSkill
- e2e-testingSkill
- embedded-c-arduinoSkill
- frontend-designSkill
- g-code-3d-printingSkill
- github-opsSkill
- git-workflowSkill
- golang-patternsSkill
- hexagonal-architectureSkill
- home-assistantSkill
- java-coding-standardsSkill
- jetbrains-ide-opsSkill
- jira-integrationSkill
- keycloak-patternsSkill
- kicadSkill
- markdown-writerSkill
- mongodb-patternsSkill
- nextjs-app-router-patternsSkill
- node-backend-patternsSkill
- observability-and-loggingSkill
- obsidianSkill
- performance-optimizationSkill
- postgres-patternsSkill
- powershellSkill
- project-trackingSkill
- python-patternsSkill
- pytorch-patternsSkill
- react-patternsSkill
- researchSkill
- review-duplicationSkill
- security-reviewSkill
- seoSkill
- soap-webservicesSkill
- springboot-patternsSkill
- tdd-workflowSkill
- unitySkill
- web-accessibilitySkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 0 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 104 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 68
Use kebab-case for multi-word resources, nest only to express ownership, and reserve a verb path segment for a genuine state transition …
- Very specific: line 115
Every error body uses Content-Type: application/problem+json and the RFC 7807 shape, so one client-side handler covers every endpoint.
- Very specific: line 196
Use POST /resources/batch for bulk work and report per-item outcomes, because one failed item must not discard the other ninety-nine.
- Very specific: line 269
Put the version in the URL, keep at most two active versions, and give a deprecated one at least six months.
“Common” is measured: kept by at least 6 in 10 of the 104 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
API Design
Conventions for HTTP and GraphQL contracts that stay predictable as an API grows and gains external callers. The contract is the deliverable here, so everything is about what goes on the wire and nothing about the code that produces it.
Standards baseline, current as of September 2026: HTTP semantics per RFC 9110, problem responses per RFC 7807,
descriptions written in OpenAPI 3.1, GraphQL over the graphql-ws transport.
When to activate
- Designing a new endpoint or reviewing an existing API contract.
- Choosing a status code, an error body, or a response envelope.
- Adding pagination, filtering, or sorting to a collection endpoint.
- Planning a versioning or deprecation path for a public or partner API.
- Deciding what an endpoint must accept to be safe to retry.
When not to activate
- Service structure, layering, or data access behind the endpoint: use
backend-patterns. - Node, Express, or Next.js implementation of a handler: use
node-backend-patterns. - Spring Boot controllers and their error handling: use
springboot-patterns. - Authentication mechanics and token verification: use
security-review. Threat modelling: use thesecurity-auditoragent. - SOAP and WSDL contracts: use
soap-webservices. - Writing the reference documentation for a finished contract: use
markdown-writer.
Reference map
| Task | Open |
| Pagination, filtering, sorting, search, sparse fieldsets | references/pagination-and-filtering.md |
| Versioning strategy, deprecation, and sunset headers | references/versioning.md |
| GraphQL schema, resolvers, and production hardening | references/graphql.md |
| A working handler in TypeScript, Python, or Go | references/implementation-examples.md |
Name resources as plural nouns
A URL identifies a thing. The method says what you are doing to it, so a verb in the path duplicates the method and splits one resource across several names.
# PASS
GET /api/v1/team-members
GET /api/v1/users/123/orders
POST /api/v1/orders/456/cancel
# FAIL
GET /api/v1/getUsers
GET /api/v1/user
GET /api/v1/team_members
GET /api/v1/users/123/getOrdersUse kebab-case for multi-word resources, nest only to express ownership, and reserve a verb path segment for a genuine
state transition that no method expresses, such as cancel or refund.
Use the method that matches the semantics
| Method | Idempotent | Safe | Use for |
| GET | Yes | Yes | Retrieving a resource |
| POST | No | No | Creating a resource, triggering an action |
| PUT | Yes | No | Replacing a resource in full |
| PATCH | Not inherently | No | Updating part of a resource |
| DELETE | Yes | No | Removing a resource |
PATCH becomes idempotent when the body describes a target state rather than a delta. {"status": "shipped"} is
idempotent, {"increment_views": 1} is not.
Return the status code that describes what happened
200 OK GET, PUT, PATCH with a response body
201 Created POST, with a Location header pointing at the new resource
204 No Content DELETE, or PUT with no body to return
207 Multi-Status a bulk operation with per-item outcomes
304 Not Modified a conditional GET whose resource is unchanged
400 Bad Request malformed syntax, unparseable JSON
401 Unauthorized missing or invalid credentials
403 Forbidden authenticated, and still not allowed
404 Not Found no such resource, or its existence is confidential
409 Conflict duplicate, or a state that forbids this transition
422 Unprocessable Content syntactically valid, semantically wrong
429 Too Many Requests rate limit exceeded, with Retry-After
500 Internal Server Error unexpected failure, never with internal detail
502 Bad Gateway an upstream dependency failed
503 Service Unavailable overloaded or draining, with Retry-AfterFail: HTTP 200 carrying {"status": 200, "success": false, "error": "Not found"}, which forces every client to parse
the body before it knows whether the call worked, and defeats caches, proxies, and retry logic alike.
Return errors as problem+json
Every error body uses Content-Type: application/problem+json and the RFC 7807 shape, so one client-side handler covers
every endpoint.
{
"type": "https://example.com/errors/validation",
"title": "Validation Failed",
"status": 422,
"detail": "3 fields failed validation",
"instance": "/orders/123",
"errors": [
{ "field": "email", "message": "Invalid format", "code": "INVALID_EMAIL" }
]
}| Field | Required | Meaning |
type | Yes | URI identifying the problem class, stable across releases |
title | Yes | Short human-readable summary of the class |
status | Yes | The HTTP status code, repeated for clients that lost it |
detail | No | What went wrong on this occurrence |
instance | No | URI of this specific occurrence |
errors | No | Extension array of field-level failures |
Fail: a body carrying a stack trace, an SQL fragment, or an upstream vendor's error text. detail is for the caller,
not for your logs.
Wrap success responses in a consistent envelope
{
"data": [{ "id": "abc-123", "name": "Alice" }],
"meta": { "has_next": true, "next_cursor": "eyJpZCI6MTQzfQ" },
"links": { "self": "/api/v1/users?limit=20", "next": "/api/v1/users?limit=20&cursor=eyJpZCI6MTQzfQ" }
}A data wrapper leaves room to add meta and links later without breaking clients, which is why it suits public
APIs. Returning the bare resource is fine for an internal API, provided every endpoint does it. What is never fine is
mixing the two across one surface.
Cursor pagination is the default for any collection that grows without bound. Offset is for small fixed sets. The mechanics, plus filtering and sorting, are in references/pagination-and-filtering.md.
Require an idempotency key on non-idempotent writes
A client that times out cannot tell a lost request from a lost response. Give it a safe way to retry.
POST /api/v1/orders
Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000- A request with no key returns 400 with a problem body whose
typelinks to the documentation. - Store the response for 24 hours, keyed by the idempotency key.
- The same key with the same request body replays the stored response without re-executing.
- The same key with a different body returns 422.
Support conditional requests on cacheable reads
Return ETag and Last-Modified on cacheable GETs, and honour If-None-Match and If-Modified-Since with a 304. The
same ETag in If-Match on a PUT or PATCH gives you optimistic concurrency for free: a mismatch is a 412.
HTTP/1.1 200 OK
ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"
Last-Modified: Tue, 15 Jan 2025 10:30:00 GMTReturn 207 from bulk endpoints, and bound the batch
Use POST /resources/batch for bulk work and report per-item outcomes, because one failed item must not discard the
other ninety-nine.
{
"results": [
{ "id": "1", "status": 201, "data": {} },
{ "id": "2", "status": 422, "error": "Invalid email" }
]
}Cap the number of items and the body size, and return 413 when a caller exceeds either. Process atomically when the domain requires it, and say which behaviour applies in the documentation.
Keep liveness and readiness separate
This section is the canonical definition of the health endpoint paths for this repository. Other skills probe or implement these two paths and must not rename them.
GET /health liveness: 200 while the process runs, checks nothing external
GET /ready readiness: 200 when dependencies are usable, 503 otherwise{ "status": "degraded", "checks": { "db": "ok", "redis": "timeout" } }Both sit outside the versioned path, because they describe the process rather than the API. Fail: one /health that
checks the database, so a transient outage makes the orchestrator restart a perfectly healthy process.
Advertise rate limits on every response
This section is the canonical definition of the rate-limit headers and tiers for this repository. Other skills implement it and must not restate the values.
HTTP/1.1 200 OK
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 95
X-RateLimit-Reset: 1714000000HTTP/1.1 429 Too Many Requests
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1714000000
Retry-After: 60
Content-Type: application/problem+json
{ "type": "https://example.com/errors/rate-limit-exceeded", "title": "Too Many Requests", "status": 429 }X-RateLimit-Reset is a UTC epoch in seconds. Send the three headers on successful responses too, because a client
cannot back off from a budget it cannot see.
| Tier | Limit | Window | Applies to |
| Anonymous | 30/min | Per IP | Public endpoints |
| Authenticated | 100/min | Per user | Standard API access |
| Premium | 1000/min | Per API key | Paid plans |
| Internal | 10000/min | Per service | Service-to-service calls |
Version in the path, and announce every retirement
Put the version in the URL, keep at most two active versions, and give a deprecated one at least six months. Announce
the end on the response with Deprecation and Sunset, then return 410 Gone after the date. The full policy, including
which changes need a version at all, is in references/versioning.md.
Related skills
backend-patternsfor idempotency storage, retries, and readiness behind the contract.node-backend-patternsandspringboot-patternsfor handler-level implementations.hexagonal-architecturefor keeping transport concerns out of the domain.security-reviewbefore exposing an endpoint that touches credentials, payments, or personal data.soap-webserviceswhen the contract is WSDL rather than HTTP and JSON.observability-and-loggingfor correlating a request identifier across services.
Checklist
- Resource URLs are plural, kebab-case nouns with no verbs outside genuine state transitions.
- The method matches the semantics, and PATCH bodies describe a target state.
- Status codes are used semantically, never 200 for a failure.
- Every error body is
application/problem+jsonand leaks no internal detail. - The success envelope is consistent across every endpoint on the surface.
- List endpoints paginate, default to cursors when unbounded, and cap page size server-side.
- Non-idempotent POST and PATCH require
Idempotency-Key. - Cacheable GETs return
ETagandLast-Modifiedand honour the conditional headers. - Bulk endpoints return 207 with per-item results and bound the batch.
/healthand/readyexist, are separate, and sit outside the versioned path.X-RateLimit-*headers are on every rate-limited response, withRetry-Afteron the 429.- Deprecated endpoints carry
DeprecationandSunsetand return 410 after the date. - Input is schema-validated and authorization is checked per resource, not only per role.
- The OpenAPI description is updated in the same change as the endpoint.
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.

