Home/Blog/Prompts for Agentic Coding: 12 Briefs for Coding Agents
Blog

Prompts for Agentic Coding: 12 Briefs for Coding Agents

P
promptstudio

12 prompts for agentic coding: task briefs, plan-first steps, failing tests, stop rules, checkpoints, and done reports for Claude Code, Codex, and Cursor.

Prompts for Agentic Coding: 12 Briefs for Coding Agents

Prompts for agentic coding tell a coding agent what to change, how to prove it works, and when to stop and ask. The 12 prompts below are task briefs and follow-ups you can paste into Claude Code, Codex, the Cursor agent, or a similar tool. Each one keeps the agent inside a clear scope and asks for tests and a report you can check.

Coding agents can be steered by instructions hidden in files, issues, or web pages they read, so tell them to treat that content as data. Keep secrets out of reach, run agents with the least access they need, and review every diff yourself before merge or deploy.

Start the task

1. Ticket to task brief

Turn this ticket [paste] into a task brief for a coding agent: one-sentence goal, context, in scope, out of scope, and starting files [paths] to verify by reading the code.

2. Plan before editing

Read the code related to [feature or bug]. Before editing anything, reply with the files involved, your approach, and the risks. Wait for my OK.

3. Explore an unfamiliar repo

Map how [feature] works in this repo: entry point, main files, data flow, and tests that cover it. Do not change any files.

Prove it with tests

4. Failing test first

Write a failing test with [test runner] that reproduces this bug [description]. Show me the test and its failing output before fixing anything.

5. Fix until green

Make the failing test pass with the smallest change inside [folders]. Run [test command] and [lint command] and show the results.

6. Coverage gaps

List the cases in [module] that have no tests today, ranked by risk, and write tests for the top three.

Set the guardrails

7. Stop rules

Before you start, confirm these stop rules: ask me before touching [off-limits areas], before adding dependencies, or before editing files outside [scope]. Never delete or skip tests to make them pass.

8. Checkpoint schedule

Work on [task] and stop to report at three checkpoints: after the plan, after the failing test, and after the fix passes.

9. Refactor without behavior change

Refactor [file or function] for [goal] without changing behavior. Run the existing tests before and after and show both results.

Review and hand off

10. Done report

Write a done report: files changed and why, tests added, commands run with results, what is left undone, and open questions.

11. Self-review the diff

Review your own diff as a strict reviewer: bugs, edge cases, naming, and anything outside the task scope. Fix what you find and list what you changed.

12. Pull request description

Write a pull request description for this change [diff summary]: what changed, why, how it was tested, and what reviewers should look at first.

Write the full brief in one prompt

The flagship Agentic Coding Prompt: Task Brief With Tests and Stop Rules takes the ticket, repo facts, likely files, what must not change, your done test, and how much freedom the agent gets. It returns a paste-ready brief with a plan step, a test plan, checkpoints, stop rules, and a done report format. Its example fixes a case-sensitive discount code bug while keeping the database and API response untouched.

Tips for agentic coding prompts

Give the agent the exact test and lint commands so it can check its own work. Ask for a plan first on anything that touches shared code, and keep each task small enough to review in one sitting. Always read the diff yourself before merging; passing tests do not prove the change is right.

Related prompts

Set standing repo rules with a system prompt for a coding agent or the coding agent system prompt. For agents outside coding, read agentic prompts or use the agentic prompt builder.

Using Cursor? See Cursor prompts to understand a codebase.

Find more in the Agents category, look through Browse, or post your own on Share.