api-design
Skill4 starsChanged 9 months agoMITView on GitHub
Use this skill when designing or reviewing APIs — REST, GraphQL, tRPC, or gRPC. Trigger on keywords: API design, REST, GraphQL, tRPC, gRPC, endpoint, schema, route, OpenAPI, Swagger, API versioning, pagination, API contract, HTTP methods.
190 other projects use a version of this.
Adopted by
Most recently taken up by
- Arupbiswas09/claude_skillstheir own version, first seen Nov 29, 2026
- KevinLoichot/everything-claude-codetheir own version, first seen Nov 29, 2026
- aayushsoam/clawbot-plustheir own version, first seen Nov 29, 2026
- multiplex-ai/muggle-ai-teamstheir own version, first seen Nov 29, 2026
- Cyvid7-Darus10/claude-code-configtheir own version, first seen Nov 29, 2026
- AtulPurohit/Antigravity-Awesome-Skillstheir own version, first seen Nov 29, 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
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
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
InfopibeSkillinvestor-materials
Create and update pitch decks, one-pagers, investor memos, accelerator applications, financial models, and fundraising materials. Use when the user needs investor-facing documents, projections, use-of-funds tables, milestone plans, or materials that must stay internally consistent across multiple fundraising assets.
Also in 21 projects that use this
- +1 more from Infopibe
Other versions190 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 190
- affaan-m/ECC★ 246ksame name
- RostislavDugin/postgresus★ 9.4ksame name
- databasus/databasus★ 9.4ksame name
- authgear/authgear-server★ 2.2ksame name
- xu-xiang/everything-claude-code-zh★ 1.9ksame name
- Aaronontheweb/dotnet-skills★ 1.3ksame name
- epam/ai-dial-chat★ 501same name
- loulanyue/awesome-claude-notes★ 272same name
- KbWen/agentic-os★ 245same name
- DevelopersGlobal/ai-agent-skills★ 220same name
180 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 repository37 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- ai-agent-designSkill
- ai-assisted-learningSkill
- ai-prompting-patternsSkill
- backend-devSkill
- career-growthSkill
- client-communicationSkill
- code-explanationSkill
- code-readingSkill
- code-reviewSkill
- cross-functional-collabSkill
- database-designSkill
- debugging-mindsetSkill
- devops-cicdSkill
- doc-creationSkill
- focus-productivitySkill
- frontend-designSkill
- git-workflowSkill
- incident-responseSkill
- internal-commsSkill
- interview-prepSkill
- mcp-builderSkill
- performance-reviewSkill
- problem-solvingSkill
- prompt-engineeringSkill
- research-synthesisSkill
- resume-portfolioSkill
- self-healing-mindsetSkill
- side-project-planningSkill
- sprint-planningSkill
- system-designSkill
- technical-communicationSkill
- technical-mentoringSkill
- tech-researchSkill
- testingSkill
- threat-modelingSkill
- web-artifacts-builderSkill
The file
We split this skill into the rules it gives an agent
4 rules. 0 are common, 4 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 161 edited versions we read keep these.
4
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 89
Never break existing clients.
- Distinctive: line 120
Use connections pattern for lists (pagination-ready)
- Distinctive: line 122
Use enums for finite value sets
- Distinctive: line 123
Add descriptions to all types and fields
“Common” is measured: kept by at least 6 in 10 of the 161 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
Choosing the Right API Type
| Type | Best For | Avoid When |
| REST | Public APIs, CRUD, simple clients, IoT | Complex nested data, rapid schema iteration |
| GraphQL | Mobile apps, complex nested data, multiple clients | Simple CRUD, small teams new to it |
| tRPC | TypeScript monorepos, internal full-stack TS APIs | Non-TypeScript clients, public APIs |
| gRPC | High-performance microservice comms, streaming | Browser clients, simple use cases |
REST API Design
URL Conventions
GET /users ← list
GET /users/{id} ← single
POST /users ← create
PUT /users/{id} ← replace
PATCH /users/{id} ← partial update
DELETE /users/{id} ← delete
# Nested resources
GET /users/{id}/orders
POST /users/{id}/orders
# Actions (when REST verbs aren't enough)
POST /orders/{id}/cancel
POST /users/{id}/activateHTTP Status Codes
| Code | Use When |
| 200 | Successful GET, PUT, PATCH |
| 201 | Successful POST that creates |
| 204 | Successful DELETE (no body) |
| 400 | Validation failure, bad request |
| 401 | Missing/invalid authentication |
| 403 | Authenticated but not authorized |
| 404 | Resource not found |
| 409 | Conflict (duplicate, version mismatch) |
| 422 | Unprocessable entity (semantic errors) |
| 429 | Rate limit exceeded |
| 500 | Unexpected server error |
Response Envelope
// Collection
{
"data": [...],
"meta": { "total": 100, "page": 1, "perPage": 20 }
}
// Single resource
{ "data": { "id": "1", "name": "James" } }
// Error
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Validation failed",
"details": [{ "field": "email", "issue": "Invalid format" }]
}
}API Design Principles
Versioning Strategy
# URL versioning (most visible, easiest to route)
/v1/users
/v2/users
# Header versioning (cleaner URLs)
Accept: application/vnd.api+json;version=2
```text
Never break existing clients. Deprecate, then remove.
### Pagination
```text
# Offset (simple, good for small datasets)
GET /posts?page=2&perPage=20
# Cursor (fast for large datasets, use for infinite scroll)
GET /posts?cursor=eyJpZCI6MTAwfQ&limit=20
```text
### Filtering & Sorting
```text
GET /orders?status=pending&userId=123
GET /products?sort=-price,name # - prefix = descending
GET /products?fields=id,name,price # sparse fieldsets
```text
### Idempotency
```text
# Include idempotency key for non-idempotent operations
POST /payments
Idempotency-Key: unique-client-generated-uuid
```text
---
## GraphQL Design
### Schema Design Rules
- Describe business domain, not DB structure
- Use connections pattern for lists (pagination-ready)
- Mutations return the modified object
- Use enums for finite value sets
- Add descriptions to all types and fields
```graphql
type Query {
user(id: ID!): User
users(filter: UserFilter, pagination: PaginationInput): UserConnection!
}
type Mutation {
createUser(input: CreateUserInput!): CreateUserPayload!
updateUser(id: ID!, input: UpdateUserInput!): UpdateUserPayload!
}
type UserConnection {
edges: [UserEdge!]!
pageInfo: PageInfo!
totalCount: Int!
}API Security Checklist
- All endpoints require authentication (unless explicitly public)
- Authorization checked per resource, not just per route
- Rate limiting on all endpoints, stricter on auth endpoints
- Input validation on every parameter and body field
- Sensitive data not returned unless explicitly needed
- CORS configured with explicit whitelist
- API versioning strategy defined before going public
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.

