api-and-interface-design

Define and lock API and interface contracts with validation and versioning.

42|9|Updated Mar 16, 2026
One-click install
npx skills add https://github.com/drvoss/everything-copilot-cli --skill api-and-interface-design-drvoss
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-and-interface-design
Source: https://github.com/drvoss/everything-copilot-cli/tree/main/skills/development/api-and-interface-design
Command: npx skills add https://github.com/drvoss/everything-copilot-cli --skill api-and-interface-design-drvoss

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Public and cross-team interfaces often accumulate accidental promises and undocumented behaviors that break downstream consumers; this skill helps teams define and lock the contract before implementation so compatibility, validation, and versioning remain intentional and reviewable.

Core Features & Use Cases

  • Contract-first design: Draft explicit interface contracts listing consumers, inputs, outputs, invariants, and non-goals before writing code.
  • Hyrum's Law reviews: Systematically surface accidental observable behaviors and decide whether to document, hide, or remove them.
  • Boundary validation & compatibility: Define validation at the trust boundary, error envelopes, exit codes, and a migration/versioning strategy for breaking changes.
  • Use Case: Designing a public REST API or CLI command where external tools or third-party developers depend on stable field names, response shapes, and error semantics.

Quick Start

Draft a concrete interface contract that names the consumers, enumerates inputs and outputs, specifies validation and error semantics, and describes the migration strategy before implementation.

Frequently Asked Questions about api-and-interface-design

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

FAQPage Schema
How do I prevent accidental API compatibility breaks for downstream consumers?

To prevent accidental API compatibility breaks, define and lock explicit interface contracts before implementation. This ensures inputs, outputs, validation, error semantics, and versioning remain intentional and reviewable for all downstream consumers.

What is Hyrum's Law and how does it affect interface design?

Hyrum's Law in interface design identifies accidental observable behaviors that downstream consumers depend on. Systematic Hyrum's Law reviews help teams surface these hidden promises and decide whether to document, hide, or remove them before deployment.

How do I design a contract-first REST API or CLI with proper migration strategies?

Design a contract-first REST API or CLI by drafting explicit contracts that name consumers, enumerate inputs and outputs, specify boundary validation, and describe migration strategies for breaking changes before writing any code.

Does this approach to interface design work for webhooks and SDK surfaces?

Yes, this interface design approach works for webhooks and SDK surfaces. It applies to public HTTP APIs, CLIs, and cross-team integration points, ensuring stable field names, response shapes, and error semantics across all integration boundaries.

What is the best way to handle validation and error semantics at a trust boundary?

The best way to handle validation at a trust boundary is to explicitly define error envelopes and exit codes within the interface contract. This locks error semantics and ensures compatibility during future versioning or migration changes.

When should I define versioning and migration strategies for my public API?

You should define versioning and migration strategies for your public API during the initial design and change planning phases. Establishing these strategies before implementation prevents accidental compatibility breaks when introducing breaking changes.