delegate-task

Dispatches planned tasks to background coding-agent workers in isolated git worktrees via herdr.

Updated Apr 17, 2026
One-click install
npx skills add https://github.com/mistakenot/skills --skill delegate-task-mistakenot
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: delegate-task
Source: https://github.com/mistakenot/skills/tree/main/plugins/planning-workflow/skills/delegate-task
Command: npx skills add https://github.com/mistakenot/skills --skill delegate-task-mistakenot

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? Executing a planned coding task ties up your current session for the duration of the work. This Skill hands a planned task off to a fresh background worker agent (Claude Code or Codex) running in its own git worktree, so your session stays free while the worker implements the task and opens a PR. ## Core Features & Use Cases - Scripted worker launch: A bundled herdr-worker.sh script creates the worktree, starts the agent with mandatory permission flags, verifies the process, sends /execute-task $ID, and returns one JSON result object. - Status lifecycle management: Advances the task status to executing in plan.html and confirms the task docs are on origin/main before dispatching, so the worker branches from the right state. - Structured failure handling: Maps error codes (worktree_exists, agent_not_ready, kickoff_failed, verify_failed) to concrete recovery actions, with reference docs for unblocking dialogs, verifying workers, and reading output. - Use Case: After planning task 042 with the planning workflow, say "delegate task 042" and a verified Claude Code worker starts in a worktree on branch task/042, receives /execute-task 042, and begins work while you continue in your session. ## Quick Start Delegate task 042 to a background worker by asking the agent to run the delegate-task skill for task ID 042.

Frequently Asked Questions about delegate-task

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delegate a planned task to a background coding agent?▼

Mark the task status as executing, push the task docs to origin/main, then run the bundled herdr-worker.sh script with the worker subcommand, the task ID as slug, and /execute-task $ID as the prompt. The script creates the worktree, launches the agent, and confirms kickoff.

What is herdr and why does task delegation require it?▼

herdr is a terminal multiplexer that manages coding-agent processes as named, addressable workers with status reporting. The skill requires herdr 0.8.2 or newer with the Claude Code or Codex integration installed, and the script refuses to run on older versions.

Why must background workers launch with permission bypass flags?▼

Claude Code and Codex default to interactive approval mode, so a worker without --dangerously-skip-permissions or --dangerously-bypass-approvals-and-sandbox stalls on its first tool call. Permission mode is fixed at launch, so a mis-launched worker must be reaped and respawned.

Can I run two workers on the same task branch?▼

No. The launch script refuses with a worktree_exists error if a worktree already exists on the task branch, because two workers on one task produce two PRs and a merge conflict. Report the existing worker instead of dispatching another.

What should I do when a delegated worker shows a blocked status?▼

A blocked worker is sitting at a dialog such as an approval prompt or question picker, and agent prompt is refused by design. Read the pane, then answer with herdr agent send-keys one press at a time, re-reading after each, and never send a bare enter or esc.

Can I reuse a finished worker for a second task?▼

No. Workers are ephemeral: one per task, reaped on completion. There is no safe in-place reset because /clear queues behind in-flight work and can wipe a session mid-task, so a clean worker is always a newly spawned one.