api-and-interface-design

Guide REST and GraphQL API design with contract-first principles and TypeScript.

1|1|Updated Jul 4, 2026
One-click install
npx skills add https://github.com/hgflima/loopy --skill api-and-interface-design-hgflima
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/hgflima/loopy/tree/main/.claude/skills/api-and-interface-design
Command: npx skills add https://github.com/hgflima/loopy --skill api-and-interface-design-hgflima

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses the challenges of designing stable and well-documented APIs and interfaces, providing clear guidelines and best practices.

Core Features & Use Cases

  • API Design Principles: Offers principles like Hyrum's Law and the One-Version Rule for designing robust APIs.
  • Interface Guidelines: Provides guidance on REST API patterns, TypeScript interface patterns, and naming conventions.
  • Use Case: When developing a new REST API or GraphQL endpoint, this Skill helps define contracts, handle errors consistently, and validate inputs effectively.

Quick Start

Apply the api-and-interface-design skill to create a REST API endpoint for user authentication.

Frequently Asked Questions about api-and-interface-design

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
What principles should I follow for REST API design to ensure stability?

REST API design relies on principles like Hyrum's Law and the One-Version Rule to ensure stability. By applying contract-first design, you create robust APIs with consistent error handling and boundary validation.

How do I design a GraphQL endpoint with consistent error handling?

To design a GraphQL endpoint with consistent error handling, apply contract-first design guidelines. This approach ensures inputs are validated effectively at boundaries, maintaining robust and well-documented API contracts.

Do I need to know TypeScript to use these interface design guidelines?

Yes, applying these interface design guidelines requires knowledge of TypeScript and API design principles. It provides specific TypeScript interface patterns and naming conventions to structure your module boundaries effectively.

What's the best way to validate inputs at API boundaries?

The best way to validate inputs at API boundaries is through contract-first design. This method enforces strict interface agreements before implementation, ensuring data integrity and consistent error handling across REST and GraphQL APIs.

When should I use contract-first design for module boundaries?

You should use contract-first design for module boundaries when developing public interfaces or new APIs. It prevents breaking changes by defining strict contracts and validation rules before writing the underlying implementation logic.