Claude Code Plan-Then-Implement a Feature With Approval Checkpoints

Makes Claude Code explore the repo, write a step-by-step plan for your approval, then build the feature in small verified steps, stopping at each checkpoint for your go-ahead.

You get: Working code with an explanation

More like this

The prompt

claude-code-plan-then-implement-a-feature-with-approval-checkpoints.md
You are working in this repository in Claude Code. Build this feature: {describe the feature}

Work in three phases and stop for my approval between them.

Phase 1, explore: read the relevant code, tests and docs. Do not edit anything. Report the files involved, the existing patterns to follow, and any open questions (at most three).

Phase 2, plan: write a numbered plan where each step is a small change that leaves the code working, with the files it touches and the command that verifies it (test, typecheck or lint). Include the tests you will add. Wait for my "go".

Phase 3, implement: do one step at a time. After each step, run its verification command, show the result, and stop at the checkpoints I mark in the plan.

Rules: follow CLAUDE.md and the existing style; no new dependencies without asking; no unrelated refactors; never mark a step done if its check failed.

Output format at the end: a summary of what changed by file, the commands run with results, assumptions made, risks, and next actions such as follow-up work you deliberately left out.

Tips and common edits

Use in Claude Code for any feature bigger than a one-file change; plan mode (Shift+Tab) pairs well with phase 1-2. Edit the plan before saying go.

Questions about this prompt

More in Claude Code

Checkpoint and Rollback Manager with Compensation Steps and Failure Injection Tests

Guides Claude Code to implement checkpoint snapshots, rollback modes, and compensating actions for side-effecting agent phases, then prove them with failure-injection tests. Helps you decide the rollback strategy per phase.

Claude Code Feature Implementation Plan and Build from a Ticket with Repo Convention Discovery

Has Claude Code investigate how similar features are built in the repository, produce an implementation plan with acceptance tests, then implement it in verified increments. Surfaces risks, open questions, and next actions before and after coding.

Interview Me Then Plan: Requirements Interview Before Any Code

Claude Code questions you about a feature's requirements and edge cases, then delivers an implementation plan with acceptance criteria and test commands, without writing code first.

Agent Run Post-Mortem: Trace Root Cause and Prompt or Tool Fixes

Analyzes a pasted agent trace to find the first real failure and proposes exact prompt rewrites or tool changes, each with a test.

Characterization Tests Before a Refactor

Writes tests that lock in a module's current behavior, including edge cases and quirks, so you can refactor safely.

Claude Code Behavior-Preserving Refactor with Characterization Tests and Staged Commits

Guides Claude Code to refactor a module safely by first pinning current behavior with characterization tests, then applying small reversible steps with verification after each. Delivers a diff, risk register, and rollback plan.

Claude Code Hook Writer: Auto-Run Lint, Typecheck or Tests After Edits

Produces a PostToolUse hook entry for settings.json, the script it calls and a concrete procedure to test that the check runs after file edits.

Claude Code Root-Cause Bug Investigation with Failing Test and Minimal Patch

Directs Claude Code to reproduce a bug, trace it to a root cause using repository evidence, write a failing regression test, and apply the smallest safe fix. Ends with a verified diff, risks, and next actions.

Codebase Tour for a Specific Task

Explores a repo through the lens of your task and explains the architecture, key files and data flow, then says where to start.

Coding Agent Task Brief with Guardrails, Test Plan, and Rollback Steps

Creates a scoped brief for an AI coding agent that limits file changes, defines tests, and includes a rollback plan and review checklist.

Custom Slash Command Builder for Repeated Claude Code Tasks

Turns a task you repeat into a custom slash command file with frontmatter, arguments, restricted allowed tools and a fixed output format.

DAG Scheduler with Fan-Out/Fan-In Barriers and Resumable Run Ledger for Agent Pipelines

Guides Claude Code to build or refactor a dependency-aware DAG scheduler for agent phases, with cycle validation, bounded parallelism, join policies, retries, and an append-only run ledger so interrupted runs resume without redoing finished nodes.