api-design-patterns
Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices
npx skills add majiayu000/claude-skill-registry --skill api-design-patterns --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
What it does
Describes a collection of API design patterns and practical guidance for REST, GraphQL, and gRPC, with sections on versioning, pagination, authentication, rate limiting, idempotency, error handling, caching, and common REST/GraphQL/gRPC patterns. Provides concrete examples, patterns, and decision guidance for choosing among REST, GraphQL, and gRPC based on use cases.
How it works
Outlines when to choose each API style and lists concrete patterns such as versioning strategies (URI, header, content negotiation), pagination methods (offset, cursor, keyset), authentication approaches (OAuth2, JWT, API keys), rate limiting schemes (token bucket, sliding window), and idempotency practices (idempotency keys, conditional requests). Includes sample code snippets in various languages (TypeScript, Go, JavaScript) and API design examples for REST resource naming, HTTP status codes, GraphQL schema patterns, and gRPC service definitions. Also references deep-dive material via references/ files.
When to use it
Triggered as a reference when designing, implementing, or documenting APIs across REST, GraphQL, and gRPC, choosing patterns based on needs such as client flexibility, data graph complexity, or microservice requirements.
What it can touch
The skill references and demonstrates patterns and code samples using languages and tools like TypeScript, JavaScript, and Go. It mentions tool usage in the context of code examples but does not specify executable tooling beyond standard language constructs and library calls.
Caveats
License and compatibility notes present (license listed as Apache-2.0; compatibility with claude-code). As with any design guide, real-world applicability depends on project constraints and team familiarity with the patterns; no guarantees of outcome are stated.
# API Design Patterns Design robust, scalable APIs using proven patterns for REST, GraphQL, and gRPC with proper versioning, authentication, and error handling. ## Quick Reference **API Style Selection**: - REST: Resource-based CRUD, simple clients, HTTP-native caching - GraphQL: Client-driven queries, complex data graphs, real-time subscriptions - gRPC: High-performance RPC, microservices, strong typing, streaming **Critical Patterns**: - Versioning: URI (`/v1/users`), header (`Accept: application/vnd.api+json;version=1`), content negotiation - Pagination: Offset (simple), cursor (stable), keyset (performant) - Auth: OAuth2 (delegated), JWT (stateless), API keys (service-to-service) - Rate limiting: Token bucket, fixed window, sliding window - Idempotency: Idempotency keys, conditional requests, safe retry **See references/ for deep dives**: `rest-patterns.md`, `graphql-patterns.md`, `grpc-patterns.md`, `versioning-strategies.md`, `authentication.md` ## Core Principles ### Universal API Design Standards Apply these principles across all API styles: **1. Consistency Over Cleverness** - Follow established conventions for your API style - Use predictable naming patterns (snake_case o
- Quick Reference
- Core Principles
- Universal API Design Standards
- API Style Decision Tree
- When to Choose REST
- When to Choose GraphQL
- When to Choose gRPC
- REST API Patterns
- Resource Naming
- HTTP Status Codes
- Error Response Format
- Pagination Patterns
- GraphQL Patterns
- Schema Design
What does the api-design-patterns skill do?
Comprehensive API design patterns covering REST, GraphQL, gRPC, versioning, authentication, and modern API best practices
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill api-design-patterns --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
