IntermediateCoding AgentsFree prompt

Brief a Coding Agent (Claude Code / Codex) on a Real Task

Write a precise task brief for an autonomous coding agent so it ships the right change without wandering across the codebase.

Get a self-contained brief — context, constraints, definition of done — that lets a coding agent work safely in an existing repo.

claude codecodexcoding agenttask briefscope

At a glance

Access

Free prompt

Open to copy — no account or payment needed.

Prompt objective

Get a self-contained brief — context, constraints, definition of done — that lets a coding agent work safely in an existing repo.

Real use case

A developer wants Claude Code to add rate limiting to an API, but a vague "add rate limiting" prompt risks the agent touching unrelated files or inventing a new framework.

Customize these fields first

LANGUAGE, FRAMEWORK, KEY DIRSWHAT TO BUILD OR FIXTHE UNDERLYING GOALWHAT IT MUST NOT CHANGE, STYLE, DEPENDENCIES ALLOWED

Replace the placeholders with your own context before you run the prompt. That usually improves the first output more than adding more instructions later.

Prompt

You are writing a task brief for an autonomous coding agent (e.g. Claude Code or Codex) that will work directly in an existing repository.

Repo / stack: [LANGUAGE, FRAMEWORK, KEY DIRS]
Task: [WHAT TO BUILD OR FIX]
Why: [THE UNDERLYING GOAL]
Constraints: [WHAT IT MUST NOT CHANGE, STYLE, DEPENDENCIES ALLOWED]

Write the brief with these labeled sections:
1. Objective in one sentence.
2. Exact scope: the files/areas it may edit, and the ones it must not touch.
3. Required approach or patterns to follow (reference existing code it should mimic).
4. Definition of done: observable acceptance criteria (tests pass, endpoint behaves, etc.).
5. Verification steps the agent should run itself (commands, tests) before declaring done.
6. Guardrails: do not add new dependencies without flagging, do not run destructive commands, do not commit/push unless asked.
7. What to report back: a summary of changes, files touched, and any decisions or open questions.

Keep it specific enough that the agent does not need to ask follow-up questions to start.

Open directly in an AI — the text is pre-filled:

How to use this prompt

  1. 1Replace the key placeholders first: LANGUAGE, FRAMEWORK, KEY DIRS, WHAT TO BUILD OR FIX, THE UNDERLYING GOAL, WHAT IT MUST NOT CHANGE, STYLE, DEPENDENCIES ALLOWED.
  2. 2Replace any bracketed placeholders like [this] with your own context.
  3. 3Add extra background information when you want more tailored results.
  4. 4Combine multiple prompts in one conversation when you need a richer output.
  5. 5Save your best-performing prompts so they are easy to reuse later.

Next best step

Open the guide first, then branch only if you still need more.

A guide for technical builders choosing between prompts, coding workflows, and agent-based implementation.

If this prompt is close but not quite right, generate variants next. If the job is recurring, move into the course library after the guide.

Related prompts

View all

Explore other prompt categories

Move sideways into adjacent libraries when the current category is not the full answer.

Every prompt here is free. The course teaches the thinking behind them.

Copy as many prompts as you like. When you want to move from single prompts to a repeatable AI workflow, Learn AI in 30 Days walks through it, one day at a time.

Get the courseSee the 30-day curriculum first

Buy the course once ($15/$20 by length), or go all-access for $10/mo with a verifiable certificate.