Prompt Contracts - Stop Vibe-Prompting Claude
Every developer has done it. You type a vague instruction - “add authentication” - and Claude confidently builds the wrong thing. Wrong stack, wrong pattern, wrong scope. You spend 40 minutes reverting and re-prompting.
That’s vibe-prompting. And it’s fixable.
The Problem
Claude isn’t guessing randomly. It’s filling in ambiguity with reasonable defaults. When you say “add authentication,” Claude picks JWT or sessions based on what’s most common in its training data, not what fits your project. It reinvents your stack because you didn’t tell it not to.
The fix isn’t a smarter model. It’s a better contract.
The 4 Components
A Prompt Contract is a structured specification with four required fields:
| Component | Question it answers | Without it, Claude will… |
|---|---|---|
| GOAL | What does done look like? | Wander toward “done enough” |
| CONSTRAINTS | What can’t be crossed? | Reinvent your stack |
| FORMAT | What structure do I hand back? | Optimize for speed, not maintainability |
| FAILURE CONDITIONS | What breaks the contract? | Guess what “bad” looks like |
The Template
[Task description]
GOAL: [Exact success metric - what does "done" look like?]
CONSTRAINTS: [Hard boundaries - stack, patterns, forbidden approaches]
FORMAT:
1. [File 1 path + type]
2. [File 2 path + type]
FAILURE CONDITIONS:
- [Unacceptable output #1]
- [Unacceptable output #2]
Takes 60 seconds to fill out. Saves 45 minutes of revert cycles.
Real-World Impact
After using Prompt Contracts across 40+ projects:
- Undo/revert rate: ~1 in 3 generations → ~1 in 10
- Rounds to usable code: 3 average → 1.2 average
- CLAUDE.md violations: near zero with session handshake
- Prompts get shorter over time - CLAUDE.md holds the permanent context, contracts hold the session-specific constraints
The compound effect matters. If you ship 3 features a day and each one previously needed 2 rounds of correction, Prompt Contracts give you back 45+ minutes every single day.
Install
claude plugin marketplace add silvesterdivas/prompt-contracts
claude plugin install prompt-contracts@prompt-contracts-marketplace
Then invoke /prompt-contracts before any non-trivial task.
The skill activates automatically when you’re about to prompt for something complex - you don’t have to remember to use it.