api-design-and-evolution
Design, govern, document, review, and evolve consumer-facing APIs and event interfaces. Use when choosing REST/HTTP, GraphQL, RPC, events, webhooks, or streaming; writing OpenAPI or AsyncAPI contracts; assessing an API landscape, ownership, duplication, lifecycle, discoverability
Install
npx skills add https://github.com/magnus919/agent-skills/tree/main/api-design-and-evolution
claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install magnus919-agent-skills@llmmart
git clone https://github.com/magnus919/agent-skills.git
The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole magnus919/agent-skills collection as a plugin from our marketplace. Git is the plain clone.
README
API Design And Evolution
Design and govern APIs that consumers can integrate with, operate, and migrate without relying on unwritten assumptions.
Why Install This Skill
An API is a long-lived agreement: mobile apps, partners, generated SDKs, jobs, and event consumers can all depend on details that are easy to overlook. This skill helps your agent begin with the consumer's job and the domain's meaning before naming a route or selecting a protocol.
It produces practical design artifacts for HTTP, GraphQL, RPC, events, webhooks, and streams. Your agent can document retries, errors, authorization boundaries, delivery semantics, compatibility risks, and a migration path instead of treating an OpenAPI file as the whole design. It can also assess a portfolio for ownership, duplication, discoverability, lifecycle, and retirement, then separate gateway or ingress concerns from service-mesh responsibilities and application contracts.
What You Get
| Contents | Provides |
|---|---|
SKILL.md |
A workflow from discovery through rollout and verification |
references/ |
Protocol, schema, failure, event, evolution, landscape, topology, agent-consumer, testing, and source guidance |
templates/ |
Fillable briefs, contracts, taxonomies, landscape assessments, agent-consumer reviews, plans, and reviews |
Quick Start
Ask your agent: Design an API contract for creating and listing invoices, including retry and migration behavior.
It should begin an API design brief, select an interface style from the workload, and produce a contract reviewable by consumers and implementers.
Triggers
- Design or review a REST/HTTP, GraphQL, RPC, event, webhook, or streaming API
- Write or improve OpenAPI or AsyncAPI contracts
- Define pagination, errors, idempotency, concurrency, or rate/resource behavior
- Assess a consumer-breaking API change, version an interface, or plan deprecation
- Build a migration and rollback plan for an external interface
- Assess an API portfolio, ownership model, discoverability, duplication, lifecycle, or retirement
- Review an API or tool surface used directly by an agent or automation, including task discovery, cross-service identifiers, bounded outputs, errors, and safe composition
- Decide which gateway, ingress proxy, service mesh, routing, policy, telemetry, or failure boundary owns a concern
Requirements
No runtime dependencies or API keys. The skill links to public standards; validate tooling support before relying on a specific OpenAPI or AsyncAPI feature for code generation or documentation.
Skill manifest
API Design And Evolution
Design an interface as a durable agreement with its consumers, not a route list. Start with the consumer job, domain meaning, authority boundary, and failure modes; then choose the interface style and contract format. Keep facts, assumptions, and policy decisions distinguishable.
When to use
Use for a new or changed REST/HTTP API, GraphQL schema, RPC operation, event or message contract, webhook, or streaming interface. Use it before implementation and again whenever consumer-visible behavior changes.
When not to use
Do not use this as an ADR template, a complete product-discovery method, a security assessment, or an implementation test plan. Hand those concerns to adr-authoring, product-discovery, secure-software-engineering, and verification-methodology, respectively.
Workflow
- Classify the scope. If the request spans more than one interface, start templates/api-landscape-assessment.md and read references/api-landscape-and-governance.md. If it changes where traffic is admitted, routed, observed, or isolated, read references/api-infrastructure-topologies.md. Keep portfolio findings separate from any individual contract decision.
- Discover the agreement. State consumer jobs, domain terms and invariants, authoritative data and schema owners, actors, object/action authority boundaries, data sensitivity, and failure modes. Record unanswered questions rather than inventing policy. Start templates/api-design-brief.md. When an agent or automation is a direct consumer, also read references/agent-consumer-interfaces.md and complete templates/agent-consumer-interface-review.md.
- Choose the interface shape. Compare interaction direction, coupling, delivery needs, query flexibility, mutation semantics, caching, observability, and evolution surface. Read references/interface-selection.md. Record the choice and rejected options in the brief; use an ADR only when the choice is consequential beyond this interface.
- Make the contract explicit. Define representations and their semantics, including null versus absent, defaults, enums/unions, identifiers, timestamps, units, ordering, filtering, and pagination. Use templates/endpoint-contract.md with references/contract-semantics.md.
- Design mutation and failure behavior. Define authority checks, preconditions, idempotency scope and equivalence, retries, concurrency, partial outcomes, long-running operation state, errors, and resource limits. Read references/operations-and-failures.md and create templates/error-taxonomy.md when errors are shared across operations.
- Describe asynchronous delivery where relevant. For messages, webhooks, or streams, state the publisher/subscriber perspective, envelope, delivery contract, duplicate/gap/reordering behavior, ordering scope, and security boundary. Read references/events-webhooks-streaming.md.
- Assess change from each consumer's perspective. Inventory consumers, generated clients, strict decoders, signatures, caches, quotas, and operational dependencies. Complete templates/compatibility-change-assessment.md. Do not call a change safe solely because it is additive.
- Plan and verify rollout. For a deprecation or migration, use templates/deprecation-migration-plan.md and references/evolution-and-deprecation.md. Review the contract using templates/contract-review.md. Test provider conformance, consumer expectations, compatibility diffs, examples, negative cases, and the deployed boundary. Load release-engineering for release sequencing, artifact promotion, progressive exposure, and coordinated rollback after the compatibility policy is defined.
Reference Guide
| Load when | File |
|---|---|
| Assessing an API portfolio, ownership, duplication, discoverability, lifecycle, standards, or retirement | references/api-landscape-and-governance.md and templates/api-landscape-assessment.md |
| Comparing gateways, ingress proxies, service meshes, traffic direction, routing, policy, telemetry, or failure boundaries | references/api-infrastructure-topologies.md |
| Selecting REST/HTTP, GraphQL, RPC, event/message, webhook, or streaming | references/interface-selection.md |
| Modeling data, collection reads, schemas, or OpenAPI | references/contract-semantics.md |
| Designing writes, errors, retry behavior, limits, or authorization handoff | references/operations-and-failures.md |
| Designing event contracts, webhook delivery, or streams | references/events-webhooks-streaming.md |
| Reviewing compatibility, versions, deprecation, migration, or rollback | references/evolution-and-deprecation.md |
| Preparing contract/provider/consumer/deployment verification | references/contract-verification.md |
| Checking exact sources, versions, status, and intended use | references/source-index.md |
| Reviewing APIs or tools used directly by agents and automations | references/agent-consumer-interfaces.md and templates/agent-consumer-interface-review.md |
| Exercising required edge cases before claiming readiness | references/scenario-probes.md |
Security Boundary
Document authentication requirements and server-side object/action authorization in the interface contract. For the threat model, credential handling, tenant isolation, untrusted URLs or files, webhook signature design, output minimization, redaction, or abuse resistance, load secure-software-engineering. An API contract cannot prove that an authorization boundary is enforced.
Ownership Boundaries
- Product owners decide consumer outcomes, audience, value, and lifecycle intent; this skill turns those decisions into interface agreements and evidence.
- Platform owners decide gateway, ingress, mesh, networking, deployment, and runtime operations. This skill identifies topology responsibilities and contract consequences but does not operate the substrate.
- Security owners decide threat models, credential and secret controls, abuse resistance, and tenant isolation. This skill records the contract handoff and required authorization behavior without substituting for the assessment.
- Architecture owners decide cross-system principles, significant boundaries, and durable architecture decisions. Use adr-authoring when a landscape or topology decision has consequences beyond the API portfolio.
An API landscape assessment is not a product roadmap, platform runbook, security review, or enterprise architecture repository. Escalate unresolved ownership, authority, or retirement decisions instead of assigning them implicitly.
Completion
Stop when the selected interface has an owner, an authoritative contract, explicit consumer and failure assumptions, a compatibility assessment for each change, and evidence or an explicit gap for each required review item. Escalate unresolved domain semantics, authority, delivery, or consumer-impact questions to their accountable owner.
Files (agent-skills)
-
evals
-
evals.json 14.5 KB
Loading…
-
-
references
-
agent-consumer-interfaces.md 5.8 KB
Loading… -
api-infrastructure-topologies.md 5.1 KB
Loading… -
api-landscape-and-governance.md 5.2 KB
Loading… -
contract-semantics.md 4.9 KB
Loading… -
contract-verification.md 1.4 KB
Loading… -
events-webhooks-streaming.md 2.3 KB
Loading… -
evolution-and-deprecation.md 1.7 KB
Loading… -
interface-selection.md 2.2 KB
Loading… -
operations-and-failures.md 3.4 KB
Loading… -
scenario-probes.md 1.7 KB
Loading… -
source-index.md 6.2 KB
Loading…
-
-
templates
-
agent-consumer-interface-review.md 2 KB
Loading… -
api-design-brief.md 833 B
Loading… -
api-landscape-assessment.md 2 KB
Loading… -
compatibility-change-assessment.md 807 B
Loading… -
contract-review.md 1.7 KB
Loading… -
deprecation-migration-plan.md 634 B
Loading… -
endpoint-contract.md 1.3 KB
Loading… -
error-taxonomy.md 599 B
Loading…
-
-
README.md 2.5 KB
# API Design And Evolution Design and govern APIs that consumers can integrate with, operate, and migrate without relying on unwritten assumptions. ## Why Install This Skill An API is a long-lived agreement: mobile apps, partners, generated SDKs, jobs, and event consumers can all depend on details that are easy to overlook. This skill helps your agent begin with the consumer's job and the domain's meaning before naming a route or selecting a protocol. It produces practical design artifacts for HTTP, GraphQL, RPC, events, webhooks, and streams. Your agent can document retries, errors, authorization boundaries, delivery semantics, compatibility risks, and a migration path instead of treating an OpenAPI file as the whole design. It can also assess a portfolio for ownership, duplication, discoverability, lifecycle, and retirement, then separate gateway or ingress concerns from service-mesh responsibilities and application contracts. ## What You Get | Contents | Provides | |---|---| | `SKILL.md` | A workflow from discovery through rollout and verification | | `references/` | Protocol, schema, failure, event, evolution, landscape, topology, agent-consumer, testing, and source guidance | | `templates/` | Fillable briefs, contracts, taxonomies, landscape assessments, agent-consumer reviews, plans, and reviews | ## Quick Start Ask your agent: `Design an API contract for creating and listing invoices, including retry and migration behavior.` It should begin an API design brief, select an interface style from the workload, and produce a contract reviewable by consumers and implementers. ## Triggers - Design or review a REST/HTTP, GraphQL, RPC, event, webhook, or streaming API - Write or improve OpenAPI or AsyncAPI contracts - Define pagination, errors, idempotency, concurrency, or rate/resource behavior - Assess a consumer-breaking API change, version an interface, or plan deprecation - Build a migration and rollback plan for an external interface - Assess an API portfolio, ownership model, discoverability, duplication, lifecycle, or retirement - Review an API or tool surface used directly by an agent or automation, including task discovery, cross-service identifiers, bounded outputs, errors, and safe composition - Decide which gateway, ingress proxy, service mesh, routing, policy, telemetry, or failure boundary owns a concern ## Requirements No runtime dependencies or API keys. The skill links to public standards; validate tooling support before relying on a specific OpenAPI or AsyncAPI feature for code generation or documentation. -
SKILL.md 9.2 KB
--- name: api-design-and-evolution description: >- Design, govern, document, review, and evolve consumer-facing APIs and event interfaces. Use when choosing REST/HTTP, GraphQL, RPC, events, webhooks, or streaming; writing OpenAPI or AsyncAPI contracts; assessing an API landscape, ownership, duplication, lifecycle, discoverability, retirement, gateways, service meshes, north-south or east-west traffic, routing, policy, observability, or failure boundaries; defining schemas, pagination, mutations, errors, idempotency, or compatibility; or planning versioning, deprecation, and migration. Do not use for product discovery, platform operations, full security assessment, ADR authoring, or delivery gates; route those to the neighboring specialist skills. license: MIT compatibility: No runtime dependency. References version- and status-aware public standards indexed in references/source-index.md. --- # API Design And Evolution Design an interface as a durable agreement with its consumers, not a route list. Start with the consumer job, domain meaning, authority boundary, and failure modes; then choose the interface style and contract format. Keep facts, assumptions, and policy decisions distinguishable. ## When to use Use for a new or changed REST/HTTP API, GraphQL schema, RPC operation, event or message contract, webhook, or streaming interface. Use it before implementation and again whenever consumer-visible behavior changes. ## When not to use Do not use this as an ADR template, a complete product-discovery method, a security assessment, or an implementation test plan. Hand those concerns to [adr-authoring](../adr-authoring/SKILL.md), [product-discovery](../product-discovery/SKILL.md), [secure-software-engineering](../secure-software-engineering/SKILL.md), and [verification-methodology](../verification-methodology/SKILL.md), respectively. ## Workflow 1. **Classify the scope.** If the request spans more than one interface, start [templates/api-landscape-assessment.md](templates/api-landscape-assessment.md) and read [references/api-landscape-and-governance.md](references/api-landscape-and-governance.md). If it changes where traffic is admitted, routed, observed, or isolated, read [references/api-infrastructure-topologies.md](references/api-infrastructure-topologies.md). Keep portfolio findings separate from any individual contract decision. 2. **Discover the agreement.** State consumer jobs, domain terms and invariants, authoritative data and schema owners, actors, object/action authority boundaries, data sensitivity, and failure modes. Record unanswered questions rather than inventing policy. Start [templates/api-design-brief.md](templates/api-design-brief.md). When an agent or automation is a direct consumer, also read [references/agent-consumer-interfaces.md](references/agent-consumer-interfaces.md) and complete [templates/agent-consumer-interface-review.md](templates/agent-consumer-interface-review.md). 3. **Choose the interface shape.** Compare interaction direction, coupling, delivery needs, query flexibility, mutation semantics, caching, observability, and evolution surface. Read [references/interface-selection.md](references/interface-selection.md). Record the choice and rejected options in the brief; use an ADR only when the choice is consequential beyond this interface. 4. **Make the contract explicit.** Define representations and their semantics, including null versus absent, defaults, enums/unions, identifiers, timestamps, units, ordering, filtering, and pagination. Use [templates/endpoint-contract.md](templates/endpoint-contract.md) with [references/contract-semantics.md](references/contract-semantics.md). 5. **Design mutation and failure behavior.** Define authority checks, preconditions, idempotency scope and equivalence, retries, concurrency, partial outcomes, long-running operation state, errors, and resource limits. Read [references/operations-and-failures.md](references/operations-and-failures.md) and create [templates/error-taxonomy.md](templates/error-taxonomy.md) when errors are shared across operations. 6. **Describe asynchronous delivery where relevant.** For messages, webhooks, or streams, state the publisher/subscriber perspective, envelope, delivery contract, duplicate/gap/reordering behavior, ordering scope, and security boundary. Read [references/events-webhooks-streaming.md](references/events-webhooks-streaming.md). 7. **Assess change from each consumer's perspective.** Inventory consumers, generated clients, strict decoders, signatures, caches, quotas, and operational dependencies. Complete [templates/compatibility-change-assessment.md](templates/compatibility-change-assessment.md). Do not call a change safe solely because it is additive. 8. **Plan and verify rollout.** For a deprecation or migration, use [templates/deprecation-migration-plan.md](templates/deprecation-migration-plan.md) and [references/evolution-and-deprecation.md](references/evolution-and-deprecation.md). Review the contract using [templates/contract-review.md](templates/contract-review.md). Test provider conformance, consumer expectations, compatibility diffs, examples, negative cases, and the deployed boundary. Load [release-engineering](../release-engineering/SKILL.md) for release sequencing, artifact promotion, progressive exposure, and coordinated rollback after the compatibility policy is defined. ## Reference Guide | Load when | File | |---|---| | Assessing an API portfolio, ownership, duplication, discoverability, lifecycle, standards, or retirement | [references/api-landscape-and-governance.md](references/api-landscape-and-governance.md) and [templates/api-landscape-assessment.md](templates/api-landscape-assessment.md) | | Comparing gateways, ingress proxies, service meshes, traffic direction, routing, policy, telemetry, or failure boundaries | [references/api-infrastructure-topologies.md](references/api-infrastructure-topologies.md) | | Selecting REST/HTTP, GraphQL, RPC, event/message, webhook, or streaming | [references/interface-selection.md](references/interface-selection.md) | | Modeling data, collection reads, schemas, or OpenAPI | [references/contract-semantics.md](references/contract-semantics.md) | | Designing writes, errors, retry behavior, limits, or authorization handoff | [references/operations-and-failures.md](references/operations-and-failures.md) | | Designing event contracts, webhook delivery, or streams | [references/events-webhooks-streaming.md](references/events-webhooks-streaming.md) | | Reviewing compatibility, versions, deprecation, migration, or rollback | [references/evolution-and-deprecation.md](references/evolution-and-deprecation.md) | | Preparing contract/provider/consumer/deployment verification | [references/contract-verification.md](references/contract-verification.md) | | Checking exact sources, versions, status, and intended use | [references/source-index.md](references/source-index.md) | | Reviewing APIs or tools used directly by agents and automations | [references/agent-consumer-interfaces.md](references/agent-consumer-interfaces.md) and [templates/agent-consumer-interface-review.md](templates/agent-consumer-interface-review.md) | | Exercising required edge cases before claiming readiness | [references/scenario-probes.md](references/scenario-probes.md) | ## Security Boundary Document authentication requirements and server-side object/action authorization in the interface contract. For the threat model, credential handling, tenant isolation, untrusted URLs or files, webhook signature design, output minimization, redaction, or abuse resistance, load [secure-software-engineering](../secure-software-engineering/SKILL.md). An API contract cannot prove that an authorization boundary is enforced. ## Ownership Boundaries - **Product owners** decide consumer outcomes, audience, value, and lifecycle intent; this skill turns those decisions into interface agreements and evidence. - **Platform owners** decide gateway, ingress, mesh, networking, deployment, and runtime operations. This skill identifies topology responsibilities and contract consequences but does not operate the substrate. - **Security owners** decide threat models, credential and secret controls, abuse resistance, and tenant isolation. This skill records the contract handoff and required authorization behavior without substituting for the assessment. - **Architecture owners** decide cross-system principles, significant boundaries, and durable architecture decisions. Use [adr-authoring](../adr-authoring/SKILL.md) when a landscape or topology decision has consequences beyond the API portfolio. An API landscape assessment is not a product roadmap, platform runbook, security review, or enterprise architecture repository. Escalate unresolved ownership, authority, or retirement decisions instead of assigning them implicitly. ## Completion Stop when the selected interface has an owner, an authoritative contract, explicit consumer and failure assumptions, a compatibility assessment for each change, and evidence or an explicit gap for each required review item. Escalate unresolved domain semantics, authority, delivery, or consumer-impact questions to their accountable owner.
Comments (0)
Sign in to join the conversation.
Reviews (0)
No reviews yet.
No comments yet.