api-design
Skill1 starsChanged 46 days agoMITView on GitHub
Language-agnostic framework for designing, evaluating, and standardizing HTTP APIs (REST and GraphQL). Triggers whenever an agent is asked to "design an API", "add an endpoint", "review this API contract", "how should I version this?", "REST vs GraphQL", "design pagination", or when selecting HTTP status codes. Enforces clean noun-based REST routing, strict HTTP method semantics, RFC 9457 error contracts, cursor/offset pagination, rate limiting, and spec-first OpenAPI documentation.
191 other projects use a version of this.
Adopted by
Most recently taken up by
- RostislavDugin/postgresustheir own version, first seen Nov 8, 2026
- Markssuave/Markssuave-Agent-skillstheir own version, first seen Nov 8, 2026
- Rojios/everything-claude-codetheir own version, first seen Nov 8, 2026
- ishandutta2007/Awesome-Claude-Skillstheir own version, first seen Nov 8, 2026
- databasus/databasustheir own version, first seen Nov 8, 2026
- lhbsaa/apex-unifiedtheir own version, first seen Nov 8, 2026
Used with
Projects with it also use db-design, everything-claude-code and 10 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.
yuexueyuSkilldb-design
数据库工程师技能 - Schema设计、索引优化、并发安全、数据库审计。当你涉及数据库表/字段/索引/SQL/迁移/MCP数据库操作、建表改表、写查询时必须使用此技能。即使用户只是说"加个字段"或"查下数据",也应触发。
Also in 4 projects that use this
InfopibeSkilleverything-claude-code
Also in 9 projects that use this
mryeastcodeSkilleverything-claude-code-conventions
Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.
Also in 8 projects that use this
tpavanipradeepSkillnextjs-turbopack
Next.js 16+ and Turbopack — incremental bundling, FS caching, dev speed, and when to use Turbopack vs webpack.
Also in 15 projects that use this
Indium-AI-LabsSkilldata-pipeline-design
Design batch or incremental ETL and ELT pipelines and warehouse models: grain, partitioning, idempotent loads, late-arriving data, data quality tests, PII controls, and cost monitoring, before building them. Use when adding or changing a dbt model, warehouse table, scheduled transformation, or ingestion job. Not for transactional schema design (use the database-design skill) or event-sourced stores (use the event-sourcing-architecture skill).
Also in 3 projects that use this
thejordanleopoldSkillthird-party-integration
Use when integrating with external APIs, payment processors (Stripe), webhooks, or third-party services. Use when implementing API clients with authentication and rate limiting, handling webhooks with signature verification and idempotency, writing contract tests for external services, or isolating third-party dependencies behind adapters. Triggers: \"Stripe\", \"payment integration\", \"webhook\", \"third-party API\", \"external service\", \"API client\", \"integrate with\", \"signature verification\", \"idempotency key\".
Also in 3 projects that use this
Other versions191 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 191
- affaan-m/ECC★ 246ksame name
- databasus/databasus★ 9.3ksame name
- RostislavDugin/postgresus★ 9.3ksame name
- authgear/authgear-server★ 2.1ksame name
- xu-xiang/everything-claude-code-zh★ 1.9ksame name
- Aaronontheweb/dotnet-skills★ 1.2ksame name
- epam/ai-dial-chat★ 501same name
- loulanyue/awesome-claude-notes★ 272same name
- KbWen/agentic-os★ 229same name
- DevelopersGlobal/ai-agent-skills★ 216same name
181 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 repository15 other files it gives its agents.
- accessibility-auditSkill
- agent-skills-authoringSkill
- ci-cd-pipelineSkill
- code-reviewSkill
- design-system-adapterSkill
- docker-and-containersSkill
- docs-and-adrSkill
- git-commit-workflowSkill
- package-security-vettingSkill
- replicate-apiSkill
- secrets-and-config-managementSkill
- testing-strategySkill
- ui-cloneSkill
- ui-slop-remediationSkill
- universal-coding-standardsSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 2 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 67
Use exact status codes (see references/status-codes.md):
- Distinctive: line 77
Every error response must return a machine-readable code, human title, and field-level invalid parameters.
- Very specific: line 93
Add Sunset: <date> and Deprecation: true HTTP headers to deprecated endpoints.
- Distinctive: line 101
Every collection endpoint must enforce a default limit (e.g.
- Very specific: line 114
Every endpoint specification must state its authorization tier: Public, AuthenticatedUser, or Role(Admin).
“Common” is measured: kept by at least 6 in 10 of the 165 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 & Contract Standards
A language-agnostic operational standard for designing, reviewing, and versioning HTTP APIs (REST-first, with GraphQL guidance).
Sibling Standards:
- For input validation and injection prevention at the controller layer, see
universal-coding-standards.- For vetting third-party routing or gateway packages, see
package-security-vetting.
1. Resource & URL Architecture (REST)
- 1.1 Nouns, Not Verbs in Paths:
- ✅
/orders,/users/42/invoices,/subscriptions - ❌
/getOrders,/createUser,/api/update_order
- ✅
- 1.2 Plural Resource Names: Always use plural nouns for collections (
/products,/customers). - 1.3 Consistent URL Casing: Use
kebab-casefor multi-word path segments (/payment-methods,/shipping-addresses). - 1.4 Shallow Nesting ($\le 2$ Levels):
- Nest resources only when a strict parent-child ownership exists:
- ✅
/organizations/{org_id}/members - ✅
/orders/{order_id}/items
- ✅
- Avoid deep nesting:
- ❌
/authors/12/books/4/chapters/8/paragraphs/2 - ✅ Top-level resource by ID:
/chapters/8/paragraphs
- ❌
- Nest resources only when a strict parent-child ownership exists:
- 1.5 Strict HTTP Method Semantics:
GET: Safe, idempotent, no side effects, returns resource. Never mutates state.POST: Creates a child resource or executes a non-idempotent operation.PUT: Full replacement of resource representation; idempotent.PATCH: Partial update of specific fields; non-idempotent or idempotent.DELETE: Deletes the resource; idempotent (subsequent calls return 204 or 404).
2. Request & Response Contracts
- 2.1 Consistent Envelope Architecture:
- Choose one style across the entire API and never mix:
- No Envelope (Clean REST standard): Return raw entity or array:
{ "id": "...", "name": "..." }. - Enveloped:
{ "data": { ... }, "meta": { ... } }.
- No Envelope (Clean REST standard): Return raw entity or array:
- Choose one style across the entire API and never mix:
- 2.2 Uniform Field Casing:
- Strictly enforce one JSON casing style across all endpoints (
camelCaseorsnake_case). Never returnuser_idon one endpoint anduserIdon another.
- Strictly enforce one JSON casing style across all endpoints (
- 2.3 Stable Invariant Types:
- A field must never change type based on state (e.g. returning
nullvs""vs0, or returning a string sometimes and an integer other times). - Explicit ISO-8601 strings for timestamps:
"2026-09-28T02:30:00Z".
- A field must never change type based on state (e.g. returning
3. Error Handling & Status Codes
- 3.1 Accurate HTTP Status Codes:
- 🚫 Never return HTTP 200 OK with an error payload!
- Use exact status codes (see
references/status-codes.md):400 Bad Request: Malformed JSON or unparseable syntax.401 Unauthorized: Unauthenticated (missing/expired token).403 Forbidden: Authenticated, but lacks required role or permission.404 Not Found: Target resource does not exist.409 Conflict: Unique constraint violation or state collision.422 Unprocessable Content: Valid syntax, but business validation failed.429 Too Many Requests: Rate limit exceeded (includeRetry-After).500 Internal Server Error: Unhandled server-side fault.
- 3.2 Standardized Error Body (RFC 9457 Problem Details):
- Every error response must return a machine-readable code, human title, and field-level invalid parameters.
- 3.3 Zero Internal Leakage:
- Strip stack traces, raw SQL queries, internal database table names, and server hostnames from error payloads.
4. Versioning Strategy
- 4.1 Explicit Versioning Scheme:
- Select and document the versioning mechanism before launching v1:
- URI Path (Most common & debuggable):
/v1/invoices - Header-based:
X-API-Version: 2026-09-28orAccept: application/vnd.company.v1+json
- URI Path (Most common & debuggable):
- Select and document the versioning mechanism before launching v1:
- 4.2 Additive Changes Do Not Require Version Bumps:
- Adding a new endpoint, optional query parameter, or new response field is backwards-compatible.
- Breaking changes (removing a field, renaming a field, changing a type, altering required headers) require a new version.
- 4.3 Graceful Deprecation:
- Add
Sunset: <date>andDeprecation: trueHTTP headers to deprecated endpoints. - Support previous versions for a published deprecation window before terminating.
- Add
5. Pagination, Filtering & Sorting
- 5.1 Never Allow Unbounded Queries:
- Every collection endpoint must enforce a default limit (e.g. 20) and a maximum hard ceiling (e.g. 100).
- 5.2 Choose the Right Pagination Mechanism:
- Offset/Limit (
?limit=20&offset=40): Simple, permits jumping to page N. Slower on deep tables and susceptible to phantom row skips under live writes. - Cursor-Based (
?limit=20&starting_after=order_123): High-performance on large datasets, stable against insertions/deletions, recommended for real-time feeds.
- Offset/Limit (
- 5.3 Consistent Filter & Sort Syntax:
- Sorting:
?sort=-created_at,status(minus prefix for descending). - Filtering:
?status=pending&customer_id=42.
- Sorting:
6. Security, Rate Limiting & Auth
- 6.1 Explicit Auth Scopes:
- Every endpoint specification must state its authorization tier:
Public,AuthenticatedUser, orRole(Admin).
- Every endpoint specification must state its authorization tier:
- 6.2 Rate Limiting:
- Protect all public and compute-heavy endpoints. Return
429 Too Many Requestswith aRetry-After: 60header.
- Protect all public and compute-heavy endpoints. Return
- 6.3 Boundary Input Validation:
- Validate and sanitize all query parameters, route IDs, and request JSON bodies before invoking service logic.
7. Spec-First Documentation
- Contract Before Code: Author the OpenAPI 3.1 specification or GraphQL schema alongside implementation.
- Complete Endpoint Schema: Every endpoint definition must include:
- Purpose & summary description.
- Authentication requirement / OAuth scopes.
- JSON request payload schema with required fields.
- Response schemas for 2xx success and 4xx/5xx failure modes.
- One copy-pasteable cURL or JSON request/response example.
Detailed References
references/status-codes.md: Full status code semantics, RFC 9457 Problem Details JSON format, and common anti-patterns (such as HTTP 200 with error bodies).references/graphql-notes.md: GraphQL schema-first patterns, nullability discipline, DataLoaders for N+1 prevention, query depth/complexity security limits, and REST vs GraphQL decision matrix.
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.

