All skills
asyrafhussin avatar

/api-design-patterns

@1de3a7a

RESTful API design, error handling, versioning, and best practices. Use when designing APIs, reviewing endpoints, implementing error responses, or setting up API structure. Triggers on "design API", "review API", "REST best practices", or "API patterns".

Use this Skill: https://skilld.dev/gh/asyrafhussin/agent-skills/api-design-patterns

This session only. Nothing lands on disk.

README.md

≈453 tokens on demand. Your agent reads this file only when SKILL.md points to it.

API Design Patterns v2.0.0

RESTful API design principles for building consistent, developer-friendly APIs.

Overview

  • Resource design with proper HTTP methods and status codes
  • Consistent error handling with machine-readable codes
  • Security (authentication, authorization, rate limiting, CORS)
  • Cursor and offset pagination with filtering and sorting
  • API versioning strategies and deprecation
  • Response format conventions and compression
  • OpenAPI documentation and changelog
  • 38 rules across 7 categories

Categories

1. Resource Design (Critical)

Nouns over verbs, plural resources, proper nesting, HTTP methods, status codes, idempotency, HATEOAS.

2. Error Handling (Critical)

Consistent error format, meaningful messages, validation details, error codes, request IDs.

3. Security (Critical)

Authentication (OAuth2/JWT), authorization (RBAC), rate limiting, input validation, CORS, HTTPS.

4. Pagination & Filtering (High)

Cursor-based and offset pagination, consistent parameters, filtering, sorting.

5. Versioning (High)

URL path versioning, header versioning, backward compatibility, deprecation strategy.

6. Response Format (Medium)

Consistent envelope, JSON naming conventions, sparse fieldsets, compression.

7. Documentation (Medium)

OpenAPI/Swagger specification, request/response examples, API changelog.

Usage

Review my API design
Check REST best practices for these endpoints
Design error responses for my API
Set up pagination for this endpoint

References

Source: SKILL.md on GitHub

1 alert16d5 checks · Risk SAFE
  • Gen Agent Trust Hub16d

    This skill is a comprehensive documentation library for RESTful API design patterns. It provides best practices for resource design, error handling, security, and documentation. The skill contains no executable code, malicious instructions, or hidden functionality, and its references are restricted to well-known technical documentation sources.

  • Socket16d

    No alerts

  • Snyk16d

    Risk: LOW · No issues

  • Runlayer6mo

    4/28 files flagged

  • ZeroLeaks5mo

    Score: 93/100 · 2 sections analyzed

Signed by skilld at 1de3a7a. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last month.

Steadyupdated 7 months ago
metadata
{
  "author": "agent-skills",
  "version": "2.0.0"
}

README badge

README badge for asyrafhussin/agent-skills/api-design-patterns