Provides 38 rules across 7 categories for RESTful API design including resource naming, error handling, security, pagination, versioning, response format, and documentation.
Ships in asyrafhussin-agent-skills-1. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
RESTful API design principles for building consistent, developer-friendly APIs. Contains 38 rules across 7 categories covering resource design, error handling, security, pagination, versioning, response format, and documentation.
Reference these guidelines when:
| Priority | Category | Impact | Prefix |
|---|---|---|---|
| 1 | Resource Design | CRITICAL | rest- |
| 2 | Error Handling | CRITICAL | error- |
| 3 | Security | CRITICAL | sec- |
| 4 | Pagination & Filtering | HIGH | page-, filter-, sort- |
| 5 | Versioning | HIGH | ver- |
| 6 | Response Format | MEDIUM | resp- |
| 7 | Documentation | MEDIUM | doc- |
rest-nouns-not-verbs - Use nouns for endpoints, not verbsrest-plural-resources - Use plural resource namesrest-http-methods - Correct HTTP method usage (GET, POST, PUT, PATCH, DELETE)rest-nested-resources - Proper resource nesting (max 2 levels)rest-status-codes - Appropriate HTTP status codesrest-idempotency - Idempotent operations with idempotency keysrest-hateoas - Hypermedia links for discoverabilityrest-resource-actions - Non-CRUD actions as sub-resourceserror-consistent-format - Consistent error response structureerror-meaningful-messages - Helpful, actionable error messageserror-validation-details - Field-level validation errorserror-error-codes - Machine-readable error codeserror-no-stack-traces - Never expose stack traces in productionerror-request-id - Include request IDs for debuggingsec-authentication - Proper auth implementation (OAuth2/JWT)sec-authorization - Resource-level permissions (RBAC)sec-rate-limiting - Prevent abuse with rate limitingsec-input-validation - Validate and sanitize all inputsec-cors-config - CORS configuration with whitelistssec-https-only - Enforce HTTPS for all trafficsec-sensitive-data - Protect passwords, tokens, PIIpage-cursor-based - Cursor pagination for large datasetspage-offset-based - Offset pagination for simple casespage-consistent-params - Consistent parameter namingpage-metadata - Include pagination metadata in responsesfilter-query-params - Filter via query parameterssort-flexible - Flexible sorting with - prefix for descendingver-url-path - Version in URL path (/api/v1/)ver-header-based - Version via Accept headerver-backward-compatible - Maintain backward compatibilityver-deprecation - Deprecation strategy with Sunset headerresp-consistent-structure - Consistent response enveloperesp-json-conventions - JSON naming conventionsresp-partial-responses - Field selection (sparse fieldsets)resp-compression - Response compression (gzip/Brotli)doc-openapi - OpenAPI/Swagger specificationdoc-examples - Request/response examplesdoc-changelog - API changelog# ❌ Verbs in URLs
GET /getUsers
POST /createUser
# ✅ Nouns with HTTP methods
GET /users # List users
POST /users # Create user
GET /users/123 # Get user
PUT /users/123 # Update user (full)
PATCH /users/123 # Update user (partial)
DELETE /users/123 # Delete user
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid data",
"details": [
{
"field": "email",
"code": "INVALID_FORMAT",
"message": "Please provide a valid email address"
}
],
"request_id": "req_abc123"
}
}
{
"data": [...],
"meta": {
"current_page": 2,
"per_page": 20,
"total_pages": 10,
"total_count": 195
},
"links": {
"first": "/users?page=1&per_page=20",
"prev": "/users?page=1&per_page=20",
"next": "/users?page=3&per_page=20",
"last": "/users?page=10&per_page=20"
}
}
HTTP/1.1 200 OK
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998
X-RateLimit-Reset: 1640995200
Read individual rule files for detailed explanations:
rules/rest-http-methods.md
rules/error-consistent-format.md
rules/page-cursor-based.md
rules/sec-authentication.md
rules/ver-url-path.md
rules/doc-openapi.md
For the complete guide with all rules expanded: AGENTS.md
AGENTS.md (opens in a new tab)README.md (opens in a new tab)metadata.json (opens in a new tab)rules/_sections.md (opens in a new tab)rules/_template.md (opens in a new tab)rules/doc-changelog.md (opens in a new tab)rules/doc-examples.md (opens in a new tab)rules/doc-openapi.md (opens in a new tab)rules/error-consistent-format.md (opens in a new tab)rules/error-error-codes.md (opens in a new tab)rules/error-meaningful-messages.md (opens in a new tab)rules/error-no-stack-traces.md (opens in a new tab)rules/error-request-id.md (opens in a new tab)rules/error-validation-details.md (opens in a new tab)rules/filter-query-params.md (opens in a new tab)rules/page-consistent-params.md (opens in a new tab)rules/page-cursor-based.md (opens in a new tab)rules/page-metadata.md (opens in a new tab)rules/page-offset-based.md (opens in a new tab)rules/resp-compression.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
/asyrafhussin-agent-skills-1:api-design-patternsfrom asyrafhussin-agent-skills-1
asyrafhussin-agent-skills-1@cascade-code-languages-misc-1 is listed by joshuarweaver/cascade-code-languages-misc-1 — review the source before installing
npx claudepluginhub joshuarweaver/cascade-code-languages-misc-1 --plugin asyrafhussin-agent-skills-124 skills in this plugin
/clean-code-principlesSOLID principles, design patterns, DRY, KISS, and clean code fundamentals. Use when reviewing architecture, checking code quality, refactoring, or discussing design decisions. Triggers on "review architecture", "check code quality", "SOLID principles", "design patterns", or "clean code"./code-slopDetect AI-generated code patterns ("slop") in PHP/Laravel and TypeScript/React source — comment narration, generic naming, premature interfaces, defensive overdose, mock-everything tests, and the absence of human "scars". Use when reviewing AI-assisted PRs, auditing code for taste/quality (not metrics — that's technical-debt), or hardening a code-review checklist. Triggers on "review for AI slop", "find AI patterns", "check code feels human", "audit code-quality taste"./Other plugins' skills for the same job