Home
cd ../playbooks
Academic ResearchBeginner

Plan-First Workflow

Get Claude to plan before executing complex tasks. Prevents wasted effort by getting user approval on approach before writing code or making changes.

5 minutes
By communitySource
#workflow#planning#approval#context-preservation#best-practices

You asked Claude to refactor your auth module and it rewrote 15 files before you realized it chose the wrong approach. Now you're reverting everything. The fix is simple: make Claude explain its plan and get your approval before it touches a single line of code.

Who it's for: developers who've had Claude make unwanted changes to their codebase, teams using Claude Code for complex multi-file tasks, tech leads wanting more control over Claude's approach before execution, engineers working on critical codebases where mistakes are costly, anyone new to Claude Code who wants to use it more effectively

Example

"Set up a plan-first workflow for my project" → CLAUDE.md configuration that makes Claude present its approach before executing, with checkpoints for complex tasks, rollback-friendly commit strategy, and approval gates for destructive operations

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

# Plan-First Workflow

## Core Protocol

For any non-trivial task:

1. **PLAN PHASE** (before any implementation)
   - Analyze the request and identify ambiguities
   - Propose a numbered plan with specific steps
   - List files that will be created/modified
   - Identify potential risks or decision points
   - Wait for explicit approval before proceeding

2. **EXECUTE PHASE** (after approval)
   - Implement the approved plan step by step
   - Report progress as you complete each step
   - Pause and ask if you encounter unexpected issues
   - Never deviate from approved plan without checking

## What Counts as Non-Trivial

ALWAYS plan first for:
- Any task requiring 3+ file changes
- New feature implementation
- Refactoring existing code
- Architectural decisions
- Anything with multiple valid approaches

SKIP planning for:
- Single-line fixes (typos, obvious bugs)
- Direct questions about code
- Reading/exploring files
- Tasks with explicit step-by-step instructions already provided

## Plan Format

When planning, use this structure:

### Plan for: [Task Name]

