# Contract design

> Contract design is an open-source agent skill for developer tools. Guides designing API, event or schema contracts with versioning and compatibility in mind. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/rpraharaj/forward-deployed-engineer/tree/main/fde-platform/skills/contract-design
- **Repository:** https://github.com/rpraharaj/forward-deployed-engineer
- **GitHub stars:** 19
- **License:** MIT
- **Skill name:** contract-design
- **Collection:** https://github.com/rpraharaj/forward-deployed-engineer
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-12-01

## About

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.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/rpraharaj/forward-deployed-engineer/tree/HEAD/fde-platform/skills/contract-design)
- [License: MIT](https://github.com/rpraharaj/forward-deployed-engineer/tree/HEAD/fde-platform/skills/contract-design)

## Features

- **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

## Install

### Claude Code

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

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

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

```sh
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.

### Codex

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

```sh
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.

### Cursor

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

```sh
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.

### Gemini CLI

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

```sh
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.

### VS Code

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

```sh
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.

### Other agents

Get the folder:

```sh
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.

## 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.

## Alternatives

- [Contract first](https://ai-powered.com/skills/contract-first): Contract first is an open-source agent skill for developer tools.
- [API](https://ai-powered.com/skills/api): API is an open-source agent skill for developer tools.
- [Contracts](https://ai-powered.com/skills/contracts-ramboz): Contracts is an open-source agent skill for developer tools.
- [API versioning helper](https://ai-powered.com/skills/api-versioning-helper): API versioning helper is an open-source agent skill for developer tools.
- [API integration](https://ai-powered.com/skills/api-integration): API integration is an open-source agent skill for developer tools.
- [Architecture reasoning](https://ai-powered.com/skills/architecture-reasoning): Architecture reasoning is an open-source agent skill for developer tools.
- [Architect](https://ai-powered.com/skills/architect-michael-denyer): Architect is an open-source agent skill for developer tools.
- [Dependency upgrade](https://ai-powered.com/skills/dependency-upgrade): Dependency upgrade is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/contract-design
