Subtask

Invia worker AI paralleli in worktree git isolati tramite la CLI subtask

di zippoxer · zippoxer/subtask

Richiede configurazione ★ 7.6/10

Subtask — Invia worker AI paralleli in worktree git isolati tramite la CLI subtask

Cosa fa

Insegna a Claude Code a orchestrare il lavoro parallelo tramite la CLI Go `subtask`: ogni task ottiene il proprio worktree e branch git, più un record del task con titolo, branch base e una cronologia degli eventi. Copre il ciclo completo di bozza, invio a un worker, revisione del diff, avanzamento delle fasi (doing a review a ready) e squash-merge nel branch base. Si attiva quando l'utente chiede di delegare lavoro a worker o subagenti, eseguire diversi task in parallelo o menziona Subtask per nome.

Rapporto di test

Costruita la CLI Go da sorgente (go1.26.5) e eseguito tutto sotto una HOME temporanea; i veri ~/.claude/skills e ~/.subtask sono stati verificati intatti. Tutti i 13 comandi elencati nella tabella SKILL.md (ask, draft, send, stage, list, show, diff, merge, close, workspace, interrupt, log, trace) esistono nel binario, e `subtask install --no-prompt --scope user --harness claude` ha scritto SKILL.md in ~/.claude/skills/subtask/SKILL.md. Artefatto baseline (/tmp/st-baseline): la correzione di due bug Python indipendenti a modo mio ha dato 2 branch sequenziali e `git worktree list` che mostrava 1 voce, senza metadati del task. Artefatto skill (/tmp/st-skill2): seguendo il corpo verbatim ha dato `git worktree list` con 3 voci (main + fix/duration-hours + feat/retry-validation live contemporaneamente in percorsi distinti), una cartella .subtask/tasks/<task>/ per task contenente TASK.md (frontmatter titolo/branch base), WORKFLOW.yaml e history.jsonl, una tabella di stato `subtask list` che mostrava entrambi in volo con +1 -1 e +7 -3, e `subtask merge` che univa ciascuno su main ("Merged ... Workspace freed") per un main pulito a 2 commit. L'unico passaggio che non sono riuscito a eseguire è il worker AI effettivo: `subtask send` ha fornito il worktree e spedito, ma l'harness è morto in 3.6s e `subtask trace` ha mostrato che il prompt del worker ha risposto con "Invalid API key - Please run /login" perché la HOME temporanea non ha credenziali, quindi ho commesso manualmente l'output del worker per testare la revisione/unione. Ho anche incontrato un blocco non documentato: in un repository dove /.subtask/ non era gitignored prima della bozza, `subtask merge` ha rifiutato con "has uncommitted changes" (ensureGitignore è chiamato solo da `subtask config`, non `draft`). Scansione di sicurezza pulita: SKILL.md non ha URL, script, base64 o testo di iniezione, e gli hook del plugin opzionali si limitano a ripetere i promemoria "consider loading the subtask skill".

Testato il: 2026-07-21 · Claude Code 2.x (agent harness)

Installazione

git clone --depth 1 https://github.com/zippoxer/subtask.git /tmp/subtask-src
mkdir -p ~/.claude/skills/subtask
cp /tmp/subtask-src/pkg/install/SKILL.md ~/.claude/skills/subtask/SKILL.md
# REQUIRED: the skill is a thin wrapper and does nothing without the `subtask` Go binary.
#   brew install zippoxer/tap/subtask
#   # or: go install github.com/zippoxer/subtask/cmd/subtask@latest
#   # or: curl -fsSL https://subtask.dev/install.sh | bash   (upstream install script; audit before running)
# Then configure the worker harness (writes the same SKILL.md itself, so the copy above is optional):
#   subtask install --no-prompt --scope user --harness claude   # or --harness codex / opencode
#   # plain `subtask install` is interactive and fails without a TTY ("could not open a new TTY")
# REQUIRED: the chosen harness CLI (claude / codex / opencode) must be installed and authenticated,
#   otherwise `subtask send` fails with "claude failed: exit status 1".
# Recommended: commit `/.subtask/` to .gitignore BEFORE drafting tasks, or `subtask merge` aborts
#   with "has uncommitted changes" because .subtask/ is untracked inside each worktree.
# Optional plugin (adds hooks that remind Claude to load the skill):
#   /plugin marketplace add zippoxer/subtask  &&  /plugin install subtask@subtask

Comandi e prompt di esempio

  • /subtaskInvia worker AI paralleli in worktree git isolati tramite la CLI subtask

Gli skill si attivano con richieste in linguaggio naturale, senza comandi da ricordare. Dopo l'installazione, prompt come questi lo attivano (in inglese):

  • Delegate this task to a subtask worker
  • Run these three tasks in parallel workspaces
  • Create a new subtask for this feature