From dev-team
Contract-first API design for stable, evolvable interfaces. Use whenever defining a new API endpoint, inter-service boundary, or modifying an existing contract. Includes backward compatibility checklist and error contract specification.
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev-team:api-designThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Contract-first API design patterns for defining stable, evolvable interfaces between system components. Protocol-agnostic — applies to REST, gRPC, GraphQL, message-based, or any other interface style.
Contract-first API design patterns for defining stable, evolvable interfaces between system components. Protocol-agnostic — applies to REST, gRPC, GraphQL, message-based, or any other interface style.
Define the interface before implementing it. The contract is the source of truth; implementation conforms to the contract, not the other way around. Contracts are versioned artifacts.
/orders/{id})| Strategy | Mechanism | Trade-offs |
|---|---|---|
| URL path | /v1/resources, /v2/resources | Simple routing, but proliferates endpoints |
| Header | Accept: application/vnd.api.v2+json | Clean URLs, but harder to test and discover |
| Content negotiation | Media type with version parameter | Standards-compliant, but adds client complexity |
Choose one strategy per API boundary and apply it consistently. URL path versioning is the simplest default.
Every API defines structured error responses:
| Field | Purpose |
|---|---|
| Error code | Machine-readable identifier (stable across versions) |
| Message | Human-readable description |
| Correlation ID | Trace identifier linking request to logs |
| Details | Optional structured context (field-level validation errors, etc.) |
Error contracts are part of the API contract — not an afterthought.
| Change Type | Impact | Action |
|---|---|---|
| Add optional field | Safe (additive) | No version bump needed |
| Add new endpoint | Safe (additive) | No version bump needed |
| Remove field | Breaking | Deprecate first, remove in next major version |
| Change field type | Breaking | New version required |
| Change endpoint URL | Breaking | Redirect old URL, new version |
| Tighten validation | Breaking | New version required |
| Loosen validation | Safe (relaxing) | No version bump, document change |
Before implementation begins, verify the API contract against:
| Scenario | Apply? | Depth |
|---|---|---|
| New external or public API | Yes | Full procedure |
| New inter-service boundary | Yes | Full procedure |
| Internal module boundary | Partially | Resource modeling and error contracts |
| Private helper functions | No | — |
| Modifying existing API contract | Yes | Backward compatibility checklist |
API contract document covering resources, operations, error cases, versioning strategy, and the backward compatibility checklist results. Be concise — use tables; skip narrative prose.
npx claudepluginhub bdfinst/agentic-dev-team --plugin dev-teamGuide stable API and interface design. Use when creating REST or GraphQL endpoints, defining type contracts, or establishing frontend/backend or module boundaries.
Guides stable API and interface design for REST/GraphQL endpoints, module boundaries, and public interfaces. Applies contract-first principles and Hyrum's Law.
Guides stable API and interface design for REST, GraphQL, module boundaries, and type contracts. Use when designing public interfaces or establishing frontend/backend boundaries.