api-designer
БесплатноЗапускает вложенные скриптыНе проверенDesign and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices. Use for…
Об этом скилле
API Designer
Overview
This skill provides comprehensive guidance for designing, documenting, and implementing modern APIs. It covers both REST and GraphQL paradigms, with emphasis on industry best practices, clear documentation, and maintainable architecture. Use this skill to create production-ready API designs that are scalable, secure, and developer-friendly.
Core Capabilities
REST API Design
- Resource-oriented endpoint design with proper URL structure
- HTTP method semantics and status code usage
- Request/response payload design with consistent naming
- Pagination, filtering, and sorting strategies
- Error handling and validation patterns
GraphQL API Design
- Schema definition with type system and relationships
- Query and mutation design with proper input types
- Resolver patterns and performance optimization
- Fragment usage and directive implementation
- N+1 problem prevention strategies
API Documentation
- OpenAPI 3.0 specification generation
- Interactive documentation with Swagger UI
- Authentication and authorization documentation
- Example requests/responses with multiple scenarios
- Code generation from specifications
Authentication & Authorization
- OAuth 2.0 flows (authorization code, client credentials, PKCE)
- JWT token design, validation, and rotation
- API key management and rotation strategies
- Role-based access control (RBAC) implementation
- Rate limiting and throttling patterns
API Versioning
- URL versioning and header-based versioning strategies
- Semantic versioning for API releases
- Deprecation planning and communication
- Backward compatibility maintenance
- Migration path design
When to Use This Skill
Use this skill when:
- Designing a new API from scratch or refactoring existing endpoints
- Creating OpenAPI/Swagger specifications for documentation
- Implementing authentication and authorization flows
- Planning API versioning and deprecation strategies
- Designing GraphQL schemas and resolvers
- Establishing API governance and best practices
REST API Design Workflow
Step 1: Identify Resources
Identify core resources (nouns) your API will expose:
Resources: Users, Posts, Comments
Collections:
- GET /users (List all users)
- POST /users (Create new user)
Individual Resources:
- GET /users/{id} (Get specific user)
- PUT /users/{id} (Replace user - full update)
- PATCH /users/{id} (Update user - partial)
- DELETE /users/{id} (Delete user)
Nested Resources:
- GET /users/{id}/posts (Get user's posts)
- POST /users/{id}/posts (Create post for user)
Step 2: Design URL Structure
Follow RESTful naming conventions:
Best Practices:
- Use plural nouns:
/users,/posts(not/user,/post) - Use hyphens for multi-word:
/blog-posts(not/blogPostsor/blog_posts) - Keep URLs lowercase
- Limit nesting to 2 levels maximum
- Use query parameters for filtering:
/posts?status=published&author=123
Quick Examples:
✅ Good:
GET /users
GET /users/123/posts
GET /posts?published=true&limit=10
❌ Bad:
GET /getUsers
GET /users/123/posts/comments/likes (too deep nesting)
GET /posts/published (use query param instead)
Step 3: Choose HTTP Methods
Map operations to standard HTTP methods:
- GET: Retrieve resource(s) - Safe, idempotent, cacheable
- POST: Create new resource - Returns 201 Created with Location header
- PUT: Replace entire resource - Idempotent, full replacement
- PATCH: Partial update - Update specific fields only
- DELETE: Remove resource - Idempotent, returns 204 or 200
Step 4: Design Request/Response Payloads
Structure JSON payloads consistently:
Naming Conventions:
- Use camelCase for JSON field names
- Use ISO 8601 for timestamps (UTC)
- Use consistent ID formats with prefixes:
usr_,post_ - Include metadata:
createdAt,updatedAt
Example Response:
{
"id": "usr_1234567890",
"username": "johndoe",
"email": "[email protected]",
"profile": {
"firstName": "John",
"lastName": "Doe"
},
"createdAt": "2025-10-25T10:30:00Z",
"updatedAt": "2025-10-25T10:30:00Z"
}
Step 5: Implement Error Handling
Design comprehensive error responses:
Error Response Format:
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid request parameters",
"details": [
{
"field": "email",
"message": "Email format is invalid"
}
],
"requestId": "req_abc123xyz",
"timestamp": "2025-10-25T10:30:00Z"
}
}
Key Status Codes:
200 OK: Successful GET, PUT, PATCH201 Created: Successful POST204 No Content: Successful DELETE400 Bad Request: Invalid request data401 Unauthorized: Missing/invalid authentication403 Forbidden: Authenticated but not authorized404 Not Found: Resource doesn't exist422 Unprocessable Entity: Validation errors- `429 Too Many Requ
Установить api-designer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл api-designer?
Design and document RESTful and GraphQL APIs with OpenAPI/Swagger specifications, authentication patterns, versioning strategies, and best practices. Use for: (1) Creating API specifications, (2) Designing REST endpoints, (3) GraphQL schema design, (4) API authentication and authorization, (5) API versioning strategies, (6) Documentation generation
Как установить скилл api-designer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл api-designer запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic