gbasin

Agent Fanout — Git skill for Claude Code

Git community

Claude Code skill: delegate implementation to parallel headless agent-CLI subagents (codex, omp+Gemini Flash) in persistent git worktrees — orchestrated, reviewed, merged, visually verified.

How to install Agent Fanout

This entry records only its repository, not the path inside it, so there is no exact command to give. Open gbasin/agent-fanout and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Agent Fanout does

Claude Code skill: delegate implementation to parallel headless agent-CLI subagents (codex, omp+Gemini Flash) in persistent git worktrees — orchestrated, reviewed, merged, visually verified.

Alternatives in Git

  • Clean Worktrees (Automatic) — Automatically remove all worktrees for branches merged into master 25.5k ★
  • Worktree Parallel Init — Create multiple git worktrees for parallel development: $ARGUMENTS 23.4k ★
  • Openclaude — Open Claude Is Open-source coding-agent CLI for OpenAI, Gemini, DeepSeek, Ollama, Codex, GitHub Models, and 20 22.5k ★

README

agent-fanout

Delegate implementation work to parallel headless agent CLIs in persistent Git worktrees. The orchestrating agent plans the phases, reviews every diff, merges, and owns final verification.

Install

npx skills add gbasin/agent-fanout --all -g

Durable controller

All lane lifecycle operations go through `scripts/agent-fanout`:

AF=/absolute/path/to/agent-fanout/scripts/agent-fanout

$AF init --repo /path/to/repo
$AF add-lane --run  --phase api
$AF start --run  --phase api --brief /path/to/api-brief.md --runner codex
$AF status --run 
$AF wait --run  --phase api --timeout 60
$AF collect --run  --phase api

The controller owns the process backend, per-run isolation, worktree creation, durable state, process-group cancellation, and cleanup. Orchestrators work with semantic states—`created`, `dispatching`, `running`, `succeeded`, `failed`, `cancelled`, and `interrupted`—rather than tmux sessions or PIDs. `debug` and `attach` exist only as maintainer/human escape hatches.

This avoids relying on a host harness's background-task lifetime. Starting a lane is a short foreground dispatch; after that, the controller-owned supervisor survives the orchestrator process and records terminal state on disk.

Isolation and concurrency

  • Every run has a globally unique ID, its own integration worktree, and its own supervisor server.
  • Every lane has a distinct branch, worktree, state directory, and process group.
  • Short shared Git mutations are serialized with a per-repository lock.
  • Cancellation validates recorded process identity before targeting the lane's process group.
  • Cleanup is run-scoped and refuses live lanes unless explicitly forced.

Separate orchestrators can therefore fan out in the same repository—or use the same phase names—without sharing supervisor namespaces. Heavy commands can share per-user machine-wide slots through `scripts/resource-run`. `scripts/validate-run` reco