delegate

Launches background coding agents in isolated git worktrees via herdr with verified permission flags.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Delegating ad-hoc work to background coding agents is error-prone: agents launched without permission flags stall on approval prompts, prompts get sent into dialogs, and worktrees leak after tasks finish. This Skill standardizes the whole dispatch lifecycle through one bundled script that launches, verifies, kicks off, and reaps agents consistently. ## Core Features & Use Cases - Role-based dispatch: Launch a worker in a fresh git worktree on its own branch for code changes, or a planner on the primary checkout's main branch for analysis and planning docs. - Verified launch: The bundled herdr-worker.sh script checks herdr version and integration, confirms the agent's argv carries bypass-permission flags, validates the working directory and role, and confirms kickoff before returning a single JSON result. - Structured failure handling: Every failure returns a machine-readable error code (worktree_exists, agent_not_ready, kickoff_failed, not_on_main) with guidance on how to recover, plus lifecycle commands for follow-up prompts, verification, and safe teardown that refuses to destroy uncommitted work. - Use Case: You want a typo fixed or a spike investigated without leaving your current session — delegate the prompt, get back the agent's name, branch, and pane, and check on it later or reap it when done. ## Quick Start Ask the agent to delegate a specific task, for example: delegate fixing the broken links in the README to a background worker.

Frequently Asked Questions about delegate

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

FAQPage Schema
How do I run a coding agent in the background on a task?▼

Use the bundled herdr-worker.sh script with the worker subcommand, passing a slug, the repo, and your prompt. It creates a git worktree on a task branch, launches the agent with bypass-permission flags, verifies the launch, and confirms the prompt kicked off.

What is the difference between a worker and a planner agent?▼

A worker runs in a fresh linked git worktree on its own branch and is used for anything that edits files, opening a PR when done. A planner runs in the primary checkout on main or master and is used for analysis, research, and writing planning docs.

Why does my background agent stall without doing anything?▼

Agents launched without permission flags start in interactive approval mode and block on their first tool call. Claude Code needs --dangerously-skip-permissions and Codex needs --dangerously-bypass-approvals-and-sandbox; a mis-launched agent cannot be repaired and must be reaped and relaunched.

Can I reuse a background agent for a second task?▼

No. There is no safe in-place reset: /clear is cooperative and can wipe a session mid-task, and permission mode is fixed at launch. The supported path is to reap the finished worker and spawn a fresh one for each task.

What happens if the agent hits a trust or update prompt at startup?▼

The launch returns an agent_not_ready error with a pane snapshot instead of sending input blindly. You read the pane, answer the dialog deliberately with send-keys one press at a time, then run the verify and prompt subcommands to continue.

When should I use delegate-task instead of delegate?▼

Use delegate-task when the work already has planning documents such as requirements, solution, or plan files. The delegate skill is for freeform prompts that need no task planning docs.