Agent skill
rest-api
Provides REST API design and implementation standards. Ensures proper URL structure, pagination, sorting, filtering, and error handling patterns. Specializes in RESTful principles, HTTP method semantics, status code usage, versioning strategies, HATEOAS, and API documentation. Implements consistent response structures and content negotiation. Use when: designing REST API endpoints, defining URL structures and naming conventions, implementing pagination/sorting/filtering, choosing appropriate HTTP methods (GET/POST/PUT/PATCH/DELETE), selecting HTTP status codes, designing request/response schemas, handling API errors and validation, implementing API versioning, documenting APIs with OpenAPI/Swagger, or designing hypermedia controls (HATEOAS).
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/data/rest-api-kubrickcode-workflow-toolkit
SKILL.md
REST API Design Standards
Naming Conventions
Field Naming
- Boolean: Require
is/has/canprefix - Date: Require
~Atsuffix - Use consistent terminology throughout the project (unify on either "create" or "add")
Date Format
- ISO 8601 UTC
- Use DateTime type
Pagination
Cursor-Based (Industry Standard)
- Parameters:
?cursor=xyz&limit=20 - Response:
{ data: [...], nextCursor: "abc", hasNext: true }
Sorting
?sortBy=createdAt&sortOrder=desc- Support multiple sort
- Specify defaults
Filtering
- Range:
{ min, max }or{ gte, lte } - Complex conditions use nested objects
URL Structure
Nested Resources
- Maximum 2 levels
Actions
- Allow verbs only when unable to represent as resource
/users/:id/activate
Response
List
data+ pagination info
Creation
- 201 + resource (excluding sensitive information)
Error (RFC 7807 ProblemDetail)
- Required:
type,title,status,detail,instance - Optional:
errorsarray
Batch
/batchsuffix- Success/failure count + results
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?