Install
$ agentstack add skill-mmccalla-coding-agent-skill-library-api-design-and-lifecycle ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
API Design and Lifecycle
When to use
Use this skill when designing, reviewing or evolving application or service APIs: resource models, request/response schemas, authentication and authorisation, versioning, deprecation, OpenAPI specifications and consumer-facing contract tests. Apply it to REST-style and similar request/response service interfaces that agents or clients call.
When not to use
- Use
data-contract-designfor producer–consumer agreements on datasets, tables, files or data products (quality, freshness, semantics). - Use
schema-registry-and-contractsfor event schemas, compatibility modes and streaming registry governance. - Use
message-based-integration-designwhen the primary style is messaging, brokers or EIP topology rather than a service API. - Use
deprecation-and-migrationalone when the work is a general migration plan without API resource or OpenAPI design.
Objective
Produce a clear, implementable API design and lifecycle plan: resources, operations, authZ, OpenAPI contract, versioning and deprecation rules, and executable contract tests that protect consumers without conflating service APIs with data or event contracts.
Procedure
- Clarify consumers, use cases and success criteria. Prefer resource-oriented models over ad-hoc RPC bags of endpoints unless an RPC style is already established.
- Define resources, identifiers, relationships, collections, error shapes and idempotency expectations for write operations.
- Specify authentication and authorisation per operation: who may call, which scopes or roles apply, and how denial is represented. Enforce authZ server-side.
- Author or update an OpenAPI description as the source of truth for paths, methods, parameters, schemas and status codes. Keep examples realistic and non-secret.
- Choose a versioning strategy (URI, header or negotiated) and compatibility rules for additive versus breaking changes. Document how clients discover versions.
- Define deprecation: announcement, sunset timeline, migration guidance and monitoring of deprecated usage before removal.
- Add contract tests (consumer-driven or provider-side schema/status checks) in CI so breaking changes fail before release.
- Record operational concerns: rate limits, pagination, correlation IDs, safe error messages and observability hooks.
Required outputs
# API design:
## Consumers and use cases
## Resource model
| Resource | Identifier | Operations | Notes |
## AuthN / AuthZ
| Operation | AuthN | AuthZ rule | Denial behaviour |
## OpenAPI
- Spec path:
- Notable schemas / status codes:
## Versioning and compatibility
- Strategy:
- Breaking-change policy:
## Deprecation
- Announcement:
- Sunset date / criteria:
- Migration path:
## Contract tests
| Test | Consumer / provider | Assertion |
## Risks and open questions
Rules
- Do not design dataset or event payloads here; route those to
data-contract-designorschema-registry-and-contracts. - Do not rely on client-only authorisation or hidden “admin” query flags.
- Do not break consumers without a versioning or deprecation path.
- Do not treat OpenAPI as optional documentation; keep it aligned with implementation and tests.
- Do not return stack traces or secrets in error bodies.
- Do not invent fields in production responses that are absent from the published contract.
Related skills
data-contract-design— dataset and data-product contractsschema-registry-and-contracts— event schema registry and compatibilitymessage-based-integration-design— messaging and EIP style selectiondeprecation-and-migration— broader deprecation and migration discipline
References
Verification
- [ ] Resource model and operations are explicit.
- [ ] AuthN/AuthZ rules are defined per sensitive operation.
- [ ] OpenAPI (or equivalent) contract is identified and kept current.
- [ ] Versioning and deprecation paths are documented.
- [ ] Contract tests are specified for CI.
- [ ] Scope excludes dataset/event contract design unless explicitly linked.
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: mmccalla
- Source: mmccalla/coding-agent-skill-library
- License: Apache-2.0
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.