Skill v1.0.0
currentAutomated scan100/100version: "1.0.0" name: coding-agent description: >- Orchestrate Claude Code (or other coding agents) as background processes for non-interactive work. Use for batch PR reviews, parallel issue fixing with git worktrees, or any multi-agent coding task. Prefer background mode over interactive sessions for programmatic control. metadata: version: "0.1.0" attribution: "adapted from steipete/agent-skills (coding-agent)"
Coding Agent (background-first)
Use bash background mode for non-interactive coding work. For interactive sessions, use tmux.
Core pattern: workdir + background
# Create isolated workspaceSCRATCH=$(mktemp -d)# Launch agent in scoped directorybash workdir:$SCRATCH background:true command:"claude \"Your task\""# Returns sessionId# Monitorprocess action:log sessionId:XXXprocess action:poll sessionId:XXX# Send input if agent asks a questionprocess action:write sessionId:XXX data:"y"# Kill if neededprocess action:kill sessionId:XXX
Why `workdir` matters: agent starts in a focused directory and doesn't read unrelated files. Scope the working directory to only what the task needs.
Claude Code
bash workdir:~/project background:true command:"claude \"Your task\""
Non-interactive flag (--print / -p) for one-shot output:
bash workdir:~/project background:true command:"claude -p \"Summarize src/\""
Parallel PR reviews with git worktrees
For reviewing multiple PRs in parallel without branch conflicts:
# Fetch all PR refsgit fetch origin '+refs/pull/*/head:refs/remotes/origin/pr/*'# One agent per PR — no checkout conflictsbash workdir:~/project background:true command:"claude \"Review PR #86. git diff origin/main...origin/pr/86\""bash workdir:~/project background:true command:"claude \"Review PR #87. git diff origin/main...origin/pr/87\""# Monitor allprocess action:list# Post resultsprocess action:log sessionId:XXXgh pr comment <PR#> --body "<review content>"
Never checkout branches for parallel reviews — git diff the refs directly so agents don't conflict.
Parallel issue fixing with git worktrees + tmux
For fixing multiple issues in parallel with full isolation:
# 1. Clone to temp locationcd /tmp && git clone git@github.com:user/repo.git repo-worktreescd repo-worktrees# 2. One worktree per issuegit worktree add -b fix/issue-78 /tmp/issue-78 maingit worktree add -b fix/issue-99 /tmp/issue-99 main# 3. tmux sessionsSOCKET="${TMPDIR:-/tmp}/fixes.sock"tmux -S "$SOCKET" new-session -d -s fix-78tmux -S "$SOCKET" new-session -d -s fix-99# 4. Launch agent in eachtmux -S "$SOCKET" send-keys -t fix-78 "cd /tmp/issue-78 && claude 'Fix issue #78: <description>. Commit and push.'" Entertmux -S "$SOCKET" send-keys -t fix-99 "cd /tmp/issue-99 && claude 'Fix issue #99: <description>. Commit and push.'" Enter# 5. Monitortmux -S "$SOCKET" capture-pane -p -t fix-78 -S -30# 6. Check done (prompt returned)tmux -S "$SOCKET" capture-pane -p -t fix-78 -S -3 | grep -q "❯" && echo "Done!"# 7. Create PRscd /tmp/issue-78 && git push -u origin fix/issue-78gh pr create --repo user/repo --head fix/issue-78 --title "fix: ..." --body "..."# 8. Cleanuptmux -S "$SOCKET" kill-servergit worktree remove /tmp/issue-78git worktree remove /tmp/issue-99
Why worktrees over branches: each agent works in isolated branch, no conflicts. Scales to 5+ parallel fixes.
Why tmux over bash background for interactive agents: tmux provides a TTY for agents that need interactive output. Use bash background for one-shot tasks, tmux for long-running sessions.
Rules
- Respect tool choice — if user asks for a specific agent, use it
- Be patient — don't kill sessions because they're slow
- Monitor with `process:log` — check progress without interfering
- Parallel is fine — run many agents at once for batch work
- Never review PRs in the live project directory — clone to
/tmpor use
git worktree; checking out branches in a running project can break it