travisjneuman/.claude/api-design
Claude Code and agent skill by travisjneuman/.claude
- community
Checking that the SKILL.md file is still in the repository.
REST and GraphQL API design best practices including OpenAPI specs. Use when designing APIs, documenting endpoints, or reviewing API architecture.
Install
npx vskill@latest install travisjneuman/.claude/api-designSKILL.md
API Design Guide
Best practices for designing developer-friendly, maintainable APIs.
REST API Principles
Resource Naming
Use nouns, not verbs:
Use plural nouns:
Hierarchical relationships:
HTTP Methods
| Method | Purpose | Idempotent | Request Body | |
|---|---|---|---|---|
| GET | Retrieve resource(s) | Yes | No | |
| POST | Create resource | No | Yes | |
| PUT | Replace resource entirely | Yes | Yes | |
| PATCH | Update resource partially | No | Yes | |
| DELETE | Remove resource | Yes | No |
Status Codes
Success (2xx):
200 OK- Request succeeded201 Created- Resource created (return Location header)204 No Content- Success with no response body
Client Error (4xx):
400 Bad Request- Malformed request401 Unauthorized- Authentication required403 Forbidden- No permission404 Not Found- Resource doesn't exist409 Conflict- State conflict422 Unprocessable Entity- Validation failed429 Too Many Requests- Rate limited
Server Error (5xx):
500 Internal Server Error- Unexpected error503 Service Unavailable- Temporary outage
Response Format
Successful response:
Collection response:
Error response:
Pagination
Offset-based (simple, but slow on large datasets):
Cursor-based (efficient, recommended):
Response includes next cursor:
Filtering, Sorting, Fields
Filtering:
Sorting:
Field selection:
Versioning
URL path (recommended):
Header:
OpenAPI Specification
Authentication
API Keys (simple, for server-to-server):
Bearer Tokens (JWT, OAuth):
Include in OpenAPI:
Rate Limiting
Include headers in responses:
Return 429 Too Many Requests when exceeded.
Security Checklist
- [ ] HTTPS only
- [ ] Authentication on protected routes
- [ ] Input validation
- [ ] Output encoding
- [ ] Rate limiting
- [ ] CORS configuration
- [ ] No sensitive data in URLs
- [ ] Audit logging
gRPC and Protocol Buffers
Proto Definition
When to Use gRPC vs REST
| Factor | gRPC | REST | |
|---|---|---|---|
| Performance | Binary, fast | JSON, human-readable | |
| Streaming | Bidirectional | SSE/WebSocket workaround | |
| Type safety | Proto generates types | OpenAPI + codegen | |
| Browser | Needs gRPC-Web proxy | Native | |
| Tooling | Protoc, Buf | Swagger, Postman | |
| Best for | Service-to-service, streaming | Public APIs, web clients |
tRPC for TypeScript
tRPC is ideal for monorepo full-stack TypeScript apps where client and server share the same codebase.
Webhook Design Patterns
Webhook Payload
Signature Verification
Retry Strategy
Idempotency
API Versioning Strategies
| Strategy | Example | Pros | Cons | |
|---|---|---|---|---|
| URL path | /api/v1/users | Explicit, easy to route | URL pollution | |
| Query parameter | /api/users?version=1 | Optional parameter | Easy to miss | |
| Header | Accept: application/vnd.api.v1 | Clean URLs | Hidden, harder to test | |
| Content negotiation | Accept: application/json;v=2 | Standards-based | Complex to implement |
Recommendation: URL path versioning for simplicity. Only bump major versions for breaking changes. Use additive, non-breaking changes within a version.
Security
- Security scanPassed, 100 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 repositoryCheckingskills/api-design/SKILL.md
Popularity
- Repository stars
- 69
- Repository forks
- 15
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 25 Mar 2026, 7 months ago.
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/travisjneuman/.claude/api-design)