with one click
api-design
RESTful API design principles and best practices
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
RESTful API design principles and best practices
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | api-design |
| description | RESTful API design principles and best practices |
| version | 1.0.0 |
| tags | ["api","rest","http","design","architecture"] |
This skill provides expert guidance on designing clean, intuitive, and maintainable RESTful APIs.
Think in terms of resources (nouns), not actions (verbs)
Good:
GET /users # Get all users
GET /users/123 # Get specific user
POST /users # Create new user
PUT /users/123 # Update user
DELETE /users/123 # Delete user
Bad:
GET /getUsers
POST /createUser
POST /updateUser/123
POST /deleteUser/123
Success (2xx)
200 OK: Successful GET, PUT, PATCH, DELETE201 Created: Successful POST with new resource204 No Content: Successful request with no bodyClient Errors (4xx)
400 Bad Request: Invalid request format/data401 Unauthorized: Authentication required403 Forbidden: Authenticated but not authorized404 Not Found: Resource doesn't exist422 Unprocessable Entity: Validation errorsServer Errors (5xx)
500 Internal Server Error: Unexpected server error503 Service Unavailable: Temporary downtimeOption 1: URL versioning (most common)
/api/v1/users
/api/v2/users
Option 2: Header versioning
Accept: application/vnd.myapi.v1+json
Option 3: Query parameter
/users?version=1
GET /users?page=2&limit=20
Response:
{
"data": [...],
"pagination": {
"page": 2,
"limit": 20,
"total": 150,
"totalPages": 8,
"hasNext": true,
"hasPrev": true
}
}
GET /users?role=admin&status=active&sort=createdAt:desc
GET /products?minPrice=100&maxPrice=500&category=electronics
GET /users/123/posts # Get posts for user 123
GET /users/123/posts/456 # Get specific post by user 123
# Avoid deep nesting (max 2 levels)
Bad: /users/123/posts/456/comments/789/likes
Good: /comments/789/likes
POST /users
{
"email": "user@example.com",
"name": "John Doe",
"role": "admin"
}
201 Created
Location: /users/123
{
"id": "123",
"email": "user@example.com",
"name": "John Doe",
"role": "admin",
"createdAt": "2025-11-05T10:30:00Z",
"updatedAt": "2025-11-05T10:30:00Z"
}
400 Bad Request
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"details": [
{
"field": "email",
"message": "Email is required"
},
{
"field": "password",
"message": "Password must be at least 8 characters"
}
]
}
}
Authorization: Bearer <jwt-token>
X-RateLimit-Limit: 100
X-RateLimit-Remaining: 75
X-RateLimit-Reset: 1699200000
/users, /products, /orders/order-items{
"firstName": "John", // camelCase (JavaScript/JSON common)
"lastName": "Doe",
"createdAt": "2025-11-05",
"isActive": true
}
GET /users/{id}
Description: Retrieve a specific user by ID
Parameters:
- id (path, required): User ID
Responses:
200: User found and returned
404: User not found
401: Authentication required
Example Response:
{
"id": "123",
"email": "user@example.com",
...
}
GET /users/123?fields=id,email,name
Cache-Control: max-age=3600
ETag: "33a64df551425fcc55e4d42a148795d9f25f89d4"
Accept-Encoding: gzip, deflate
Content-Encoding: gzip
POST /reports/generate
202 Accepted
Location: /reports/status/abc123
GET /reports/status/abc123
{
"status": "processing",
"progress": 45
}
When this skill is active:
This skill should be used when the user wants to validate or run GitHub Actions or GitLab CI workflows locally, test CI before pushing, debug a failing action without burning CI minutes, check ".github/workflows" or ".gitlab-ci.yml" files, or use wrkflw (an `act` alternative). Also triggers before pushing changes that touch workflow files. Provides subcommand selection (validate/run/watch/tui/trigger/list), runtime-mode guidance (docker/podman/emulation), copy-paste recipes, and the tool's known limitations so expectations are set correctly.
Analytical framework for writing style analysis and voice profile construction. Use when analyzing writing samples, building voice profiles, comparing styles, synthesizing metavoice descriptions, or understanding stylistic dimensions. Triggers on "analyze style", "style profile", "voice analysis", "writing fingerprint", "metavoice", "style comparison", "what makes my writing distinctive".
This skill should be used when the user asks to "generate an image", "create a picture", "make an illustration", "edit this image", "upscale", or any request involving AI image generation, nanobanana, nano banana, visual grounding, prompt engineering, or image editing. Provides model selection guidance (Flash/NB2/Pro), prompt engineering techniques, visual grounding best practices, resolution and cost optimization, and multi-image editing workflows for the Nano Banana MCP server (Gemini image models).
This skill should be used when the user asks to "update documentation", "generate README", "audit docs", "add CHANGELOG", "fix outdated docs", "create CONTRIBUTING.md", "add API documentation", "check documentation coverage", or mentions documentation gaps, stale docs, or missing project documentation. Detects project type from manifest files, scores existing documentation quality, generates or updates README, CHANGELOG, CONTRIBUTING, and code documentation for any repository type.
This skill should be used when the user asks about "Android project setup", "new Android app", "MVVM", "Clean Architecture", "Android architecture", "Hilt", "dependency injection", "Room database", "Retrofit", "data layer", "repository pattern", "Android project structure", "Kotlin Android", "Jetpack libraries", or mentions starting a new Android project, choosing an architecture pattern, or setting up dependency injection. Provides opinionated architecture guidance for Kotlin/Compose Android apps.
This skill should be used when the user asks about "Android permissions", "runtime permissions", "camera permission", "storage permission", "notifications", "Photo Picker", "Credential Manager", "Predictive Back", "per-app language", "Baseline Profiles", "Android 16", "adaptive layouts", "Android crash", "Gradle sync fails", "build error", "ANR", "ProGuard", "R8", "Android emulator", or mentions requesting permissions, using platform APIs, troubleshooting Android errors, or dealing with crashes and build failures. Provides permissions guidance, modern platform features, and troubleshooting for Android development.