From formal-specification
Generates OpenAPI 3.1, AsyncAPI 3.0, or Protocol Buffers contracts from natural language API requirements for contract-first development.
npx claudepluginhub melodic-software/claude-code-plugins --plugin formal-specificationThis skill is limited to using the following tools:
Generate contract-first API specifications from requirements or domain descriptions.
Writes API contracts in OpenAPI/AsyncAPI/GraphQL/gRPC/WebSocket/SSE/Webhook/SDK/file formats from PRD docs. Use after PRD approval, before HLD, to align teams on interfaces.
Designs and manages API contracts before implementation using OpenAPI and AsyncAPI specs for contract-first development workflows and best practices.
Generate OpenAPI 3.1 contracts with schemas, RFC 9457 errors, versioning, and examples. Use when defining API contracts from entities.
Share bugs, ideas, or general feedback.
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: