/code-practices:multi-claudefrom code-practices
Run parallel Claude instances for writer+reviewer patterns, git worktrees, and specialist agents. Use for independent verification and parallel progress.
Ships in code-practices. Installing the plugin adds it to Claude Code.
Use when you need parallel progress, independent verification, or separation of concerns between different aspects of a task.
From Anthropic's Claude Code best practices: "Run separate Claude instances in parallel—one writing code, another reviewing. Use git worktrees to enable simultaneous independent tasks."
Run two Claude instances with different roles:
Terminal 1 - Writer:
cd ~/project
claude
# "Implement the new caching layer"
Terminal 2 - Reviewer:
cd ~/project
claude
# "Review the changes being made to src/cache/.
# Look for bugs, edge cases, and improvements."
Benefits:
Create multiple working directories for the same repo:
# Create worktrees for parallel work
git worktree add ../project-feature-a feature-a
git worktree add ../project-feature-b feature-b
git worktree add ../project-bugfix bugfix-123
Now run separate Claude instances:
Terminal 1:
cd ../project-feature-a
claude
# "Implement feature A"
Terminal 2:
cd ../project-feature-b
claude
# "Implement feature B"
Terminal 3:
cd ../project-bugfix
claude
# "Fix bug #123"
Benefits:
Different Claude instances for different expertise:
Terminal 1 - Backend:
claude
# "Implement the API endpoints for user management"
Terminal 2 - Frontend:
claude
# "Implement the React components for user management UI"
Terminal 3 - Tests:
claude
# "Write integration tests for the user management feature"
One instance explores, another implements:
Terminal 1 - Research:
claude
# "Research how authentication is handled in this codebase.
# Document the patterns, key files, and flows."
Terminal 2 - Implementation (after research):
claude
# "Using the auth patterns documented in RESEARCH.md,
# implement OAuth2 login for the mobile app"
# List existing worktrees
git worktree list
# Add a new worktree
git worktree add <path> <branch>
# Remove a worktree when done
git worktree remove <path>
# Prune stale worktree info
git worktree prune
Use terminal multiplexer (tmux/screen) or IDE terminals:
# tmux example
tmux new-session -s claude-writer
# Ctrl-b c to create new window
# Ctrl-b n/p to switch windows
# Ctrl-b d to detach
Create a shared document for coordination:
# COORDINATION.md
## Instance Assignments
- Terminal 1: API implementation
- Terminal 2: Frontend components
- Terminal 3: Test coverage
## Shared Decisions
- Using REST not GraphQL
- Auth tokens in headers
- Error format: { error: string, code: number }
## Interface Contracts
- POST /api/users returns { id, email, createdAt }
- User component expects props: { user: User, onUpdate: fn }
## Blockers
- [ ] Need DB schema before API work
- [ ] Need API spec before frontend work
| Scenario | Pattern |
|---|---|
| Large feature with distinct parts | Specialist agents |
| Need independent code review | Writer + Reviewer |
| Multiple unrelated tasks | Git worktrees |
| Complex research + implementation | Research + Implementation |
| Time-sensitive parallel work | Multiple worktrees |
Don't:
Do:
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
npx claudepluginhub rahulsub/code-practices-plugin --plugin code-practices13 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.Other plugins' commands for the same job