/code-practices:explore-plan-codefrom code-practices
Structured workflow for non-trivial tasks. Read files first, create detailed plan, get approval, then implement. Prevents premature coding.
Ships in code-practices. Installing the plugin adds it to Claude Code.
Use when starting any non-trivial implementation task. This workflow prevents premature coding and significantly improves outcomes for complex problems.
From Anthropic's Claude Code best practices: "Research and planning before implementation dramatically outperforms jumping to code."
Jumping straight to writing code without understanding:
Read relevant files first without writing any code.
Read the authentication module and understand how sessions are currently handled.
Don't write any code yet.
Key activities:
Request a detailed plan. Use "think" to trigger extended reasoning.
Think through how we should implement the new caching layer.
Consider:
- What components need to change
- What order to make changes
- What could go wrong
- How to test each part
Write out a detailed plan before any implementation.
The plan should include:
Review the plan. Ask questions. Identify risks.
Don't proceed until you're confident the plan is sound.
Questions to ask:
Now implement, following the approved plan.
Implement the plan we discussed. Start with [first file] and work through the list.
Benefits of coding after planning:
Review changes, write clear commit message, verify tests pass.
## Task: [Description]
### Phase 1: Explore
Please read and understand these files before doing anything else:
- [file1]
- [file2]
- [relevant directory]
Summarize how [relevant system] currently works.
### Phase 2: Plan
Think through the implementation approach. Write a detailed plan including:
- Files to modify
- Order of changes
- Testing approach
- Potential risks
### Phase 3: Wait for Approval
Stop after the plan. I'll review before you implement.
| Task Complexity | Explore | Plan | Approve | Code |
|---|---|---|---|---|
| Trivial fix | Skip | Skip | Skip | Do |
| Simple feature | Brief | Brief | Quick | Do |
| Complex feature | Thorough | Detailed | Careful | Do |
| Architecture change | Deep | Comprehensive | Multiple reviews | Do |
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
13 commands in this plugin
/cleanupSystematic code cleanup after completing features. Use after refactoring or periodically to remove dead code, console statements, TODOs, and tech debt./code-reviewReview code like a skeptical senior engineer. Use when reviewing PRs, after generating significant code, or before merging changes./context-managementManage Claude Code sessions effectively. Use during long sessions, multi-step tasks, or when responses start degrading. Covers /clear, checklists, and subagents./goal-drivenDefine success criteria instead of step-by-step instructions. Enables autonomous LLM iteration toward testable goals./headless-automationRun Claude Code in CI/CD pipelines, pre-commit hooks, and batch processing. Covers -p flag, fan-out migrations, and pipeline patterns./multi-claudeRun parallel Claude instances for writer+reviewer patterns, git worktrees, and specialist agents. Use for independent verification and parallel progress.npx claudepluginhub rahulsub/code-practices-plugin --plugin code-practicesOther plugins' commands for the same job