contracts

Generate OpenAPI 3.x, JSON Schema, and Gherkin artifacts from spec.md files.

Updated Mar 18, 2026
One-click install
npx skills add https://github.com/mikecubed/agent-orchestration --skill contracts-mikecubed
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: contracts
Source: https://github.com/mikecubed/agent-orchestration/tree/main/plugins/flow/skills/contracts
Command: npx skills add https://github.com/mikecubed/agent-orchestration --skill contracts-mikecubed

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automate the generation of machine-readable API contracts from a spec.md or natural-language endpoint description, eliminating manual drafting and ensuring FR-ID traceability.

Core Features & Use Cases

  • Emit openapi.yaml (OpenAPI 3.x) for REST contracts from FRs in your spec.
  • Generate JSON Schema files under schema/{EntityName}.json for domain entities.
  • Produce Gherkin feature files under features/{feature-name}.feature for acceptance tests.
  • Create a durable contracts-summary.md that documents outputs, FR mappings, and unresolved items.
  • Integrate cleanly into the SDLC by running between /flow:sdd-specify and /flow:sdd-plan.

Quick Start

Provide a .sdd/*/spec.md path or a natural-language endpoint description and run the contracts workflow.

Frequently Asked Questions about contracts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate OpenAPI 3.x specs from a natural language endpoint description?

You can generate OpenAPI 3.x specs from natural language by processing endpoint descriptions through the contracts workflow, which derives machine-readable REST contracts and outputs them as openapi.yaml files.

How do I create JSON Schema files for domain entities from a markdown spec?

Creating JSON Schema files from a markdown spec requires running the contracts derivation process, which automatically generates schema definitions and saves them under schema/{EntityName}.json.

Can I automatically generate Gherkin feature files for acceptance testing from an API spec?

Yes, you can generate Gherkin feature files for acceptance testing directly from an API spec, producing structured behavior scenarios saved as features/{feature-name}.feature files.

What is FR-ID traceability in API contract generation?

FR-ID traceability in API contract generation links generated artifacts like OpenAPI and JSON Schema back to their originating functional requirements, ensuring spec mappings are recorded and verifiable in a contracts-summary.md file.

Do I need a specific directory structure to derive machine-readable contracts?

Deriving machine-readable contracts requires a .sdd/{feature-dir}/spec.md file path as input, ensuring outputs like openapi.yaml, JSON schemas, and Gherkin features are written to the correct structured directories.

When should I run the API contract generation step in my software development lifecycle?

You should run API contract generation between the sdd-specify and sdd-plan workflow stages, using the generated openapi.yaml, JSON schemas, and Gherkin features to inform downstream planning and testing.