rest-api-design

REST API design patterns: resource naming, HTTP methods, status codes, pagination, filtering, authentication, rate limiting, versioning, and response formats. Use when designing new endpoints, reviewing API contracts, or planning API strategies. Trigger phrases: API design, endpoint design, REST API, API versioning, schema design. Adapted from everything-claude-code by @affaan-m (MIT)

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "rest-api-design" with this command: npx skills add djc00p/rest-api-design

API Design Patterns

Design consistent, developer-friendly REST APIs with resource naming, HTTP semantics, and versioning.

When to Activate

  • Designing new API endpoints
  • Reviewing existing API contracts
  • Adding pagination, filtering, or authentication
  • Planning API versioning strategy
  • Building public or partner-facing APIs

Quick Start

  1. Use nouns (plural, kebab-case) for resource URLs, not verbs
  2. Apply correct HTTP method (GET/POST/PUT/PATCH/DELETE)
  3. Return appropriate status codes (200/201/400/401/403/404/429)
  4. Use consistent response format (data + metadata + error structure)
  5. Implement pagination (cursor-based preferred) and filtering
  6. Require authentication and check authorization per resource

Key Concepts

  • Resource naming — Plural nouns in kebab-case; use verbs sparingly for actions
  • HTTP semantics — Each method has idempotency/safety properties; honor them
  • Status codes — Signal intent precisely (400 for validation, 422 for semantic error)
  • Error format — Consistent structure with codes, messages, and field details
  • Versioning — URL path versioning (v1, v2); non-breaking changes don't need new version

Common Usage

Most frequent patterns:

  • CRUD endpoints (GET, POST, PUT, PATCH, DELETE)
  • List endpoints with pagination and filtering
  • Sub-resources for relationships (users/:id/orders)
  • Authentication headers and permission checks
  • Rate limiting headers and strategies

References

  • references/resource-design.md — URL structure, naming rules, HTTP methods, status codes, response formats
  • references/pagination-filtering-auth.md — Pagination strategies, filtering, sorting, authentication, rate limiting, versioning, and checklist

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Plugin

Install + set up TotalReclaw encrypted memory for OpenClaw, then use tr CLI for remember / recall. Trigger on 'install TotalReclaw', 'set up TotalReclaw', 'r...

Registry SourceRecently Updated
1.3K0p-diogo
Coding

Alibabacloud Dataworks Metadata

DataWorks metadata Skill for Alibaba Cloud — browse Data Map metadata and perform non-destructive writes via Aliyun CLI. READ scope: list/get catalogs, datab...

Registry SourceRecently Updated
Coding

SurrealDB 3

Expert SurrealDB 3 architect and developer skill. SurrealQL mastery, multi-model data modeling (document, graph, vector, time-series, geospatial), schema des...

Registry SourceRecently Updated
950324601
Coding

通用工程师 开发规范与代码质量

Shared engineering skill for Weline development standards, safe change boundaries, code quality, documentation duties, and validation evidence.

Registry SourceRecently Updated