Skip to content
Skill

Contract design

Guides designing API, event or schema contracts with versioning and compatibility in mind

Contract design is an open-source agent skill for developer tools. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

Scripts
None
Platforms
Claude Code, Codex, Cursor
GitHub stars
19
Last commit
License
MIT
Listing updated

Similar skills

About Contract design

This skill steers the agent through designing an API, event or schema that other teams or outside consumers will depend on. It starts by mapping who consumes the interface and how much control the team has over each consumer type, since that drives every later decision. It then helps classify which kinds of changes are safe to make additively and which are breaking, and asks the agent to check consumer tolerance before relying on additive changes such as new enum values or optional fields.

The workflow covers choosing a versioning strategy with its trade-offs, defining a deprecation lifecycle, specifying failure semantics such as retryability and idempotency, and deciding what to leave out of the public surface. It also pushes for version observability and a written migration path, and ends with an architecture decision record template plus a machine-readable schema kept in the repository.

The skill assumes a workspace of prior engineering artifacts, including a blast-radius analysis, non-functional requirements and an ownership map, and it refers to other skills in the same plugin for related work. It is written for Claude Code as a plugin in the fde-skills marketplace and does not run any scripts.

When your agent uses it

Design an API, event, or schema contract with compatibility as the primary concern - versioning strategy, backward compatibility, migration path for existing consumers, and failure semantics - plus a consumer impact list. Use when creating or changing anything that crosses a team boundary, when adding a field to a published response or event, when consumers exist outside your repository, or when someone asks how to version an API. Once consumers exist you do not control, the contract stops being a design problem and becomes a coordination problem.

From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.

What it can access

From a static check of its 1 file (11 KB) on GitHub on 1 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.

Check another skill before you install it.

Install

This skill ships in the fde-platform plugin. In Claude Code, add the marketplace and install the plugin (it may include other skills too):

/plugin marketplace add rpraharaj/forward-deployed-engineer
/plugin install fde-platform@fde-skills

Or copy only this skill to ~/.claude/skills/contract-design:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/contract-design &&
cp -R "$tmp/fde-platform/skills/contract-design" ~/.claude/skills/contract-design &&
rm -rf "$tmp"

For one project only, put the folder in .claude/skills/contract-design inside it instead.

Claude Code docs on skills

Copy the skill folder to ~/.agents/skills/contract-design to use it in every repository:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/contract-design &&
cp -R "$tmp/fde-platform/skills/contract-design" ~/.agents/skills/contract-design &&
rm -rf "$tmp"

For one repository only, put the folder in .agents/skills/contract-design inside it instead.

Codex docs on skills

Copy the skill folder to ~/.cursor/skills/contract-design to use it in every project:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/contract-design &&
cp -R "$tmp/fde-platform/skills/contract-design" ~/.cursor/skills/contract-design &&
rm -rf "$tmp"

For one project only, put the folder in .cursor/skills/contract-design inside it instead.

Cursor docs on skills

Run in a terminal (add --scope workspace to install it for the current workspace only):

gemini skills install https://github.com/rpraharaj/forward-deployed-engineer.git --path fde-platform/skills/contract-design

Or copy the folder to ~/.gemini/skills/contract-design yourself.

Gemini CLI docs on skills

For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/contract-design:

tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/contract-design &&
cp -R "$tmp/fde-platform/skills/contract-design" ~/.copilot/skills/contract-design &&
rm -rf "$tmp"

For one project only, put the folder in .github/skills/contract-design inside it instead.

VS Code docs on skills

Get the folder:

git clone --depth 1 https://github.com/rpraharaj/forward-deployed-engineer.git

Then copy forward-deployed-engineer/fde-platform/skills/contract-design into your agent's skills folder as contract-design. Agents that support SKILL.md read one folder per skill.

The SKILL.md format

What it does

Consumer control mapping
Classifies each consumer by team, partner or client type and the level of control the team has over its upgrades.
Compatibility change rules
Separates usually safe changes from breaking ones and flags where consumer tolerance decides the outcome.
Versioning strategy options
Compares URI, header, schema evolution and event type versioning with their respective costs.
Failure semantics design
Covers error meanings, retryability, idempotency keys, timeouts and partial success handling.
Deprecation lifecycle planning
Defines how long a version lives, deprecation triggers, notice periods and retirement criteria.
Decision record template
Provides an ADR structure recording consumers, versioning, failure semantics and migration steps.

Good for

  • Design a versioned REST API that external partners will call
  • Plan how to add a field to a published event without breaking consumers
  • Decide how long to support v1 of a public API before retiring it
  • Define idempotency and retry behavior for a shared payments endpoint
  • Write an ADR describing the compatibility rules for a shared schema

Contract design FAQ

When does Contract design apply?

When creating or changing an API, event, message or shared schema that crosses a team boundary, adding a field to a published response or event, when consumers exist outside the repository, or when asked how to version an API.

When should Contract design not be used?

For internal interfaces whose callers all live in one repository, for prototypes nobody consumes yet, or when the contract exists and is not changing.

What does Contract design expect before designing?

It expects workspace artifacts from earlier steps: a blast-radius analysis with the consumer list, non-functional requirements covering data classification, and an ownership map. If consumers are unknown, it advises designing as though they are uncontrollable.

What does Contract design produce?

An ADR written to the workspace's adr folder, plus a machine-readable schema such as OpenAPI, protobuf or JSON Schema kept in the repository.

How do I install Contract design in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/contract-design to use it in all your projects, or to .claude/skills/contract-design in one project. Or install the fde-platform plugin, which includes it: /plugin marketplace add rpraharaj/forward-deployed-engineer, then /plugin install fde-platform@fde-skills.

Does Contract design run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

Which AI agents can use Contract design?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

What are the best alternatives to Contract design?

The closest alternatives to Contract design are Contract first, API, Contracts, API versioning helper and API integration.

Where this comes from

  • Description: from the skill's own SKILL.md.

More from rpraharaj/forward-deployed-engineer

  1. Defines and tests the boundaries on what an AI agent's tool calls can do

    • Open source
    • 19 GitHub stars
    • Security
  2. Gives agents a procedure to test AI workflows against cases, thresholds and regression

    • Open source
    • 19 GitHub stars
    • Developer tools
  3. Turns access requests into a tracked, parallel critical path with workarounds

    • Open source
    • 19 GitHub stars
    • Productivity
  4. Plans how end users move to a new workflow, with barriers, pilot, support and measures

    • Open source
    • 19 GitHub stars
    • Productivity
  5. Maps what a proposed code change could break before you make it

    • Open source
    • 19 GitHub stars
    • Developer tools
  6. Maps an organization's change approval process so releases can be planned backwards from

    • Open source
    • 19 GitHub stars
    • Productivity