api-design-principles
Standards for REST, GraphQL, and RPC interface design. Focuses on developer experience and long-term stability. Use when designing new API surfaces.
SKILL.mdskills/api-design-principles/SKILL.md
GitHubAPI Design Principles
Purpose
Create APIs that are intuitive, stable, and performant.
When to Use This Skill
Use during the PLANNING phase of any feature involving a new or modified API endpoint.
Phase 1: Contract Design
- Define endpoints, methods, and payload structures.
- Ensure consistent naming conventions (camelCase vs kebab-case).
- Plan for versioning if the API is public-facing.
Phase 2: Security, Rate Limiting & Streaming
- Define authentication and authorization requirements.
- Plan rate limiting and input size constraints.
- Design real-time streaming protocols if applicable (e.g., WebSockets, Server-Sent Events / SSE) for continuous data pipelines.
Behavior Rules
- Consistency is King. Use the same patterns across the entire API surface.
- Fail Gracefully. Provide clear, actionable error messages.
- No Over-fetching. Return only the data the client needs.
Output Format / Delivery
- Outputs should be structured API schemas, interfaces, or documented endpoints.
Maintenance Notes
- Initial global core skill.