orchestrating-parallel-agents
npx machina-cli add skill aiskillstore/marketplace/orchestrating-parallel-agents --openclawOrchestrating Parallel Agents
Spawn multiple Claude agents to work on related issues concurrently using git worktrees.
Philosophy
- Issues ARE the prompts - Write issues with enough context for autonomous work
- Maximize parallelism - Group independent work into waves
- Fail fast - Complete git/PR manually if agents can't
- Trust but verify - Review diffs, resolve conflicts manually
Workflow Checklist
Copy and track progress:
Parallel Agent Orchestration:
- [ ] 1. Break feature into issues (1-3 files each)
- [ ] 2. Organize into waves (independent → dependent)
- [ ] 3. Pre-approve git permissions in settings.local.json
- [ ] 4. Spawn wave with --print flag
- [ ] 5. Monitor progress
- [ ] 6. Complete stragglers manually
- [ ] 7. Merge PRs (rebase between same-file conflicts)
- [ ] 8. Cleanup worktrees
Issue Template
Each issue should be completable in isolation:
## Problem
What's broken or missing.
## Solution
High-level approach.
## Files to Modify
- `path/to/file` - what changes
## Implementation
Code snippets or pseudocode.
## Acceptance Criteria
- [ ] Testable outcomes
Key: Include file paths and code examples. Agents work best with concrete starting points.
Wave Organization
Wave 1: Independent changes (no shared files)
Wave 2: Changes that may touch same files (expect conflicts)
Wave 3: Integration/testing (depends on all above)
Rule: Same-file issues go in different waves OR same agent.
Pre-approve Permissions
Add to .claude/settings.local.json for non-interactive --print mode:
"Bash(git -C /absolute/path/to/worktree add:*)",
"Bash(git -C /absolute/path/to/worktree commit:*)",
"Bash(git -C /absolute/path/to/worktree push:*)"
Spawn Agents
for issue in 101 102 103; do
(claude --print "/worktree-issue $issue" > "issue-${issue}.log" 2>&1) &
done
Monitor
ps aux | grep "claude.*worktree" | wc -l # Running agents
git worktree list # Worktrees created
tail -f issue-*.log # Live logs
Complete Stragglers
If agent finishes code but fails on git:
git -C <worktree> add -A
git -C <worktree> commit -m "feat: description"
git -C <worktree> push -u origin <branch>
gh pr create --head <branch> --title "..." --body "Closes #N"
Merge with Conflicts
gh pr merge N --squash --delete-branch
If conflicts after prior merges:
cd <worktree> && git fetch origin main && git rebase origin/main
# resolve conflicts
git push --force-with-lease
Cleanup
git worktree remove <path>
git branch -D <branch>
git worktree prune
Quick Reference
| Tip | Why |
|---|---|
| 1-3 files per issue | Higher success rate |
| Include "Files to Modify" | Agents find code faster |
| Backend-first waves | Fewer frontend conflicts |
| Merge same-file PRs sequentially | Rebase between each |
| Problem | Solution |
|---|---|
| Agent stuck on permissions | Complete git manually |
| Merge conflict | Rebase, resolve, force-push |
| Agent went off-scope | Reject PR, clarify issue |
| Too many conflicts | Smaller waves, sequential merge |
Source
git clone https://github.com/aiskillstore/marketplace/blob/main/skills/4eyedengineer/orchestrating-parallel-agents/SKILL.mdView on GitHub Overview
Orchestrating Parallel Agents lets you spawn multiple Claude agents to work on related GitHub issues at the same time using git worktrees. It emphasizes breaking large features into smaller, context-rich issues, organizing work into waves, and validating progress with live logs and a --print workflow. This approach speeds delivery while keeping changes auditable and reviewable.
How This Skill Works
Uses git worktrees to run several Claude agents in parallel on related issues. Each issue is prepared with context and grouped into waves (independent first, then dependent). Permissions are pre-approved in settings.local.json for non-interactive --print mode; agents are spawned per issue, and progress is monitored via system processes, git worktree status, and live logs; conflicts and stragglers are resolved manually, with cleanup of worktrees after completion.
When to Use It
- Breaking a large feature into smaller, related GitHub issues that can be tackled in parallel
- Running parallel agents in non-interactive mode using the --print flag to preview outputs
- Managing wave-based execution to minimize conflicts and coordinate dependencies
- Coordinating changes that touch the same files across multiple issues
- Planning permissions in advance with .claude/settings.local.json for smooth runs
Quick Start
- Step 1: Break feature into 1–3 file-per-issue tasks and organize into waves
- Step 2: Pre-approve permissions in settings.local.json and spawn agents with claude --print
- Step 3: Monitor progress (ps, git worktree list, tail issue-*.log) and finalize changes
Best Practices
- Break features into 1–3 files per issue to keep tasks focused
- Organize issues into waves: independent tasks first, then dependent ones
- Pre-approve git permissions in settings.local.json for non-interactive runs
- Spawn waves displaying --print output to surface diffs without committing
- Monitor progress actively (ps, git worktree list, issue-*.log) and handle stragglers manually
Example Use Cases
- Split a large feature into three issues (e.g., 101-103) and assign to separate worktrees
- Wave 1: independent changes that touch different files; Wave 2: overlapping changes; Wave 3: integration/testing
- Run claude with --print to preview changes before pushing
- Resolve merge conflicts by rebasing PRs and merging sequentially
- Clean up all worktrees and prune after PRs are merged