kalilurrahman/kr-claudiator-skills-original-prompts/api-design
Claude Code and agent skill by kalilurrahman/kr-claudiator-skills-original-prompts
- community
Checking that the SKILL.md file is still in the repository.
Design a complete REST or GraphQL API from requirements. Outputs endpoints, request/response schemas, error handling, authentication, and versioning strategy.
Install
npx vskill@latest install kalilurrahman/kr-claudiator-skills-original-prompts/api-designSKILL.md
API Design
Design a production-ready API specification from requirements. No ambiguity — every endpoint, field, and error code must be defined with enough detail for engineers to implement and consumers to integrate.
Process
- Parse requirements. Identify resources, operations, and business constraints.
- Choose API style. REST for resource-oriented, GraphQL for complex data fetching, gRPC for internal services.
- Model resources. Define entities, relationships, and key attributes.
- Design endpoints. Map operations to HTTP methods and paths (REST) or queries/mutations (GraphQL).
- Define schemas. Request bodies, response structures, query parameters, headers.
- Plan authentication. OAuth 2.0, API keys, JWT — pick one and specify flow.
- Design error handling. HTTP status codes, error response format, error codes.
- Add versioning strategy. URL versioning (/v1/), header versioning, or content negotiation.
- Document rate limits. Per-user, per-endpoint, time windows.
- Save to OpenAPI/GraphQL schema file.
Output Format
API Overview
- Purpose: [One sentence]
- Style: REST | GraphQL | gRPC
- Base URL:
https://api.example.com/v1 - Authentication: [Method + brief description]
Resources
| Resource | Description | Key Operations | |
|---|---|---|---|
| User | User account | Create, Read, Update, Delete | |
| Product | Product catalog | List, Read, Search | |
| Order | Purchase order | Create, Read, List |
Endpoints (REST)
GET /users/{id}
Description: Retrieve user by ID Auth Required: Yes Path Parameters:
id(string, required) — User UUID
Response 200:
Errors:
- 404: User not found
- 401: Unauthorized
POST /users
Description: Create new user Auth Required: No (public registration) Request Body:
Response 201:
Errors:
- 400: Validation error (email format, password strength)
- 409: Email already exists
Error Response Format
Error Codes
| Code | HTTP Status | Meaning | |
|---|---|---|---|
| VALIDATION_ERROR | 400 | Input validation failed | |
| UNAUTHORIZED | 401 | Missing or invalid token | |
| FORBIDDEN | 403 | Valid token, insufficient permissions | |
| NOT_FOUND | 404 | Resource does not exist | |
| CONFLICT | 409 | Resource already exists | |
| RATE_LIMIT | 429 | Too many requests | |
| INTERNAL_ERROR | 500 | Server error |
Authentication Flow (OAuth 2.0)
- Client redirects user to
/oauth/authorize - User grants permission
- Server redirects back with authorization code
- Client exchanges code for access token at
/oauth/token - Client includes token in
Authorization: Bearer {token}header
Rate Limits
- Default: 1000 requests/hour per user
- Burst: 100 requests/minute
- Headers returned:
X-RateLimit-Limit: 1000X-RateLimit-Remaining: 847X-RateLimit-Reset: 1640000000
Versioning
- URL-based:
/v1/,/v2/ - Breaking changes require new version
- Non-breaking changes (new optional fields) added to current version
- Deprecation: 6-month notice, sunset timeline announced
Pagination
Response:
Rules
- Every endpoint must have explicit authentication requirement (Yes/No).
- Error responses must include machine-readable error codes, not just HTTP status.
- Required vs optional fields must be clearly marked.
- Rate limits are mandatory for public APIs.
- Include realistic examples with actual data, not placeholder text.
- If requirements are vague, list specific questions before designing.
- Choose appropriate HTTP methods: GET (read), POST (create), PUT (full update), PATCH (partial update), DELETE (remove).
- Use plural nouns for collections:
/usersnot/user. - Save final output as OpenAPI 3.0 YAML if REST, or GraphQL schema if GraphQL.
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking01-software-dev/api-design/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/kalilurrahman/kr-claudiator-skills-original-prompts/api-design)