plugins/formal-specification/skills/api-contract/SKILL.md
Generate OpenAPI, AsyncAPI, or Protobuf contract from requirements. Use for contract-first API development.
npx skillsauth add melodic-software/claude-code-plugins api-contractInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Generate contract-first API specifications from requirements or domain descriptions.
/api-contract "user registration with email verification"
/api-contract "order events for downstream systems" format=asyncapi
/api-contract "high-performance inventory service" format=protobuf
Parse the API description to identify:
If format not specified, auto-detect based on description:
| Pattern | Recommended Format | |---------|-------------------| | "API", "REST", "endpoint" | OpenAPI 3.1 | | "events", "messages", "streaming" | AsyncAPI 3.0 | | "gRPC", "high-performance", "internal" | Protocol Buffers |
Load the relevant skill:
openapi-design for REST APIsasyncapi-design for event-driven APIsprotobuf-design for gRPC servicesIdentify and structure:
Create the API specification including:
Deliver:
openapi: 3.1.0
info:
title: Service Name API
version: 1.0.0
paths:
/resources:
get: ...
post: ...
components:
schemas: ...
securitySchemes: ...
asyncapi: 3.0.0
info:
title: Service Events
version: 1.0.0
channels:
resourceCreated:
address: resources.created
messages: ...
components:
messages: ...
schemas: ...
syntax = "proto3";
package service.v1;
service ResourceService {
rpc CreateResource(...) returns (...);
rpc GetResource(...) returns (...);
}
message Resource {
string id = 1;
...
}
/api-contract "user registration API with email verification and password reset"
Output:
/api-contract "order lifecycle events for fulfillment and notifications" format=asyncapi
Output:
/api-contract "product catalog service with search and inventory" format=protobuf
Output:
The command integrates with:
development
Search Milan Jovanovic's .NET blog for Clean Architecture, DDD, CQRS, EF Core, and ASP.NET Core patterns. Use for finding applicable patterns, code examples, and architecture guidance. Invoke when working with .NET projects that could benefit from proven architectural patterns.
tools
Install and configure Data API Builder (DAB) for production SQL Server MCP access with RBAC
tools
Manage MssqlMcp servers - status, rebuild, and upstream updates
tools
Developer environment setup guides for Windows, macOS, Linux, and WSL. Use when setting up development machines, installing tools, configuring environments, or following platform-specific setup guides. Covers package management, shell/terminal, code editors, AI tooling, containerization, databases, and more.