api-contract-writer

Derive HTTP API contracts from reviewed use cases and technical designs.

1|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/bflandev/threadline-ai --skill api-contract-writer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-contract-writer
Source: https://github.com/bflandev/threadline-ai/tree/main/skills/api-contract-writer
Command: npx skills add https://github.com/bflandev/threadline-ai --skill api-contract-writer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Automates the creation of formal HTTP API contracts from validated use cases and technical designs, ensuring consistent interfaces and error handling.

Core Features & Use Cases

  • Derives endpoint definitions from interactors, typed errors, and domain events
  • Maps use-case elements to HTTP methods, URLs, and status codes
  • Generates structured API contract templates with derived requests and responses

Quick Start

Provide the reviewed use cases and technical design, then run the API contract writer to generate the contracts.

Frequently Asked Questions about api-contract-writer

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

FAQPage Schema
How do I generate HTTP API contracts from use cases?

To generate HTTP API contracts from use cases, provide reviewed use cases and technical design to derive endpoint definitions, mapping use-case elements to HTTP methods, URLs, and status codes. This produces structured templates with derived requests and responses.

What is the best way to map use-case elements to HTTP methods and status codes?

Mapping use-case elements to HTTP methods and status codes is done by deriving endpoint definitions from interactors, typed errors, and domain events, ensuring each status code and error envelope is traceable to its use case and postconditions.

How do I ensure every REST API endpoint and error envelope is traceable to its use case?

Ensuring every REST API endpoint and error envelope is traceable to its use case requires deriving HTTP API contracts from validated use cases and technical designs, enforcing consistent interfaces and error handling across all generated specifications.

Can I use this API contract writer for REST APIs without pre-existing technical design documents?

Using this API contract writer for REST APIs requires pre-existing reviewed use cases and technical design documents as input. Without these prerequisites, endpoint definitions, request and response shapes, and error mappings cannot be accurately derived.

Does generating API contract templates require dependencies or external components?

Generating API contract templates requires no external dependencies or components. The process derives requests and responses directly from the provided use cases and technical design inputs to produce the final structured contract.

What are the limitations of deriving API contracts from use cases automatically?

Deriving API contracts from use cases automatically is limited by the quality of the input use cases and technical design. If the reviewed scenarios lack postconditions or typed errors, the generated endpoint definitions and error mappings may be incomplete.