api-design
Skill12 starsChanged 3 months agoMITView on GitHub
Generates RESTful and GraphQL API designs with OpenAPI specs, proper resource naming, HTTP method usage, status codes, pagination, filtering, error responses, versioning strategies, and GraphQL schema patterns. Triggers on: "design API", "create API spec", "OpenAPI", "REST endpoint design", "GraphQL schema".
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 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.
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 repository38 other files it gives its agents.
- agentcore-harness-builderSkill
- ai-native-sdlcSkill
- algorithmic-artSkill
- aws-well-architected-reviewSkill
- brand-guidelinesSkill
- canvas-designSkill
- cicd-pipelineSkill
- claude-apiSkill
- code-review-assistantSkill
- code-standards-adopterSkill
- database-schema-designSkill
- doc-coauthoringSkill
- docker-compose-generatorSkill
- frontend-designSkill
- fsi-compliance-checkerSkill
- gitlab-ci-kiro-pipelineSkill
- git-workflowSkill
- hello-worldSkill
- internal-commsSkill
- java-unit-test-generatorSkill
- kiro-project-setupSkill
- legacy-code-testingSkill
- mcp-builderSkill
- python-project-setupSkill
- rest-api-test-generatorSkill
- security-story-writingSkill
- selenium-ui-test-generatorSkill
- skill-creatorSkill
- slack-gif-creatorSkill
- sprint-planningSkill
- sprint-security-reviewSkill
- terraform-moduleSkill
- theme-factorySkill
- threat-modelingSkill
- user-story-writingSkill
- webapp-testingSkill
- web-artifacts-builderSkill
- template-skillSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 12 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 104 edited versions we read keep these.
12
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 105
Use query parameters for filtering
- Distinctive: line 107
Document all available filter fields
- Distinctive: line 111
Use a consistent error envelope:
- Distinctive: line 136
Never expose stack traces, SQL, or internal paths
- Distinctive: line 201
When the consumer needs flexible queries or the API serves multiple clients with different data needs, offer a GraphQL alternative:
- Very specific: line 263
Use Relay-style connections (edges/nodes/pageInfo) for paginated lists
- Distinctive: line 266
Use input types for mutation arguments
- Distinctive: line 267
Prefer specific scalar types (DateTime, URL, Email) over raw String where applicable
- Distinctive: line 295
Always use plural nouns for resource names
- Distinctive: line 296
Prefer cursor pagination for datasets that change frequently
- Distinctive: line 297
Use 422 for business logic validation, 400 for malformed requests
- Distinctive: line 300
Every endpoint must have a defined error response
- Distinctive: line 301
Keep the OpenAPI spec as the source of truth, generate docs from it
“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
Instructions
Step 1: Gather Requirements
Ask:
- What resources does this API manage? (e.g., users, orders, products)
- What operations are needed? (CRUD, search, bulk operations, async jobs)
- Who consumes it? (internal services, public clients, mobile apps)
- Auth model? (API key, OAuth2, JWT)
- Output format preference? (OpenAPI 3.0 YAML, endpoint list, or both)
Step 2: Resource Naming
Apply these naming conventions:
| Rule | Good | Bad |
| Plural nouns | /users | /user, /getUsers |
| Nested resources | /users/{id}/orders | /getUserOrders |
| Lowercase with hyphens | /order-items | /orderItems, /order_items |
| No verbs in URLs | /users/{id}/activate (POST) | /activateUser |
| Max 3 levels deep | /users/{id}/orders | /users/{id}/orders/{id}/items/{id}/reviews |
For deeply nested resources, promote to top-level with query filters:
GET /reviews?order_id=123&user_id=456Step 3: HTTP Methods and Status Codes
Map operations to methods:
| Operation | Method | Success Code | Response Body |
| List/Search | GET | 200 | Collection |
| Get single | GET | 200 | Resource |
| Create | POST | 201 | Created resource + Location header |
| Full update | PUT | 200 | Updated resource |
| Partial update | PATCH | 200 | Updated resource |
| Delete | DELETE | 204 | Empty |
| Async operation | POST | 202 | Job status + Location header |
Error codes to use consistently:
- 400 - Malformed request (bad JSON, missing required field)
- 401 - Not authenticated
- 403 - Authenticated but not authorized
- 404 - Resource not found
- 409 - Conflict (duplicate, version mismatch)
- 422 - Valid JSON but failed business validation
- 429 - Rate limited
- 500 - Server error (never expose internals)
Step 4: Pagination, Filtering, and Sorting
Pagination (cursor-based preferred for large datasets):
GET /orders?cursor=eyJpZCI6MTAwfQ&limit=25
Response:
{
"data": [...],
"pagination": {
"next_cursor": "eyJpZCI6MTI1fQ",
"has_more": true
}
}Offset pagination (simpler, fine for small datasets):
GET /orders?page=2&per_page=25
Response:
{
"data": [...],
"pagination": {
"page": 2,
"per_page": 25,
"total": 142,
"total_pages": 6
}
}Filtering and sorting:
GET /orders?status=pending&created_after=2024-01-01&sort=-created_at,+total- Use query parameters for filtering
- Prefix sort fields with
-for descending,+for ascending - Document all available filter fields
Step 5: Error Response Format
Use a consistent error envelope:
{
"error": {
"code": "VALIDATION_FAILED",
"message": "The request body contains invalid fields",
"details": [
{
"field": "email",
"issue": "must be a valid email address",
"value": "not-an-email"
}
],
"request_id": "req_abc123",
"documentation_url": "https://api.example.com/docs/errors#VALIDATION_FAILED"
}
}Rules:
- Machine-readable
code(UPPER_SNAKE_CASE) - Human-readable
message - Field-level
detailsfor validation errors - Include
request_idfor debugging - Never expose stack traces, SQL, or internal paths
Step 6: Generate OpenAPI Spec
Produce an OpenAPI 3.0 specification:
openapi: 3.0.3
info:
title: [Service Name] API
version: 1.0.0
description: [Brief description]
paths:
/resources:
get:
summary: List resources
operationId: listResources
parameters:
- name: limit
in: query
schema:
type: integer
default: 25
maximum: 100
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '#/components/schemas/ResourceList'
components:
schemas:
Resource:
type: object
required: [id, name]
properties:
id:
type: string
format: uuid
name:
type: stringStep 7: Versioning Strategy
Recommend URL-path versioning for most cases:
/v1/users
/v2/usersWhen to create a new version:
- Removing a field from responses
- Changing a field type
- Removing an endpoint
- Changing authentication mechanism
When NOT to version (additive changes):
- Adding new optional fields
- Adding new endpoints
- Adding new query parameters
Step 8: GraphQL Schema Design
When the consumer needs flexible queries or the API serves multiple clients with different data needs, offer a GraphQL alternative:
Schema definition:
type Query {
book(id: ID!): Book
books(filter: BookFilter, first: Int = 25, after: String): BookConnection!
}
type Mutation {
createBook(input: CreateBookInput!): BookPayload!
updateBook(id: ID!, input: UpdateBookInput!): BookPayload!
deleteBook(id: ID!): DeletePayload!
}
type Book {
id: ID!
title: String!
author: Author!
publishedAt: DateTime
isbn: String
}
input BookFilter {
title: String
authorId: ID
publishedAfter: DateTime
}
input CreateBookInput {
title: String!
authorId: ID!
isbn: String
}
type BookConnection {
edges: [BookEdge!]!
pageInfo: PageInfo!
}
type BookEdge {
node: Book!
cursor: String!
}
type PageInfo {
hasNextPage: Boolean!
endCursor: String
}
type BookPayload {
book: Book
errors: [UserError!]!
}
type UserError {
field: [String!]
message: String!
}GraphQL design rules:
- Use Relay-style connections (edges/nodes/pageInfo) for paginated lists
- Return payload types from mutations with both the result and possible errors
- Mark non-nullable fields with
!only when truly always present - Use input types for mutation arguments
- Prefer specific scalar types (DateTime, URL, Email) over raw String where applicable
- Nest related data naturally; let the client choose depth via the query
When to choose GraphQL over REST:
- Multiple clients need different subsets of the same data
- Deeply nested relationships are common
- Reducing over-fetching is critical for performance (mobile clients)
- Rapid iteration on client needs without backend changes
When to prefer REST:
- Simple CRUD with uniform consumers
- File uploads or streaming responses
- Strong caching requirements (HTTP caching is simpler with REST)
- Team is more familiar with REST conventions
Example
User says: "Design an API for a bookstore"
Response includes:
- Resource list: books, authors, orders, customers
- Endpoints:
GET /v1/books,POST /v1/orders, etc. - OpenAPI snippet for the books resource
- Error response format
- Pagination on list endpoints
Guidelines
- Always use plural nouns for resource names
- Prefer cursor pagination for datasets that change frequently
- Use 422 for business logic validation, 400 for malformed requests
- Include rate limiting headers in responses (X-RateLimit-Remaining, X-RateLimit-Reset)
- Design for the consumer, not the database schema
- Every endpoint must have a defined error response
- Keep the OpenAPI spec as the source of truth, generate docs from it
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.

