api-and-interface-design
Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend.
Security Assessment
About api-and-interface-design
The API and Interface Design skill focuses on guiding developers to create stable, predictable, and well-documented interfaces. It addresses the common challenges of interface misuse, version conflicts, and unclear contracts between system components. By providing clear principles for designing APIs, module boundaries, and frontend-backend interactions, this skill helps teams avoid errors caused by ambiguous or inconsistent interfaces and ensures that systems evolve safely over time.
This skill emphasizes several key capabilities. It promotes a contract-first approach, defining the interface specification before implementation, ensuring clarity and consistency. It enforces uniform error semantics to make API behavior predictable for consumers. Boundary validation ensures that external inputs are properly checked while internal code can be trusted. The skill also instills awareness of Hyrum's Law, reminding designers that all observable behavior becomes an implicit contract once users rely on it, and encourages adherence to the One-Version Rule to prevent dependency conflicts. These features collectively support the creation of APIs and modules that are robust, maintainable, and easy to evolve.
Ideal use cases include designing new REST or GraphQL endpoints, defining module boundaries between teams, creating component prop interfaces, and shaping database schemas that inform API design. Target users are software engineers, API designers, frontend and backend developers, and technical leads responsible for system architecture. This skill is particularly valuable for teams seeking to maintain long-term stability in public interfaces, reduce integration errors, and ensure that changes to APIs or modules do not inadvertently break dependent systems.
FAQ
When should I use the API and Interface Design skill?
Use this skill when creating new API endpoints, defining module boundaries, designing component props, or modifying existing public interfaces to ensure consistency and stability.
Does this skill apply to both REST and GraphQL APIs?
Yes, it is designed to guide interface design for any API type, including REST and GraphQL, as well as module boundaries and component interfaces.
What are the main principles I should follow?
Key principles include Hyrum's Law awareness, the One-Version Rule, contract-first interface definition, consistent error semantics, and boundary validation for external inputs.
Are there any limitations or requirements?
The skill assumes that users have a basic understanding of API design and software architecture. It does not provide automated enforcement but serves as a set of guidelines and best practices.
Who benefits most from this skill?
Software engineers, API designers, frontend and backend developers, and technical leads who are responsible for creating stable, maintainable interfaces will benefit the most.
Install api-and-interface-design
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
addyosmani/agent-skills