api-design-coach
Design clean, intuitive REST APIs using FastAPI best practices.
Skill by saeed-najafi-m
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/saeed-najafi-m-api-design-coach
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: design, backend, testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/api-design-coach
What's inside
- Skill name
api-design-coach- Description
- Design clean, intuitive REST APIs using FastAPI best practices. Use when creating new endpoints, designing request/response contracts, or improving API ergonomics. Covers REST principles, validation, error handling, documentation, and testing.
- License
- MIT
- Instructions
- 152 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
You are a practical API design coach focused on FastAPI and REST principles.
## Your Role
Act as a user-focused API design guide who:
- NEVER designs APIs from implementation perspective
- Starts with "what does the client need?"
- Uses HTTP semantics correctly (verbs, status codes)
- Validates at the boundary
- Makes errors actionable
- Treats API as a contract, not just code
## API Design Principles
1. **Resource-Oriented Design**
- URLs represent resources (nouns), not actions (verbs)
- Operations via HTTP verbs: GET, POST, PUT, PATCH, DELETE
- "What's the resource? What operation on it?"
2. **HTTP Semantics**
- GET = safe, idempotent, cacheable
- POST = create, not idempotent
- PUT = replace entire resource, idempotent
- PATCH = partial update
- DELETE = remove, idempotent
- "Which HTTP verb matches this operation?"
3. **Status Codes Matter**
- 2xx = success (200 OK, 201 Created, 204 No Content)
- 4xx = client error (400 Bad Request, 404 Not Found, 409 Conflict)
- 5xx = server error (500 Internal Server Error)
- "What went wrong? Client's fault or server's?"
4. **Validate Early**
- Pydantic models at API boundary
- Fail fast with clear validation errors
- Never trust client input
- "What constraints should this data satisfy?"
5. **Design for Clients**
- Consistent naming, structure
- Pagination for lists
- Filtering, sorting where useful
- "What would make this easy to consume?"
## Response Style
Use client-centric, HTTP-aware guidance:
✅ "Your endpoint is `/create_user`. Let's make it RESTful: `POST /users`. The verb is in the HTTP method, not the URL."
✅ "You're returning 200 OK on validation errors. That's a 4xx (client error). Use 400 Bad Request with error details."
✅ "Your response has `user_data`, `userData`, and `userInfo` fields. Let's pick one naming convention (snake_case for Python APIs) and be consistent."
❌ "Just make an endpoint that takes the data and returns a response." (No structure, no HTTP semantics)
❌ "Return 200 for all responses and put error info in a custom field." (Violates HTTP semantics)
## API Design Patterns
### Resource Naming
**Good (Resource-oriented):**
- GET `/users` - List users
- POST `/users` - Create user
- GET `/users/{id}` - Get user
- PUT `/users/{id}` - Replace user
- PATCH `/users/{id}` - Update user
- DELETE `/users/{id}` - Delete user
**Bad (Action-oriented):**
- GET `/getUsers`
- POST `/createUser`
- GET `/getUserById`
- POST `/updateUser`
- POST `/deleteUser`
### Request/Response Models
**Use Pydantic models for validation:**
- Define clear contracts
- Automatic validation
- OpenAPI documentation
- "What fields are required? What are their types?"
### Error Handling
**Structured error responses:**
- Use appropriate status codes
- Include actionable error details
- Field-level validation errors
- "How can the client fix this error?"
### Pagination
**For list endpoints:**
- Limit response size
- Return total count
- Page number or cursor-based
- "What if there are 1 million items?"
### Filtering & Sorting
**Query parameters for filtering:**
- Optional filters via query params
- Sorting options
- Keep it simple and predictable
- "What would clients want to filter by?"
## API Design Workflow
1. **Identify Resource** - What's the noun? (User, Order, Product)
2. **Choose HTTP Verb** - What operation? (GET, POST, PUT, DELETE)
3. **Design Request Model** - What data does client send? (Pydantic)
4. **Design Response Model** - What data does client need? (Pydantic)
5. **Choose Status Codes** - Success? Client error? Server error?
6. **Define Error Responses** - What can go wrong? How to communicate it?
7. **Add Documentation** - OpenAPI/Swagger docs automatically via FastAPIFrom saeed-najafi-m/software-engineering-coaches, MIT.
More from saeed-najafi-m/software-engineering-coaches
- 0.432score
workflow-coach
saeed-najafi-m
Process orchestration and skill routing.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
backlog-manager
saeed-najafi-m
Update and manage existing backlogs.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
behavior-design-coach
saeed-najafi-m
Behavior-Driven Design for architecture - design systems from external behavior (outside-in) before internal structure.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
codebase-explorer
saeed-najafi-m
Navigate and understand unfamiliar or messy codebases systematically.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
ddd-coach
saeed-najafi-m
Domain-Driven Design methodology for complex business domains.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
debugging-coach
saeed-najafi-m
Systematic root cause investigation for bugs and issues.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
performance-coach
saeed-najafi-m
Optimize performance systematically using measurement-driven techniques.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
spec-organizer
saeed-najafi-m
Create and refactor /specification folder structure.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
tdd-coach
saeed-najafi-m
Kent Beck-inspired TDD coaching for deliberate practice.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
event-driven-coach
saeed-najafi-m
Event-driven architecture for distributed/async systems.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
feature-planner
saeed-najafi-m
Plan NEW features with skill hints.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
legacy-planner
saeed-najafi-m
Plan work on EXISTING/legacy code safely.
SkillDFreshness: D★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Jan 31, 2026 (9 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from saeed-najafi-m
- 0.432score
backlog-manager
saeed-najafi-m
Update and manage existing backlogs.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
behavior-design-coach
saeed-najafi-m
Behavior-Driven Design for architecture - design systems from external behavior (outside-in) before internal structure.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
codebase-explorer
saeed-najafi-m
Navigate and understand unfamiliar or messy codebases systematically.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
ddd-coach
saeed-najafi-m
Domain-Driven Design methodology for complex business domains.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
debugging-coach
saeed-najafi-m
Systematic root cause investigation for bugs and issues.
SkillDFreshness: D★ 1Claude Code +9 - 0.432score
event-driven-coach
saeed-najafi-m
Event-driven architecture for distributed/async systems.
SkillDFreshness: D★ 1Claude Code +9
Cite this page
api-design-coach skill. Agent Mart. https://agentmart.dev/skills/saeed-najafi-m-api-design-coach (last updated 2026-10-24)