api-design

Define API contracts before implementation with REST conventions and resilience patterns.

4|Updated Apr 9, 2026
One-click install
npx skills add https://github.com/thejordanleopold/claude-code-skills-distilled --skill api-design-thejordanleopold
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-design
Source: https://github.com/thejordanleopold/claude-code-skills-distilled/tree/main/api-design
Command: npx skills add https://github.com/thejordanleopold/claude-code-skills-distilled --skill api-design-thejordanleopold

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Contract-first interface design with REST conventions, resilience patterns, and Hyrum's Law awareness.

Core principle: Every behavior you expose becomes a contract. Design the smallest observable surface area you're willing to support forever.

Core Features & Use Cases

  • Contract-first design: define the interface before implementing it, ensuring callers are protected from implementation changes.
  • REST conventions: model resources with plural endpoints, standard HTTP status codes, and consistent request/response shapes.
  • Resilience patterns: apply circuit breakers and exponential backoff retries to external calls.
  • Stability focus: heed Hyrum's Law, version surfaces early, and document guarantees to avoid breaking users.
  • Health checks: define and expose explicit health endpoints to signal service readiness.

Quick Start

Draft a contract-first API interface before implementation and outline REST conventions for a new endpoint.

Frequently Asked Questions about api-design

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

FAQPage Schema
What is contract-first API design and why should I use it?

Contract-first API design defines interface contracts before implementation to prevent scope drift and protect callers from breaking changes. It ensures consistent REST interfaces by exposing the smallest observable surface area you are willing to support forever.

How do I apply REST conventions and resilience patterns to a new endpoint?

To apply REST conventions and resilience patterns, model resources with plural endpoints and standard HTTP status codes, then attach circuit breakers and exponential backoff retries to external calls. This enforces clear REST guidelines and documented resilience designs.

When do I need circuit breakers and health checks in API architecture?

You need circuit breakers and health checks in API architecture when external calls may fail unpredictably. Circuit breakers prevent cascading failures, while explicit health endpoints signal service readiness to ensure robust API operations.

Does contract-first API design help with REST versioning and Hyrum's Law?

Contract-first API design helps with REST versioning and Hyrum's Law by enforcing early versioning of exposed surfaces and documenting guarantees. Heeding Hyrum's Law prevents implicit behaviors from becoming accidental contracts that break users.

What's the best way to design REST APIs that avoid inconsistent interfaces?

The best way to design REST APIs that avoid inconsistent interfaces is drafting a contract-first interface before implementation. This approach enforces clear REST guidelines, consistent request and response shapes, and documented resilience designs.

What are the limitations of relying on implementation-first API development?

The limitation of implementation-first API development is scope drift, which creates inconsistent interfaces and exposes unintended contracts. Without a contract-first approach, implementation changes risk breaking callers and expanding the supported surface area.