api-design
Skill1 starsChanged 6 months agoMITView on GitHub
Design consistent HTTP/REST endpoints with sensible naming, status codes, pagination, error formats, and versioning. Use when the user asks to design, review, or extend an HTTP API, or wants feedback on endpoint shape.
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 8 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 repository50 other files it gives its agents.
- accessibility-reviewSkill
- adr-authorSkill
- architecture-reviewSkill
- caching-strategySkill
- changelogSkill
- ci-cd-pipelineSkill
- codebase-explorationSkill
- code-reviewSkill
- code-style-guideSkill
- context-engineeringSkill
- conventional-commitsSkill
- cost-optimizationSkill
- database-migrationSkill
- data-privacy-reviewSkill
- debuggingSkill
- dependency-updateSkill
- deprecation-migrationSkill
- error-handlingSkill
- feature-flag-rolloutSkill
- filament-resource-designSkill
- flux-ui-patternsSkill
- git-workflowSkill
- i18n-reviewSkill
- idea-refineSkill
- incident-responseSkill
- incremental-implementationSkill
- inertia-patternsSkill
- laravel-ai-featuresSkill
- laravel-eloquent-performanceSkill
- laravel-queue-designSkill
- laravel-testingSkill
- livewire-component-designSkill
- llm-feature-designSkill
- observabilitySkill
- onboarding-docSkill
- performance-budgetSkill
- pr-descriptionSkill
- primevue-patternsSkill
- refactoringSkill
- release-checklistSkill
- resilience-patternsSkill
- runbook-authorSkill
- security-auditSkill
- spec-writingSkill
- task-breakdownSkill
- tech-debt-triageSkill
- test-writingSkill
- threat-modelingSkill
- using-elyra-skillsSkill
- vue-component-patternsSkill
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 6 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 104 edited versions we read keep these.
6
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
Anchor to existing patterns: Read 2–3 existing endpoints in the same codebase.
- Very specific: line 34
Use plural nouns for collections: /users, /orders, /articles
- Very specific: line 35
Use IDs, not slugs, for identity: /users/42 (slugs are for SEO, not for APIs)
- Very specific: line 39
Use kebab-case in paths: /account-settings, not /accountSettings or /account_settings
- Distinctive: line 41
No verbs in paths — the HTTP method *is* the verb
- Very specific: line 75
Don't invent custom codes.
- Distinctive: line 79
Use a single, documented error shape across the entire API:
- Distinctive: line 100
Consider RFC 9457 Problem Details if the consumer already uses it.
- Very specific: line 113
Always cap limit / per_page server-side.
- Distinctive: line 129
Only bump the major version for breaking changes.
- Distinctive: line 133
When CRUD doesn't fit (publish, archive, retry, refund), prefer:
- Very specific: line 138
Don't go full RPC: POST /publishArticle?id=42.
“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
Principles for HTTP/REST APIs that are predictable, debuggable, and pleasant to consume. Opinionated where the field has converged; flexible where reasonable people disagree.
When to use
- "Design an endpoint for X"
- "How should this API look?"
- "Review this API"
- "Add an endpoint to …"
Procedure
- Anchor to existing patterns. Read 2–3 existing endpoints in the same codebase. New endpoints should look like neighbors.
- Model the resource, not the action. Most actions become CRUD on a resource. If they don't (e.g. "publish"), see "Actions on resources" below.
- Sketch the contract before writing code: path, method, request body, response body, status codes, errors.
- Check it against the consistency checklist below.
- Document it — even one paragraph in the PR is better than nothing.
Resource naming
- Use plural nouns for collections:
/users,/orders,/articles - Use IDs, not slugs, for identity:
/users/42(slugs are for SEO, not for APIs) - Nest to express ownership, max 2 levels deep:
- ✅
/users/42/orders - ❌
/users/42/orders/7/items/3/shipments
- ✅
- Use kebab-case in paths:
/account-settings, not/accountSettingsor/account_settings - Lowercase everything in paths
- No verbs in paths — the HTTP method is the verb
Methods
| Method | Purpose | Idempotent | Safe |
GET | Retrieve | yes | yes |
POST | Create, or non-idempotent action | no | no |
PUT | Replace (full update) | yes | no |
PATCH | Partial update | no* | no |
DELETE | Remove | yes | no |
* PATCH can be idempotent if you design it that way; don't rely on it.
Status codes
Pick from this short list. Resist the urge to be clever.
| Code | Meaning | Use for |
200 OK | Success with body | GET, PATCH, PUT returning resource |
201 Created | Resource created | POST that creates a resource (return it + Location header) |
202 Accepted | Accepted for async processing | Long-running jobs |
204 No Content | Success, no body | DELETE, PUT without return |
400 Bad Request | Malformed request | Bad JSON, missing required fields |
401 Unauthorized | Not authenticated | Missing/invalid credentials |
403 Forbidden | Authenticated but not allowed | Permission denied |
404 Not Found | Resource doesn't exist | Unknown ID |
409 Conflict | State conflict | Duplicate, version mismatch |
422 Unprocessable Entity | Validation failed | Well-formed but semantically invalid |
429 Too Many Requests | Rate-limited | Include Retry-After |
500 Internal Server Error | We broke it | Unexpected server fault |
503 Service Unavailable | Temporarily down | Maintenance, dependency outage |
Don't invent custom codes. Don't return 200 with {"error": "..."}.
Errors
Use a single, documented error shape across the entire API:
{
"error": {
"code": "validation_failed",
"message": "Request failed validation.",
"details": [
{ "field": "email", "code": "invalid_format" },
{ "field": "age", "code": "must_be_positive" }
],
"request_id": "req_01HX…"
}
}- Stable, machine-readable
code(snake_case, never localized) - Human-readable
message(English; localize on the client) detailsfor per-field validationrequest_idfor support / log correlation
Consider RFC 9457 Problem Details if the consumer already uses it.
Pagination
Pick one and stick with it across the API.
- Cursor-based (preferred for large/changing data):
- Request:
?limit=50&cursor=eyJpZCI6... - Response:
{ "data": [...], "next_cursor": "...", "has_more": true }
- Request:
- Page-based (fine for small/static data):
- Request:
?page=2&per_page=50 - Response:
{ "data": [...], "page": 2, "per_page": 50, "total": 1234 }
- Request:
Always cap limit / per_page server-side. Document the max.
Filtering, sorting, sparse fields
- Filter:
?status=active&created_after=2025-01-01 - Sort:
?sort=-created_at,name(leading-= descending) - Sparse fields:
?fields=id,email,created_at
Versioning
Pick one strategy and commit:
- URL:
/v1/users— most visible, easiest to route - Header:
Accept: application/vnd.example.v1+json— cleaner URLs, harder to debug - Avoid query-string versioning
Only bump the major version for breaking changes. Additive changes (new fields, new endpoints) don't require a new version.
Actions on resources
When CRUD doesn't fit (publish, archive, retry, refund), prefer:
- State transitions via PATCH:
PATCH /articles/42 {"status": "published"}— best if you have multiple states - Sub-resources for explicit actions:
POST /articles/42/publish— pragmatic when the action has side effects or its own payload
Don't go full RPC: POST /publishArticle?id=42. You're using HTTP; use it.
Consistency checklist
- Resource name is a plural noun
- Path uses kebab-case and lowercase
- HTTP method matches semantics (idempotency!)
- Status codes from the short list
- Error response matches the API-wide error shape
POSTthat creates returns201+Locationheader- List endpoints paginate and cap
limit - Timestamps are ISO 8601 with timezone (
2026-05-22T14:30:00Z) - IDs are opaque strings (not auto-increment ints leaked) when possible
- No sensitive data in URLs (use headers / body)
- Versioning strategy followed
- Authentication / authorization checks documented per endpoint
Anti-patterns
- ❌
GET /getUser?id=42— verb in path, query param for identity - ❌
POST /users/delete/42— DELETE exists for a reason - ❌ Returning
200with{"success": false} - ❌ Inconsistent casing:
userIdin one response,user_idin another - ❌ Auto-increment IDs in URLs leaking row counts to the public
- ❌ Pagination with no upper bound on
limit - ❌ Mixing snake_case and camelCase in the same payload
- ❌ "Soft 200" — returning HTTP success but logical failure
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.

