Mechanics for delegating work to subagents once the decision to delegate has been made (AGENTS.md § Subagents holds the decision rules): isolation (git worktree or agent work area), ownership matrix, handoff BEGIN/END logging, cleanup and pruning of finished worktrees/work areas, and how to change models via .agents/config.toml. Load when parallelising subagents, when a subagent needs an isolated place to write, when cleaning up after a phase, or when the Stop hook reports stale work areas.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Delegate Work?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/ibm-delegate-work)
---
name: delegate-work
description: >
Mechanics for delegating work to subagents once the decision to delegate has been made (AGENTS.md
§ Subagents holds the decision rules): isolation (git worktree or agent work area), ownership matrix,
handoff BEGIN/END logging, cleanup and pruning of finished worktrees/work areas, and how to change
models via .agents/config.toml. Load when parallelising subagents, when a subagent needs an isolated
place to write, when cleaning up after a phase, or when the Stop hook reports stale work areas.
---
# Delegate work — isolation, handoff, cleanup
The rules that decide *whether* and *how many* subagents run stay in `AGENTS.md`; two of them are
enforced by the routing hook (no nested spawns; at most `max_parallel_agents` concurrent). This skill
owns what happens after the decision. Full text: `references/isolation.md`.
## Procedure
1. Ownership matrix: list each agent with the paths it owns; overlapping paths → chain sequentially.
2. Isolation per agent:
`python3 .agents/skills/delegate-work/assets/workarea.py create <agent> <task-id> --session <token> [--worktree]`
(worktree when git is available and parallel writes are needed; otherwise a work area under
`.agents/workarea/<agent>/<session>.<task-id>.<n>/`). The token is shown at session start; the
instance `n` is allocated for you. The command prints the path to hand to the agent.
3. Log the handoff BEGIN (`yaml-log-entry`), spawn, log END + event on return.
4. Clean up: `… prune <agent> <task-id>` after merge/validation; `… list` and `… prune --stale`
(COMPLETED tasks / merged branches) at phase end. Never leave a worktree with unmerged work
unlogged — `prune` refuses unless `--force`.
## Tools
| Asset | Use |
|---|---|
| `assets/workarea.py create <agent> <task-id> --session <token> [--worktree] [--instance N]` | create the isolated place (new instance each call; `--instance` reuses) |
| `assets/workarea.py list [--json]` | worktrees and work areas with staleness (task COMPLETED / branch merged) |
| `assets/workarea.py prune <agent> <task-id> [--session T] [--instance N] [--force]` · `prune --stale` · `prune --session T` | remove |
| `references/isolation.md` | the moved method text |