**Understanding**: [1-2 sentences summarizing what you'll do]

**Approach**:
1. [Step 1]
2. [Step 2]
3. [Step 3]
...

**Files to modify**:
- `path/to/file1.ts` — [what changes]
- `path/to/file2.ts` — [what changes]

**Questions/Decisions needed**: [any ambiguities to resolve]

**Ready to proceed?** [Wait for approval]

## Context Preservation

Before starting any plan:
- Read relevant existing code first
- Note patterns and conventions already in use
- Reference existing implementations when proposing approach

After plan approval:
- Execute without re-reading files unnecessarily
- Maintain context from planning phase
- Reference plan step numbers as you work

## Approval Keywords

- "Approved" / "LGTM" / "Go ahead" → Execute the plan
- "With changes: [...]" → Update plan, then execute
- "Hold" / "Wait" → Pause, don't execute
- "Just do it" → Execute without final approval pause (still run quality checks)

Get new playbooks like this one

One email a week with new Claude Code workflows. Free, like everything here.

No spam. Unsubscribe anytime.

README.md

What This Does

This playbook establishes a plan-first workflow where Claude proposes a plan before executing any non-trivial task. You review and approve the plan, then Claude executes autonomously. This prevents the common failure of Claude diving into implementation without understanding requirements, only to redo work when the approach was wrong.

Prerequisites

  • Claude Code installed and configured
  • A project directory where you want this workflow

Step-by-Step Setup

Step 1: Add to your project

cd ~/your-project
# Add the template above to your CLAUDE.md file

Step 2: Test the workflow

Start Claude Code and give it a non-trivial task:

Add user authentication to the app

Claude should respond with a plan, not immediately start coding.

Step 3: Practice the approval flow

Try these responses:

  • "Approved, proceed"
  • "Approved with changes: use JWT instead of sessions"
  • "Hold - let me think about this"
  • "Just do it" (for trusted tasks)

Example Usage

User prompt:

"Add a dark mode toggle to the settings page"

Claude's plan response:

Plan for: Dark Mode Toggle

Understanding: Add a toggle in settings that switches between light and dark themes, persisting the preference.

Approach:

  1. Create a theme context/provider for state management
  2. Add CSS variables for light/dark color schemes
  3. Create the toggle component in Settings
  4. Wire up localStorage persistence
  5. Update App wrapper with ThemeProvider

Files to modify:

  • src/contexts/ThemeContext.tsx — new file, theme state
  • src/styles/theme.css — color variables
  • src/pages/Settings.tsx — add toggle UI
  • src/App.tsx — wrap with provider

Questions: Should the toggle also respect system preference as default?

Ready to proceed?

User approves:

"Yes, respect system preference. Approved."

Claude executes the plan step by step, reporting progress.

Tips

  • Be specific in approvals: "Approved" is fine, but "Approved, and use the existing Button component for the toggle" gives better results.
  • Plans aren't overhead: The 30 seconds spent reviewing a plan saves the 10 minutes of redoing wrong work.
  • "Just do it" mode: For tasks you trust completely, say "just do it" and Claude will execute without the approval pause (but still maintains quality).
  • Context compounds: After a few plan-approve-execute cycles, Claude understands your preferences and makes better plans.

Troubleshooting

Problem: Claude skips planning and starts coding immediately

Solution: Add explicit instruction at the start of your request: "Plan this first, don't start implementation yet."

Problem: Plans are too detailed/too vague

Solution: Adjust the CLAUDE.md to specify your preferred level of detail. Add examples of good plans for your codebase.

Problem: Claude asks too many questions before planning

Solution: Add "Make reasonable assumptions for minor decisions, only ask about architectural choices" to the template.

$Related Playbooks

Academic Research

Proofread Review Agent

Deploy a specialized proofreading agent that focuses solely on grammar, spelling, punctuation, and clarity. Catches errors that general reviews miss by having laser focus on language.

5 minutes
Beginner
Academic Research

Scientific Manuscript Editor

Five focused editing passes for scientific manuscripts: verb tense conventions by section, topic-sentence structure, line-by-line grammar, substantive clarity editing, and a pre-submission compliance check.

10 minutes
Intermediate
Academic Research

Scientific Matchms

Spectral similarity and compound identification for metabolomics. Use for comparing mass spectra, computing similarity scores (cosine, modified cosine), and identifying unknown compounds from spectral libraries. Best for metabolite identification,...

10 minutes
Intermediate
Academic Research

Scientific Medchem

Medicinal chemistry filters. Apply drug-likeness rules (Lipinski, Veber), PAINS filters, structural alerts, complexity metrics, for compound prioritization and library filtering.

10 minutes
Intermediate
Academic Research

Scientific Metabolomics Workbench Database

Access NIH Metabolomics Workbench via REST API (4,200+ studies). Query metabolites, RefMet nomenclature, MS/NMR data, m/z searches, study metadata, for metabolomics and biomarker discovery.

5 minutes
Beginner
Academic Research

Scientific Molecular Dynamics

Run and analyze molecular dynamics simulations with OpenMM and MDAnalysis. Set up protein/small molecule systems, define force fields, run energy minimization and production MD, analyze trajectories (RMSD, RMSF, contact maps, free energy surfaces)...

15 minutes
Advanced
Academic Research

Scientific Molfeat

Molecular featurization for ML (100+ featurizers). ECFP, MACCS, descriptors, pretrained models (ChemBERTa), convert SMILES to features, for QSAR and molecular ML.

10 minutes
Intermediate
Academic Research

Scientific Monarch Database

Query the Monarch Initiative knowledge graph for disease-gene-phenotype associations across species. Integrates OMIM, ORPHANET, HPO, ClinVar, and model organism databases. Use for rare disease gene discovery, phenotype-to-gene mapping, cross-speci...

5 minutes
Beginner
Academic Research

Scientific Neurokit2

Comprehensive biosignal processing toolkit for analyzing physiological data including ECG, EEG, EDA, RSP, PPG, EMG, and EOG signals. Use this skill when processing cardiovascular signals, brain activity, electrodermal responses, respiratory patter...

10 minutes
Intermediate
Academic Research

Scientific Neuropixels Analysis

Neuropixels neural recording analysis. Load SpikeGLX/OpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen/IBL curation, AI-assisted visual analysis, for Neuropixels 1.0/2.0 extracellular electrophysiology....

15 minutes
Advanced
Academic Research

Scientific Omero Integration

Microscopy data management platform. Access images via Python, retrieve datasets, analyze pixels, manage ROIs/annotations, batch processing, for high-content screening and microscopy workflows.

10 minutes
Intermediate
Academic Research

Scientific Openalex Database

Query and analyze scholarly literature using the OpenAlex database. This skill should be used when searching for academic papers, analyzing research trends, finding works by authors or institutions, tracking citations, discovering open access publ...

5 minutes
Beginner

Browse all Academic Research playbooks →