The 6 Commands
These commands eliminate the inefficient Q&A pattern where users ask one question at a time. Instead, they enable persistent goals, scheduled tasks, parallel work, and automatic diagnostics.
| Command | Purpose | Duration | Token Level |
|---|---|---|---|
/goal | Persistent goal across turns | Multi-round | Medium |
/loop | Scheduled recurring tasks | Per interval | Medium |
/batch | Parallel subagent work | 1-3 hours | Very High (1M+) |
/simplify | Auto code cleanup | Seconds-minutes | Low-Medium |
/doctor | Installation diagnostics | Seconds | Very Low |
/debug | Behavioral debugging | Minutes | Medium |
Command Details
/goal — Persistent Goals
Sets a continuing condition that Claude works toward across multiple turns. Survives session timeouts. Use for large refactoring, migrations, and test coverage goals.
/goal migrate all React components in src/ to TypeScript with 100% type coverage
/loop — Scheduled Tasks
Runs tasks on a schedule (e.g., every 5 minutes). Different from /goal — /goal is one-time completion, /loop is recurring.
/loop 5m check if the deploy finished /loop 30m run tests, analyze failures, and auto-fix
/batch — Parallel Subagents
Decomposes large changes into 5-30 independent units. Spawns subagents in isolated git worktrees, each implementing one unit and opening a PR.
/batch migrate src/ from Solid to React
/simplify — Code Cleanup
Four parallel review agents check: reuse of helpers, complexity, efficiency, and abstraction level. Automatically applies fixes.
/doctor — Diagnostics
Diagnoses installation and configuration issues. Output shows green checkmarks, yellow warnings, and red X marks. Press 'f' to auto-fix.
/debug — Behavioral Debugging
Enables session debug logs to trace Claude's reasoning. Use when Claude's answer is wrong but you can't see why.
Workflow Pattern
The sample project - Python 2→Python 3 migration using these commands:
- /goal — Run main migration
- /debug — Find failure root cause
- /loop — Iterate tests until passing
- /simplify — Cleanup code
- /batch — Parallel test coverage improvement
- /doctor — Verify environment
Why Use Commands?
Commands transform Claude Code from a simple chat interface into a powerful task execution engine. Instead of repeatedly asking questions or managing state yourself, you can delegate these responsibilities to built-in commands:
- Efficiency — Eliminate repetitive Q&A patterns
- Persistence — Goals survive session timeouts
- Automation — Schedule recurring tasks without manual triggers
- Scale — Parallelize work across multiple subagents
- Reliability — Diagnose and fix issues automatically