write-contracts

Generate a domain contracts.md with types, schemas, OpenAPI blocks, and example payloads.

1|Updated Apr 25, 2026
One-click install
npx skills add https://github.com/daddia/space --skill write-contracts-daddia
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-contracts
Source: https://github.com/daddia/space/tree/main/.agents/skills/write-contracts
Command: npx skills add https://github.com/daddia/space --skill write-contracts-daddia

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the creation of a domain's executable contracts surface, consolidating types, schemas, API routes, and analytics payloads into a single, maintainable reference used by development teams and AI agents.

Core Features & Use Cases

  • Generates a domain-level contracts.md with exact type, schema, and OpenAPI blocks that can be consumed by downstream tooling.
  • Enforces a single source of truth for API surface, data contracts, and event payloads across products and domains.
  • Supports workflow alignment with solution.md and backlog references as inputs for scope and validation.

Quick Start

Provide a target domain and run the skill to generate its contracts.md surface.

Frequently Asked Questions about write-contracts

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

FAQPage Schema
How do I generate executable domain contracts from types and schemas?

To generate executable domain contracts, you provide a target domain to automate the creation of a contracts.md surface. This combines types, schemas, OpenAPI blocks, and example payloads into a single machine-readable reference.

What are domain contracts used for in API architecture planning?

Domain contracts provide a single source of truth for API routes, data shapes, and analytics events. They give development teams and AI agents a precise, machine-readable reference for validating domain interfaces.

Can I use TypeScript and OpenAPI to create a single source of truth for my API surface?

Yes, you can consolidate TypeScript types and OpenAPI schemas into one executable contracts surface. This ensures data contracts and event payloads remain aligned across products and domains.

How do I automate contracts.md scaffolding for precise data shapes and analytics events?

Automating contracts.md scaffolding involves running the skill against your target domain. It outputs YAML frontmatter, type and schema blocks, and worked examples per contract as defined by the framework.

Do I need solution.md or backlog references to generate domain contracts?

Providing solution.md and backlog references supports workflow alignment by serving as inputs for scope and validation. They help ensure the generated contracts surface accurately reflects intended domain boundaries.