api-and-interface-design

Category: Development & Coding | Uploader: dsj1984dsj1984 | Downloads: 0 | Version: v1.0(Latest)

Designs stable, well-documented APIs and module interfaces. Use when creating REST/GraphQL endpoints, defining contracts between modules, or changing public interfaces. The wire-format SSOT — response envelope, HTTP status codes, validation taxonomy, payload naming — lives in `.agents/rules/api-conventions.md`; this skill shows authors how to apply it. --- # Skill: api-and-interface-design Process guidance for designing interfaces that are hard to misuse — REST APIs, GraphQL schemas, module boundaries, and component props. The wire-format conventions (envelope shape, status codes, validation taxonomy, payload naming) live in [`.agents/rules/api-conventions.md`](../../../rules/api-conventions.md), which is the SSOT. This skill shows authors **how** to apply those rules; read the rule file for the **what**. Security validation guarantees live in [`security-baseline.md`](../../../rules/security-baseline.md); test-layer scope lives in [`testing-standards.md`](../../../rules/testing-standards.md). ## When to Use - Designing new API endpoints. - Defining module boundaries or contracts between teams. - Creating component prop interfaces. - Establishing database schema that informs API shape. - Changing existing public interfaces. ## 1. Hyrum's Law — Be Intentional About Exposure > With a sufficient number of users of an API, all observable behaviors of > your system will be depended on by somebody, regardless of what you promise > in the contract. Every observable behavior — undocumented quirks, error message text, timing, ordering — becomes a de facto contract once users depend on it. Implications: - **Be intentional about what you expose.** Every observable behavior is a potential commitment. - **Don't leak implementation details.** If users can observe it, they will depend on it. - **Plan for deprecation at design time.** See `deprecation-and-migration` for how to safely remove things users depend on. - **Tests are not enough.** Even with perfect contract tests, "safe"

Changelog: Source: GitHub https://github.com/dsj1984/agent-protocols

Directory Structure

Current level: tree/main/.agents/skills/core/api-and-interface-design/

  • 📄 SKILL.md 11.2 KB

SKILL.md

Login to download/like/favorite ❤ 6 | ★ 0
Comments 0

Please login before commenting.

Loading comments...