Api design
REST API design patterns — naming, versioning, error handling, pagination, authentication.From its SKILL.md
npx -y skills add subhansh-dev/agent-maxxing --skill api-designAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
1.7 KB, 460 tokens by cl100k_base, as published. Nobody here has run it
API Design Patterns
Naming
- Use nouns, not verbs:
/usersnot/getUsers - Use plural:
/usersnot/user - Use kebab-case for multi-word:
/user-profiles - Nest for relationships:
/users/123/posts
HTTP Methods
GET— read (idempotent)POST— createPUT— replace (idempotent)PATCH— partial updateDELETE— remove (idempotent)
Status Codes
200— OK201— Created204— No Content (successful DELETE)400— Bad Request (validation error)401— Unauthorized (no token)403— Forbidden (no permission)404— Not Found409— Conflict (duplicate)422— Unprocessable (valid JSON, invalid data)429— Too Many Requests500— Internal Server Error
Error Response
{
"error": {
"code": "VALIDATION_ERROR",
"message": "Email is required",
"details": [
{ "field": "email", "message": "Required" }
]
}
}
Pagination
GET /users?page=2&limit=20
{
"data": [...],
"pagination": {
"page": 2,
"limit": 20,
"total": 150,
"totalPages": 8
}
}
Authentication
- Use Bearer tokens:
Authorization: Bearer <token> - Return
401for missing/invalid tokens - Return
403for insufficient permissions
Versioning
- URL path:
/v1/users(simplest, most common) - Header:
Accept: application/vnd.api.v1+json
Rate Limiting
Return headers:
X-RateLimit-Limit: max requests per windowX-RateLimit-Remaining: requests leftX-RateLimit-Reset: when the window resets
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.