Skip to content
Back to skills

Delegate Work

ASecurity

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.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 24, 2026
ai-agentspythongit

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 24, 2026

npx -y skills add IBM/TKSfw --skill delegate-work --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Delegate Work?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Delegate Work
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ibm-delegate-work/badge)](https://www.skillsdirectory.com/skills/ibm-delegate-work)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
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 |

Files in this skill

  • SKILL.md2.2 KB
  • assets/workarea.py14.5 KB
  • references/isolation.md3.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.