api-design
A guide for creating consistent and documented RESTful APIs.
Install
mkdir -p .claude/skills/api-design-microsoft && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/17891" && unzip -o skill.zip -d .claude/skills/api-design-microsoft && rm skill.zipInstalls to .claude/skills/api-design-microsoft
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.Key capabilities
- →Define naming conventions for RESTful API resources
- →Specify appropriate HTTP methods for API actions
- →Document API endpoints with required details
How it works
The skill provides guidelines for RESTful API design, covering naming, HTTP methods, error handling, status codes, and documentation requirements, based on internal engineering practices.
Inputs & outputs
When to use api-design
- →Design new API endpoints
- →Document existing REST APIs
- →Standardize API error handling
About this skill
API Design
Overview
Standards and patterns for designing consistent, well-documented RESTful APIs. Covers naming, HTTP methods, error handling, status codes, and documentation requirements.
Key Concepts
Naming Conventions
- Plural nouns for resources:
/users,/orders,/products - Kebab-case for multi-word:
/user-profiles - Nest related resources:
/users/{id}/orders - Query params for filtering:
/users?role=admin&active=true
HTTP Methods
| Method | Purpose | Idempotent | Response |
|---|---|---|---|
| GET | Read | Yes | 200 + body |
| POST | Create | No | 201 + body + Location |
| PUT | Replace | Yes | 200 + body |
| PATCH | Partial update | No | 200 + body |
| DELETE | Remove | Yes | 204 (no body) |
Error Response Format
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Human-readable description",
"details": [
{"field": "email", "message": "Invalid email format"}
]
}
}
Status Codes
- 200: Success — 201: Created — 204: No content
- 400: Bad request — 401: Unauthorized — 403: Forbidden
- 404: Not found — 409: Conflict — 422: Unprocessable
- 429: Rate limited — 500: Internal error
Decision Framework
| Scenario | Method | Path | Status |
|---|---|---|---|
| List items | GET | /items | 200 |
| Get one item | GET | /items/{id} | 200 / 404 |
| Create item | POST | /items | 201 |
| Full update | PUT | /items/{id} | 200 / 404 |
| Partial update | PATCH | /items/{id} | 200 / 404 |
| Delete item | DELETE | /items/{id} | 204 / 404 |
| Search | GET | /items?q=term | 200 |
| Bulk action | POST | /items/batch | 200 / 207 |
Documentation Requirements
Every endpoint must document:
- HTTP method and path
- Description
- Request parameters (path, query, body) with types
- Response schema with examples
- Error codes and descriptions
- Authentication requirements
Common Pitfalls
- Using verbs in URLs — Use nouns:
/usersnot/getUsers - Inconsistent error format — Use the same error schema everywhere
- Missing pagination — Any list endpoint that can grow needs pagination
- No versioning strategy — Decide early: URL (
/v1/) or header-based
When not to use it
- →When the API does not use HTTP methods
- →When the goal is not to standardize API design
Limitations
- →Specific to RESTful API design
- →Focuses on HTTP methods and status codes
- →Requires adherence to specified naming conventions
How it compares
This skill offers a structured framework for designing consistent and well-documented RESTful APIs, which helps avoid common pitfalls and ensures standardization across different API implementations.
Compared to similar skills
api-design side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| api-design (this skill) | 0 | 1mo | No flags | Intermediate |
| api-designer | 0 | 3mo | No flags | Advanced |
| mcp-builder | 136 | 3mo | Review | Advanced |
| api-design-principles | 72 | 2mo | No flags | Intermediate |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by microsoft
View all by microsoft →You might also like
api-designer
lushly-dev
>
mcp-builder
anthropics
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
api-design-principles
wshobson
Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.
deepwiki-rs
sopaco
AI-powered Rust documentation generation engine for comprehensive codebase analysis, C4 architecture diagrams, and automated technical documentation. Use when Claude needs to analyze source code, understand software architecture, generate technical specs, or create professional documentation from any programming language.
openapi-spec-generation
wshobson
Generate and maintain OpenAPI 3.1 specifications from code, design-first specs, and validation patterns. Use when creating API documentation, generating SDKs, or ensuring API contract compliance.
langchain-architecture
wshobson
Design LLM applications using the LangChain framework with agents, memory, and tool integration patterns. Use when building LangChain applications, implementing AI agents, or creating complex LLM workflows.