Awesome-omni-skill api-design-patterns
Principles for REST, GraphQL, versioning, and API authentication.
install
source · Clone the upstream repo
git clone https://github.com/diegosouzapw/awesome-omni-skill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/diegosouzapw/awesome-omni-skill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/development/api-design-patterns-sraloff" ~/.claude/skills/diegosouzapw-awesome-omni-skill-api-design-patterns-bb96c0 && rm -rf "$T"
manifest:
skills/development/api-design-patterns-sraloff/SKILL.mdsource content
API Design Patterns
When to use this skill
- Designing new API endpoints.
- Documenting APIs (OpenAPI/Swagger).
- Implementing authentication strategies.
1. RESTful Conventions
- Nouns: Use nouns for resources (
, not/users
)./getUsers - Verbs: Use correct HTTP methods (
read,GET
create,POST
replace,PUT
update,PATCH
remove).DELETE - Status Codes: 200 OK, 201 Created, 400 Bad Request, 401 Unauth, 403 Forbidden, 404 Not Found, 422 Validation Error.
2. Response Structure
- Envelope: Standardize response JSON.
{ "data": { ... }, "meta": { "pagination": ... } } - Errors: Return structured error objects, not just plain strings.
3. Versioning
- URL:
is preferred for explicit versioning./api/v1/resource - Breaking Changes: Never introduce breaking changes to an existing version. Create v2.
4. Authentication
- Bearer Token: Use
(JWT or Opaque).Authorization: Bearer <token> - Stateless: API should rarely rely on session cookies (CSRF issues) unless it is a first-party SPA.