contract-first

Requires approval of caller-facing interfaces and shared structures before implementation begins.

1|Updated Apr 24, 2026
One-click install
npx skills add https://github.com/kreek/consult --skill contract-first-kreek
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: contract-first
Source: https://github.com/kreek/consult/tree/main/plugin/skills/contract-first
Command: npx skills add https://github.com/kreek/consult --skill contract-first-kreek

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams often let coding agents implement public APIs, schemas, or module boundaries before anyone has agreed on the shape, which locks in costly-to-reverse contracts and causes breakage for downstream callers. This Skill inserts an approval gate so durable interfaces are reviewed and approved before any implementation lands. ## Core Features & Use Cases - Contract Detection: Identifies when a task defines or changes a caller-facing surface such as exported functions, public types, HTTP endpoints, CLI flags, event payloads, database schemas, migrations, or package boundaries. - Scaled Approval Gates: Scales the gate with reversal cost, so additive and easily reversed changes proceed while breaking or durable shapes require an explicit approve, revise, or reject decision. - Compatibility Decisions: Forces an explicit choice on renames and removals, covering breaking changes, aliases, shims, deprecation paths, or retained old surfaces. - Use Case: Before adding a new REST endpoint and its request/response schema, the agent stops, lists each proposed surface with file and line evidence, waits for your approval, and only then implements the agreed shape. ## Quick Start Use the contract-first skill to propose and get approval for the new API endpoint shape before writing any implementation code.

Frequently Asked Questions about contract-first

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

FAQPage Schema
How do I get interface approval before implementing an API?▼

Stop before writing source, migrations, or config, then list each proposed surface with file and line evidence and the boundary rationale. Wait for one explicit approve, revise, or reject decision, and implement only the approved shape.

What counts as a contract in software design?▼

A contract is any shape concrete enough that another caller, service, user, migration step, or future module will depend on it, such as exported functions, public types, endpoints, event payloads, or schemas. An export with no external caller is not yet a contract.

When should I not use an interface approval gate?▼

Skip the gate for internal helper changes, private file moves, typo or docs-only edits, and additive easily reversed changes. Also settle the overall approach in a specification step first if the solution direction is still unsettled.

Does a design doc approval cover the concrete interface shapes?▼

No, an approved design or RFC approves the direction only, not the concrete shapes. Each proposed surface must be listed with evidence and receive its own explicit approve, revise, or reject decision.

What happens if no human is available to approve a contract?▼

In headless, scheduled, or delegated sessions, do not deadlock waiting for approval. Build the most conservative version of the shape, mark the contract as provisional, and flag the pending decision in the close-out.