Task brief for Claude Code: frame a feature end to end
Brief template to delegate a complete feature to Claude Code: goal, starting point, constraints, definition of done, working rules and recap format.
Paste in your AI
Paste this prompt in ChatGPT, Claude or Gemini and customize the variables in brackets.
You are Claude Code and you will implement a feature end to end in this repository. Here is the brief; read it fully, then start by presenting a 5-to-10-step plan and wait for my approval before writing code.
Goal (one sentence, from the user's point of view):
[GOAL]
Why now:
[BUSINESS CONTEXT IN 2-3 LINES]
Starting point:
- Files or modules involved: [PATHS]
- Current behaviour: [WHAT HAPPENS TODAY]
- Concrete example of input → expected output: [EXAMPLE]
Constraints:
- Technical: [e.g. no new dependency, strict TypeScript, compatible with migration X]
- Product: [e.g. FR + EN, keyboard accessible, no public API change]
- Do not touch: [FORBIDDEN FILES / FOLDERS]
Definition of done (all must be true):
- [VERIFIABLE CRITERION, e.g. test T passes]
- [CRITERION, e.g. build passes with no new warning]
- [CRITERION, e.g. a test covers edge case Y]
- [CRITERION, e.g. doc D is updated]
Working rules:
- Write or adapt tests before the implementation when possible.
- Small commits, one per plan step.
- If you find the brief incomplete or contradictory, stop and ask a one-line question; do not guess.
- If you see another problem in the code, note it at the end, do not fix it.
At the end, return a recap: files changed (exhaustive list), what changed per file (one line), what you deliberately left out, and what remains to do.
Personalize this prompt with Léa · AI assistant
Léa rewrites this prompt for your job and your exact goal — 3 quick questions.
Why this prompt works
The quality of a task delivered by Claude Code depends less on the model than on the brief. An autonomous agent told "add CSV export" will guess the format, the localisation and the scope — and get at least one of the three wrong. This template forces the four pieces of information that remove back-and-forth: a concrete input → output example, the areas not to touch, a verifiable definition of done, and the instruction to stop when in doubt rather than improvise. Requiring a validated plan before code is deliberate: it is the cheapest moment to correct a misreading. The mandatory final recap (files, changes, left out, remaining) makes review fast and doubles as the pull-request description. This brief works as-is with Codex or any code agent that accepts a long instruction; only the first line changes.
Use Cases
Expected Output
First a 5-to-10-step plan submitted for approval; then the implementation in small commits; finally a four-part recap (files, changes, left out, remaining).
Frequently Asked Questions
Is an input → output example really necessary?
It is the most profitable line of the brief. One example lifts more ambiguity than three paragraphs of description, and it naturally becomes the first test.
What if the task is too big for one brief?
Split by verifiable deliverable (a migration, then the API, then the UI) and chain three briefs. An agent ships three two-hour tasks better than one six-hour task.
Improve this prompt
Run this prompt through the Optimizer to strengthen its context, constraints and expected format.
Improve this prompt with the OptimizerComments
Be the first to comment on this prompt.
Glossary Terms
📬 Get new prompts every week
Join our newsletter and never miss a prompt.
Go further
Improve this prompt with the Optimizer
Analyze the prompt, strengthen the context and get a more precise version.
Claude Prompts
Structure, context and examples to get better answers from Claude.
AI prompts for web developers
Code review and debugging, keeping API keys and secrets out of the prompt.
Security, GDPR & Business Plans
ChatGPT Business, Claude Team, Gemini Workspace and Mistral Vibe compared from vendor sources: training, EU hosting and a GDPR checklist.
Similar Prompts
Write a project's CLAUDE.md: the brief Claude Code reads at every session
Turns your project description into a dense CLAUDE.md: commands, structure, conventions, pitfalls, off-limits areas and situations where the agent must ask before acting.
Design a Secure Webhook API
Design a webhook API with event subscriptions, signed deliveries, retry limits, and a delivery log your support team can inspect.
Generate Storybook Stories for UI Components
Generate Storybook stories for a UI component, with visual variants, interactive controls, interaction tests, and MDX documentation.
Prompt to Master SSR and Hydration with Next.js
Diagnose server rendering and hydration issues in Next.js, choose a rendering strategy, and get TypeScript fixes with a test example.