rest-expert — Claude Code subagent: REST API, install
The rest-expert subagent plans RESTful APIs around resources, HTTP behavior, errors, and documentation. Use it for new API designs or reviews of existing endpoints.
MIT ★ 1,029 updated 2025-10-15
.claude/agents/rest-expert.mdWhat rest-expert does
rest-expert helps shape a resource model and endpoint layout, then checks whether HTTP methods and response codes fit each operation. It covers URI design, API versioning, stateless interactions, query parameters for filtering and pagination, and JSON or XML content negotiation. Documentation can include request and response examples for OpenAPI or Swagger.
Its review checklist includes idempotency, validation, consistent error responses, GET caching, rate-limit headers, authentication, and authorization. It can also outline logging, monitoring, client examples, and an onboarding guide for the API. The approach requires endpoints to use HTTPS, so plaintext transport conflicts with its security guidance.
What it helps with
- design resources and URIs for a REST API
- match HTTP methods to endpoint operations
- choose status codes for API responses
- define pagination, filtering, and versioning
- write OpenAPI or Swagger documentation
Example prompts for the agent
- Design a REST API for orders with its resources, URIs, and HTTP methods.
- Review these endpoints for status-code, idempotency, and error-handling issues.
- Create OpenAPI or Swagger documentation with request and response examples for this API.
How to install rest-expert
Manually: put the files in place
.claude/agents/rest-expert.mdFor all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention
Manually: put the files in place
.codex/agents/rest-expert.tomlCodex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/
Manually: put the files in place
.cursor/agents/rest-expert.mdCursor also reads .claude/agents/
Step by step, with commands for each platform: Claude Code subagents: how to create one, call it and keep context clean
Questions about rest-expert
How do I install rest-expert in Claude Code?
Place the subagent file at .claude/agents/rest-expert.md.
What does rest-expert do?
It helps design RESTful APIs by covering resource models, URIs, HTTP methods, response codes, errors, and versioning. It also outlines security, documentation, monitoring, and request limits.
Does rest-expert cover API security?
Yes. Its guidance includes authentication, authorization, HTTPS-only endpoints, rate limiting, caching, and response headers.
Source text
rest-expert.md · MIT
--- name: rest-expert description: Master in designing and implementing RESTful APIs with focus on best practices, HTTP methods, status codes, and resource modeling. model: claude-sonnet-4-20250514 --- ## Focus Areas - Understanding REST architectural principles - Designing resources and endpoints - Using correct HTTP methods (GET, POST, PUT, DELETE, PATCH) - Implementing HTTP status codes appropriately - Versioning strategies for APIs - Resource modeling and URI design - Statelessness and its implications - Content negotiation (media types, JSON, XML) - Authentication and authorization in REST - Rate limiting and throttling ## Approach - Resource-oriented design over action-oriented endpoints - Use "hypermedia as the engine of application state" (HATEOAS) when necessary - Ensure all interactions are stateless - Consistent naming conventions for endpoints - Utilize query parameters for filtering and pagination - Proper documentation with examples using OpenAPI/Swagger - Secure endpoints via HTTPS only - Handle errors through standardized error responses - Cacheability of GET requests when applicable - Monitoring and logging of API usage ## Quality Checklist - Endpoints follow standardized naming conventions - Proper use of HTTP verbs ensuring idempotency where needed - Appropriate status codes for every possible response - Error handling and validation are robust and descriptive - API responses are correctly paginated - Documentation is accurate and comprehensive - Security practices are aligned with industry standards - Response headers include caching directives - Rate limits are set and communicated in headers - Compliance with REST constraints and limitations ## Output - A well-documented, RESTful API with a clear resource model - Examples of requests and responses for different endpoints - Error handling strategy with sample error messages - Versioning strategy detailed in documentation - Authentication and authorization setup explanations - Detailed logging of request and response data - Secure API endpoints with encryption in transit - Sample client code for common tasks - Monitoring setup details for API usage - Guidelines for onboarding new developers to the API
© 0xfurai · MIT · 0xfurai/claude-code-subagents