java/src/main/resources/targets/claude/skills/knowledge-packs/api-design/SKILL.md
API design principles: {{LANGUAGE}}-specific patterns for REST/gRPC/GraphQL. URL structure, status codes, RFC 7807 errors, pagination, content negotiation, validation, request/response shaping, versioning strategies, and protocol conventions.
npx skillsauth add edercnj/claude-environment api-designInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Provides comprehensive API design patterns for {{LANGUAGE}} {{FRAMEWORK}}, covering REST, gRPC, GraphQL, and WebSocket protocols. Includes URL structure conventions, HTTP status codes, RFC 7807 error handling, pagination strategies, content negotiation, input validation, and protocol-specific best practices.
See references/api-design-principles.md for the essential API design summary (URL structure, status codes, error format, pagination).
Read these files for protocol-specific conventions:
| Reference | Content |
|-----------|---------|
| protocols/rest/rest-conventions.md | REST resource naming, HTTP methods, status codes, pagination (cursor vs offset), filtering, sorting, HATEOAS decision guide, error responses |
| protocols/rest/openapi-conventions.md | OpenAPI 3.1 specification format, schema organization, $ref reuse, example values, security schemes, operation IDs, tags, discriminator for polymorphism |
| protocols/grpc/grpc-conventions.md | Proto3 style guide, package/service/message naming, field conventions, enum design, oneof usage, streaming patterns, deadline propagation, error codes, health checks |
| protocols/grpc/grpc-versioning.md | Package-based versioning (v1, v2), backward compatibility rules, field deprecation, reserved fields, migration strategies, version lifecycle |
| protocols/graphql/graphql-conventions.md | Schema design, query patterns, mutation naming, subscription patterns, error handling, complexity analysis, DataLoader for N+1 prevention |
| protocols/websocket/websocket-conventions.md | Message framing, heartbeat/keep-alive, reconnection logic, connection draining, error handling over persistent connections |
| protocols/event-driven/event-conventions.md | CloudEvents envelope, event naming (reverse domain + past tense), schema registry, event versioning, correlation IDs, ordering guarantees |
| protocols/event-driven/broker-patterns.md | Topic naming, partition strategies, consumer lag monitoring, producer acknowledgments, retention policies, schema evolution, dead letter topics |
| references/api-deprecation-checklist.md | Step-by-step checklist for deprecating an API endpoint safely |
Defines the lifecycle for deprecating API endpoints, ensuring consumers have adequate notice and migration paths.
The Sunset HTTP response header (RFC 8594) communicates the deprecation date of an API endpoint:
Sunset: Sat, 31 Dec 2025 23:59:59 GMT
Deprecation: true header during the warn phase| Phase | Timing | Action | HTTP Response |
|-------|--------|--------|---------------|
| Announce | T-6 months | Changelog entry, email subscribers, dashboard banner | Normal (200) |
| Warn | T-3 months | Add Deprecation: true header, log consumer usage | Normal + Deprecation: true |
| Sunset | T-0 | Activate Sunset header with removal date | Normal + Sunset: <date> |
| Remove | T + grace period | Endpoint removed, returns 410 Gone | 410 Gone |
Deprecation: true header in HTTP responses## [YYYY-MM-DD] — <endpoint>
- **Change Type**: deprecated | removed | added | modified
- **Endpoint**: `METHOD /path`
- **Migration Guide**: [link to migration documentation]
- **Sunset Date**: YYYY-MM-DD (if applicable)
- **Replacement**: `METHOD /new-path` (if applicable)
Strategies for versioning APIs, with trade-offs and recommendations per use case.
Pattern: /v1/resources, /v2/resources
Pattern: Accept-Version: v2 or custom header X-API-Version: 2
Pattern: GET /resources?version=2
Pattern: Accept: application/vnd.api+json;version=2
| API Type | Recommended Strategy |
|----------|---------------------|
| Public / External | URI versioning (/v1/) |
| Internal / Microservices | Header versioning (Accept-Version) |
| Prototyping / Internal tools | Query parameter (?version=) |
| API-first / Strict REST | Content negotiation (application/vnd.) |
skills/protocols/ — protocol-specific conventions (REST, gRPC, GraphQL, WebSocket, event-driven)skills/security/ — API security headers, input validation, and authenticationskills/coding-standards/ — naming conventions and code patterns for API handlerstools
Documentation automation v2: stack-aware generation from documentation.targets.
development
Generates or updates CI/CD pipelines per project stack with actionlint validation.
tools
Generates ADRs from architecture-plan mini-ADRs with sequential numbering and index update.
development
Formats source code; first step of the pre-commit chain (format -> lint -> compile).