api-design
Skill1 starsChanged 5 days agoMITView on GitHub
Design RESTful and GraphQL APIs — endpoint naming, request/response contracts, error handling, pagination, versioning, auth patterns, OpenAPI specs. Triggers: design the API, API contract, REST API, GraphQL schema, error response format, pagination, API versioning, OpenAPI, swagger, endpoints. Use architecture-design for REST-vs-GraphQL or monolith-vs-microservices decisions.
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 9 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
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
CodeWithBehnamSkilldmux-workflows
Multi-agent orchestration using dmux (tmux pane manager for AI agents). Patterns for parallel agent workflows across Claude Code, Codex, OpenCode, and other harnesses. Use when running multiple agent sessions in parallel or coordinating multi-agent development workflows.
Also in 16 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 repository68 other files it gives its agents.
- AGENTS.mdAGENTS.md
- accessibility-designSkill
- ai-evaluationSkill
- architecture-designSkill
- architecture-documentationSkill
- brainstormingSkill
- browser-verificationSkill
- bug-investigatingSkill
- build-vs-buySkill
- cicd-pipelineSkill
- code-archaeologySkill
- code-reviewingSkill
- code-slop-cleanupSkill
- compliance-privacySkill
- configuration-strategySkill
- containerizationSkill
- data-modelingSkill
- data-pipeline-designSkill
- data-qualitySkill
- dependency-impact-analysisSkill
- dependency-managementSkill
- deployment-checklistSkill
- deployment-repoSkill
- dx-auditSkill
- effort-estimationSkill
- exploratory-data-analysisSkill
- feature-planningSkill
- finops-cost-optimizationSkill
- frontend-architectureSkill
- gitops-deliverySkill
- git-workflowSkill
- incident-responseSkill
- infrastructure-as-codeSkill
- llm-app-engineeringSkill
- metrics-and-okrsSkill
- ml-experiment-trackingSkill
- ml-model-deploymentSkill
- ml-pipeline-designSkill
- mobile-architectureSkill
- mobile-releaseSkill
- notebook-to-productionSkill
- observability-designSkill
- performance-optimizationSkill
- plan-executionSkill
- prd-writingSkill
- project-documentationSkill
- project-proposalSkill
- project-reviewSkill
- refactoringSkill
- release-managementSkill
- research-methodologySkill
- resilience-engineeringSkill
- retrospectiveSkill
- rollback-strategySkill
- security-auditSkill
- skill-routerSkill
- statistical-analysisSkill
- strategic-reviewSkill
- subagent-orchestrationSkill
- tdd-workflowSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 7 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 165 edited versions we read keep these.
7
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
- Distinctive: line 34
Start from the domain model, not the UI:
- Distinctive: line 73
Use consistent patterns across all endpoints — see references/rest-conventions.md for standard shapes.
- Distinctive: line 77
ID format: default ULID (sortable, no coordination).
- Very specific: line 79
Null vs absent: default omit absent fields, return null only for a known-empty value
- Very specific: line 80
Envelope or not: default { data, pagination } on collections, flat on single resources
- Distinctive: line 84
Every API error should use the same shape.
- Distinctive: line 129
Filtering: Use query parameters with clear naming:
- Very specific: line 134
Sorting: Use a sort parameter with - prefix for descending:
- Distinctive: line 152
Use the template at templates/api-spec.md for markdown output.
- Very specific: line 156
KISS: Prefer flat resource URLs over deeply nested ones.
- Distinctive: line 158
YAGNI: Don't add filtering or sorting until a list endpoint actually needs them.
“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
Design APIs that are consistent, predictable, and easy to consume. A well-designed API is intuitive to use without reading documentation — but has great documentation anyway.
Scope Boundary
This skill designs the contract (endpoints, request/response shapes, error formats, pagination). For higher-level decisions (REST vs GraphQL, API gateway, authentication strategy), use the architecture-design skill first, then return here to design the specifics.
The Deliverable
An API design is not finished until it carries all six of these. A list of endpoints is a third of an answer:
- Resources and endpoints — URLs, methods, and how relationships are expressed
- Request/response schemas — field names, types, and the response envelope
- The error format — one shape for every error, plus the status-code mapping
- The pagination contract — parameters and response shape for every list endpoint
- Auth per endpoint — scheme, who may call it, and which endpoints are public
- The written spec — markdown or OpenAPI, using templates/api-spec.md
Deliver all six in the same response. Where a choice is genuinely open, pick the default this skill recommends, say you picked it, and keep going — never return a design as a list of questions.
Workflow
Step 1: Identify Resources and Operations
Start from the domain model, not the UI:
- What are the resources? (nouns: users, orders, products, comments)
- What operations exist? (CRUD + domain-specific: archive, publish, approve)
- What are the relationships? (user has orders, order contains items)
- Who consumes this API? (web app, mobile app, third-party, internal service)
Map each resource to its operations before choosing URLs or methods.
Step 2: Design Endpoints
Apply RESTful naming conventions — see references/rest-conventions.md:
GET /api/v1/users → List users
POST /api/v1/users → Create user
GET /api/v1/users/:id → Get user
PATCH /api/v1/users/:id → Update user (partial)
DELETE /api/v1/users/:id → Delete user
# Nested resources (when the child only makes sense in parent context)
GET /api/v1/users/:id/orders → List user's orders
POST /api/v1/users/:id/orders → Create order for user
# Actions that don't map to CRUD
POST /api/v1/orders/:id/cancel → Cancel an order
POST /api/v1/users/:id/verify → Verify a user's emailPresent the endpoint list, then design the schemas in the same response — the list is a checkpoint, not a stopping point. Invite correction on the naming while delivering the rest.
Step 3: Define Request/Response Schemas
For each endpoint, define:
Request: Query parameters (for filtering/pagination), path parameters, request body with field types and validation rules.
Response: Status code, response body shape, included relationships.
Use consistent patterns across all endpoints — see references/rest-conventions.md for standard shapes.
Decisions to make now, with a stated default rather than a question — flag them for correction and move on:
- ID format: default ULID (sortable, no coordination); integer or UUID if the stack forces it
- Date format: ISO 8601 always (
2025-03-05T14:30:00Z) — not a decision - Null vs absent: default omit absent fields, return
nullonly for a known-empty value - Envelope or not: default
{ data, pagination }on collections, flat on single resources
Step 4: Standardize Error Responses
Every API error should use the same shape. Recommend this format:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Human-readable description for developers",
"details": [
{
"field": "email",
"message": "Must be a valid email address"
}
]
}
}Map HTTP status codes consistently:
400— Client sent invalid data (validation errors)401— Authentication required or invalid403— Authenticated but not authorized for this action404— Resource not found409— Conflict (duplicate, state violation)422— Valid syntax but semantically invalid (business rule violation)429— Rate limited500— Server error (never expose internals)
Step 5: Design Pagination, Filtering, Sorting
For any list endpoint that could return many results:
Pagination (recommend cursor-based for most cases):
GET /api/v1/orders?cursor=abc123&limit=20
Response:
{
"data": [...],
"pagination": {
"next_cursor": "def456",
"has_more": true
}
}Filtering: Use query parameters with clear naming:
GET /api/v1/orders?status=pending&created_after=2025-01-01Sorting: Use a sort parameter with - prefix for descending:
GET /api/v1/orders?sort=-created_at,totalStep 6: Define Authentication and Authorization
For each endpoint, specify:
- Authentication: Required? What scheme? (Bearer token, API key, session)
- Authorization: What roles/permissions can access this? Document per-endpoint.
- Public endpoints: Explicitly mark which endpoints don't require auth.
Step 7: Produce the Specification
Output the API design as one of:
- Markdown document — for internal APIs and quick designs
- OpenAPI 3.x spec — for formal APIs, enables codegen and tooling
Use the template at templates/api-spec.md for markdown output.
Principles Applied
- KISS: Prefer flat resource URLs over deeply nested ones.
/orders?user_id=123is simpler than/users/123/orders/456/items/789. - DRY: Standardize error format, pagination, and envelope structure once. Don't reinvent per-endpoint.
- YAGNI: Don't add filtering or sorting until a list endpoint actually needs them. Pagination is not in this category — any collection that can grow ships with the pagination contract from day one, because adding it later is a breaking change for every consumer.
- Functional Independence: Each endpoint should do one thing. Avoid "Swiss army knife" endpoints that change behavior based on query parameters.
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.

