api-design
Skill1 starsChanged 8 months agoMITView on GitHub
REST API design conventions and contract standards. Use when: designing API endpoints, defining request/response schemas, implementing pagination, versioning APIs, creating OpenAPI specs, adding rate limiting, designing error responses, auditing existing APIs for REST convention compliance, or improving API consistency and documentation.
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
- Lukk17/agent-standardstheir own version, first seen Oct 5, 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
Used with
Projects with it also use data-modeling, ci-pipeline 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.
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
InfopibeSkilldeployment-patterns
Deployment workflows, CI/CD pipeline patterns, Docker containerization, health checks, rollback strategies, and production readiness checklists for web applications.
Also in 10 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
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 repository42 other files it gives its agents.
- accessibility-testingSkill
- alternatives-analysisSkill
- anomaly-detectionSkill
- async-messagingSkill
- caching-strategiesSkill
- chartsSkill
- cicdSkill
- code-reviewSkill
- commsSkill
- critical-feedbackSkill
- data-analysisSkill
- databaseSkill
- data-migrationsSkill
- data-visualizationSkill
- dependency-managementSkill
- dockerSkill
- error-handlingSkill
- feature-flagsSkill
- git-workflowSkill
- goalsSkill
- ide-setupSkill
- large-changeSkill
- logging-metricsSkill
- markdown-docsSkill
- mcp-serverSkill
- meeting-agendasSkill
- okrsSkill
- presentationsSkill
- product-managementSkill
- prompt-writingSkill
- pythonSkill
- reclassificationSkill
- release-managementSkill
- retrospectivesSkill
- roadmap-planningSkill
- securitySkill
- stakeholder-commsSkill
- statisticsSkill
- status-updatesSkill
- testingSkill
- ticket-writingSkill
- typescriptSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
15 rules. 0 are common, 10 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 104 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 25
Use plural nouns for collections: /projects, /users, /orders.
- Very specific: line 26
Use nested routes for relationships: /projects/{id}/members.
- Distinctive: line 27
Keep URLs flat — avoid nesting deeper than 2 levels.
- Very specific: line 28
Use kebab-case for multi-word resources: /build-logs, not /buildLogs.
- Distinctive: line 44
Use the correct status code.
- Distinctive: line 62
All errors return a consistent shape:
- Distinctive: line 82
Never expose stack traces, internal paths, or database errors.
- Distinctive: line 86
Prefer cursor-based pagination over offset-based.
- Very specific: line 126
Use URL path versioning: /v1/projects.
- Distinctive: line 127
Only increment the major version for breaking changes.
- Distinctive: line 141
If the same key is seen again, return the stored response without re-executing.
- Very specific: line 161
Timestamps: Always ISO 8601 with timezone: 2026-03-20T12:00:00Z.
- Distinctive: line 168
Every API must have an OpenAPI 3.x spec.
- Distinctive: line 170
Document all error responses, not just the happy path.
- Distinctive: line 172
Keep the spec in sync — generate from code, don't maintain separately.
“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 Standards
When to Use
- Designing new API endpoints or resources
- Defining request/response schemas
- Implementing pagination, filtering, or sorting
- Versioning an API
- Writing OpenAPI/Swagger documentation
- Adding rate limiting or idempotency
- Auditing existing APIs for REST convention violations (naming, status codes, error shapes, pagination patterns)
- Improving API consistency across endpoints (response envelopes, error formats, query parameter conventions)
REST Conventions
Resource Naming
- Use plural nouns for collections:
/projects,/users,/orders. - Use nested routes for relationships:
/projects/{id}/members. - Keep URLs flat — avoid nesting deeper than 2 levels. Use query params for filtering beyond that.
- Use kebab-case for multi-word resources:
/build-logs, not/buildLogs.
HTTP Methods
| Method | Purpose | Idempotent | Response |
GET | Read resource(s) | Yes | 200 with body |
POST | Create resource | No | 201 with created resource |
PUT | Replace resource entirely | Yes | 200 with updated resource |
PATCH | Partial update | No* | 200 with updated resource |
DELETE | Remove resource | Yes | 204 no body |
*PATCH can be made idempotent with proper design.
Status Codes
Use the correct status code. Don't return 200 for everything.
| Code | When |
| 200 | Successful read or update |
| 201 | Resource created |
| 204 | Successful delete (no body) |
| 400 | Invalid request (validation error, malformed body) |
| 401 | Authentication required or invalid |
| 403 | Authenticated but not authorized |
| 404 | Resource not found |
| 409 | Conflict (duplicate, state mismatch) |
| 422 | Semantically invalid (well-formed but logically wrong) |
| 429 | Rate limited |
| 500 | Server error (never expose internals) |
Error Response Format
All errors return a consistent shape:
{
"error": "validation_error",
"message": "Name is required and must be between 1-100 characters",
"status": 400,
"details": [
{ "field": "name", "issue": "required" }
],
"request_id": "abc-123"
}error: Machine-readable error code (snake_case).message: Human-readable explanation.status: HTTP status code (duplicated for convenience).details: Optional array of field-level errors.request_id: Correlation ID for debugging.
Never expose stack traces, internal paths, or database errors.
Pagination: Cursor-Based
Prefer cursor-based pagination over offset-based. Offset pagination breaks when data changes between pages.
Request
GET /projects?limit=25&cursor=eyJpZCI6MTIzfQlimit: Page size (default: 25, max: 100).cursor: Opaque string encoding the position. Base64-encoded JSON is common.
Response
{
"data": [...],
"pagination": {
"next_cursor": "eyJpZCI6MTQ4fQ",
"has_more": true,
"total": 247
}
}totalis optional — include if cheaply available, omit if it requires a full count query.- First page request omits
cursor.
Filtering and Sorting
GET /projects?status=active&owner=usr_42&sort=-updated_at&fields=id,name,status- Filter by field name as query param.
- Sort with
sortparam. Prefix with-for descending. - Sparse fields with
fieldsparam to reduce payload size. - Multiple values for same filter:
status=active,archived(comma-separated).
Versioning
- Use URL path versioning:
/v1/projects. - Only increment the major version for breaking changes.
- Support the previous version for a deprecation period. Return
SunsetandDeprecationheaders on the old version. - Non-breaking changes (new optional fields, new endpoints) do not require a version bump.
Idempotency
For non-idempotent operations (POST), support an Idempotency-Key header:
POST /orders
Idempotency-Key: unique-client-generated-uuid- Store the key + response for a TTL (e.g., 24 hours).
- If the same key is seen again, return the stored response without re-executing.
- Return
409 Conflictif the key was used with different request body.
Rate Limiting
Return rate limit info in response headers:
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 42
X-RateLimit-Reset: 1711000800- Return
429 Too Many Requestswhen limit is exceeded. - Include
Retry-Afterheader with seconds until reset. - Rate limit by API key, user, or IP — not globally.
Request/Response Conventions
- Request bodies:
camelCasefor JSON APIs consumed by JavaScript clients,snake_casefor Python-to-Python APIs. Pick one and be consistent. - Timestamps: Always ISO 8601 with timezone:
2026-03-20T12:00:00Z. - IDs: Strings, not integers. Use prefixed IDs when helpful:
prj_123,usr_456. - Nulls: Omit null fields from responses rather than including
"field": null. - Envelope: Wrap collections in
{ "data": [...] }. Single resources can be returned directly or wrapped consistently.
OpenAPI Documentation
- Every API must have an OpenAPI 3.x spec.
- FastAPI generates this automatically — ensure all routes have type annotations, descriptions, and example values.
- Document all error responses, not just the happy path.
- Include authentication requirements per endpoint.
- Keep the spec in sync — generate from code, don't maintain separately.
For FastAPI web server implementation patterns, see the python-web-server skill. For database design and query patterns backing API endpoints, see the database skill. For input validation and security hardening, see the security skill.
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.

