Claude Code Prompt Builder That Turns a Rough Task Into a Safe Agent Prompt
Turns a rough coding request into a ready-to-paste Claude Code prompt with repo inspection, scope limits, a plan checkpoint, checkable done criteria and no auto-commits.
Agent prompt for Claude and ChatGPT
You get: The Claude Code prompt in one code block, why each part is there and follow-up prompts
The prompt
mkdir -p .agents/skills/claude-code-prompt-builder-that-turns-a-rough-task-into-a-safe-a && curl -sL "https://prompts-gpt.com/prompts/claude-code-prompt-builder-that-turns-a-rough-task-into-a-safe-agent-prompt/raw" -o .agents/skills/claude-code-prompt-builder-that-turns-a-rough-task-into-a-safe-a/SKILL.mdYou are a senior engineer who writes task prompts for Claude Code, Anthropic's terminal coding agent.
Turn this rough request into a ready-to-paste Claude Code prompt: . Project context: .
Before writing, ask me up to 3 short numbered questions about what is unclear (scope, files that are off-limits, how to verify the result), then wait for my answers.
Rules for the prompt you write:
1. Tell Claude Code to inspect the repository first (README, CLAUDE.md if present, the relevant files) and summarize what it found before changing anything.
2. Ask it for a short numbered plan and to wait for my approval before editing.
3. State the scope: which files or areas may change and which must not.
4. Define done with checkable criteria: named tests, commands taken from the repo's own scripts, expected behavior.
5. Tell it never to invent CLI flags, config keys or library APIs, to check the installed version's docs when unsure, and never to commit, push or deploy.
6. Keep the generated prompt under 250 words, in imperative sentences, with no filler.
Output format:
1. The Claude Code prompt in one code block.
2. Why each part is there: 3-5 bullets.
3. Follow-up prompts: 2 short lines to use after the first pass.
End by listing the assumptions you made and anything I should check in the repo before running it.Example output
How to use this prompt
- Fill {task_goal} with your rough request and {repo_context} with your stack, test tool and anything notable.
- Paste the prompt into ChatGPT, Claude or Gemini.
- Answer the up to 3 questions about scope, off-limits files and verification.
- Check the done criteria use commands that exist in your repo, then paste the code block into Claude Code.
- Who it’s for:
- Developers who use Claude Code and want clearer, safer task prompts
- What you get:
- A short, scoped Claude Code prompt that inspects the repo, proposes a plan for approval, has checkable done criteria, and never commits on its own.
Use cases
- Turning a one-line ticket like 'add rate limiting' into a scoped Claude Code task with tests
- Writing a debugging prompt for an intermittent bug so the agent investigates before changing code
- Preparing a refactor prompt that keeps public APIs and certain folders untouched
- Standardizing how a team writes Claude Code tasks so plans are reviewed before edits
Works well with
- Claude: writes concise agent instructions and asks good clarifying questions
- ChatGPT: handy for drafting the prompt in a separate chat before opening the terminal
- Claude Code: can run the builder itself and then execute the generated prompt
Try another example
The same prompt filled in for a different situation.
Tips and common edits
Why this works
- Clarifying questions on scope and verification come first, so the generated prompt targets your repo instead of generic advice.
- Requiring repo inspection and a plan approval step stops Claude Code from editing before it understands the code.
- Done criteria tied to the repo's own scripts and named tests make the agent's result easy to verify.
Use before starting a Claude Code session when your request is vague. Have the task, your stack and how you test ready. Run it in ChatGPT, Claude or Gemini, then paste the result into Claude Code.
Common edits
- Remove the plan-approval step for small, low-risk tasks you are happy to let Claude Code finish in one pass.
- Add a rule to also update CLAUDE.md with any new conventions the task introduces.
Reuse it: Use in a workflowAdapt in the builder
Prompt details
- By
- Prompts-GPT editors
- Published
Did this prompt work?
More like this
Add a Landing Page to an Existing Repo Using Its Own Components with Claude Code
Get Claude Code to build a landing page inside your existing codebase using your components and styles, with a section plan, file list, checks and a TODO list for copy.
Automated Dead Code Cleanup Plan for Codex Repositories
Get a systematic plan to identify and safely remove unused exports and dead code from your codebase using characterization tests to prevent regressions.
Cursor Call Graph Trace Before You Change a Function
Cursor maps who calls a function and what it calls, with file and line for every step, the callers your planned change could break and the exact tests to run, before any code is edited.
Sync Test Factories and Fixtures with Database Migrations
This prompt updates your test factories, JSON fixtures, and contract tests to match new database schema changes, ensuring your test suite remains consistent with production code.
Port a Function or Module to Another Language With Tests Proving Same Behavior
Lists the source code's behaviors and edge cases, writes tests in the target language first, ports the code idiomatically, and gives a table of library mappings and semantics that differ.
Test-First Bug Fix Skill: Reproduce, Fix, Prove (SKILL.md)
A SKILL.md that forces your coding agent to reproduce a bug with a failing test before changing code, apply the smallest fix, and prove it with the test suite.
- Refactor Pasted Code for Readability Without Changing Its Behavior
- Cursor Characterization-Test-First Refactor of a Legacy Module
- Create Selective Pre-Commit Hooks for Claude Code
- Deconstruct Monolithic Pull Requests into Atomic Commit Stacks
- Design a Benchmark Harness for Claude Code Agent Accuracy
- Mock Tool Fixtures to Test AI Agent Tool-Call Paths