Design and validate API contracts before implementation. Generate OpenAPI specs, mock servers, and request/response validation. Invoke with /api.
Installation
Details
Usage
After installing, this skill will be available to your AI coding assistant.
Verify installation:
npx agent-skills-cli listSkill Instructions
name: api-contract description: > Design and validate API contracts before implementation. Generate OpenAPI specs, mock servers, and request/response validation. Invoke with /api.
API Contract Designer
Commands
/api design— Design new API endpoints from a description/api validate— Validate an existing OpenAPI spec for completeness/api mock— Generate mock request/response examples/api diff— Compare two API versions, highlight breaking changes
Procedure
Phase 1: Requirements
Ask the user for:
- What resource/domain does this API serve?
- What operations are needed (CRUD, search, bulk)?
- Authentication method (API key, OAuth, JWT, none)?
- Expected consumers (agents, external clients, Copilot Studio flows)?
Phase 2: Contract Design
Generate an OpenAPI 3.0 spec with paths, request/response schemas, query parameters, auth security schemes, and example values for every field.
Phase 3: Validation
| Check | Rule |
|---|---|
| Naming | snake_case fields, kebab-case paths |
| Versioning | Path prefix /v1/, /v2/ |
| Pagination | Cursor-based preferred |
| Error format | RFC 7807 Problem Details |
| Idempotency | PUT and DELETE must be idempotent |
| Content type | application/json default |
Phase 4: Output
contracts/{resource}.openapi.yaml— OpenAPI speccontracts/{resource}.examples.json— Request/response examples
MCMAP-Specific Patterns
- Use Dataverse Web API conventions (OData v4) for entity endpoints
- Connection references must be declared in solution customizations.xml
- Agent-to-agent contracts go in
contracts/INTER_AGENT_CONTRACT_v1.json - KB document endpoints must respect the 36K char limit
More by kevcofett
View allConnect Claude to 500+ apps through a single MCP gateway server. Manage connections, check status, and list available integrations. Invoke with /rube.
Architecture Decision Records for documenting technical choices. Creates numbered ADRs with context, decision, consequences, and status. Invoke with /adr.
Parse cryptic error messages into plain English with actionable fixes. Covers Power Platform, Python, JavaScript, HTTP, Git, and Dataverse. Invoke with /error.
Save and restore conversation context across sessions. Captures decisions, files modified, blockers, and next steps. Invoke with /checkpoint.
