Skills directory
Spec5-point gate · Any stack

Write the agent contract

Give an agent one bounded outcome, the context to act, and evidence that proves it is done.

Use this when

A one-line task that silently permits repository-wide changes

Done defined as code written rather than behavior verified

Approval-sensitive actions discovered only after execution starts

The quality gate

  • The contract names one outcome and the user or system behavior that must change
  • Relevant files, existing patterns, constraints, and source-of-truth documents are named
  • In-scope and forbidden changes define a clear blast radius
  • Verification commands and manual evidence are part of the definition of done
  • Stop, escalate, and approval conditions are explicit before execution

Prove it: Ask a fresh agent to restate the outcome, allowed files, forbidden moves, evidence, and stop conditions; all five must match the contract.

Install or copy

Save the download as agent-contract/SKILL.md in your agent's supported skills directory, or copy the complete package below. Load it only when its description matches the work.

Portable SKILL.md
---
name: agent-contract
description: "Turns a coding or product request into a bounded agent contract with context, scope, verification, and stop conditions. Use before delegating non-trivial work to one or more AI agents."
---

# Write the agent contract

Apply this skill during **Spec** work. It supports Any stack.

Give an agent one bounded outcome, the context to act, and evidence that proves it is done.

## Instructions

Turn this request into a bounded agent contract before execution. Name one desired outcome and the observable behavior that proves it. Provide only the relevant repository context: files, architecture, existing patterns, and source-of-truth documents. State what is in scope and explicitly forbid unrelated refactors, new dependencies, schema changes, destructive actions, invented claims, and external writes unless authorized. Define completion with exact automated checks and real interaction evidence. Define when the agent must stop, ask for approval, escalate uncertainty, or report a blocker. Resolve conflicting instructions in the contract rather than leaving the agent to choose silently.

## Detect the problem

- A one-line task that silently permits repository-wide changes
- Done defined as code written rather than behavior verified
- Approval-sensitive actions discovered only after execution starts

## Hold the gate

Do not declare this phase complete until every item passes:

- [ ] The contract names one outcome and the user or system behavior that must change
- [ ] Relevant files, existing patterns, constraints, and source-of-truth documents are named
- [ ] In-scope and forbidden changes define a clear blast radius
- [ ] Verification commands and manual evidence are part of the definition of done
- [ ] Stop, escalate, and approval conditions are explicit before execution

## Verify the result

Ask a fresh agent to restate the outcome, allowed files, forbidden moves, evidence, and stop conditions; all five must match the contract.

More spec skills

Want this quality gate applied to a real product decision?

Start a First Loop