Agent skill

Sub-Agent Delegation

by codewhale-hq in codewhale-hq/Codewhale

Guides when and how to split multi-step coding, research or verification work into focused sub-agent runs while the parent keeps integration and final checks.

MITAuto-check passedAgent Workflows

Install Sub-Agent Delegation

skills CLI
$ npx skills add codewhale-hq/Codewhale --skill delegate -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install codewhale-hq/Codewhale delegate --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/codewhale-hq/Codewhale.git skills-src && mkdir -p .claude/skills && cp -r skills-src/crates/tui/assets/skills/delegate .claude/skills/delegate && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
delegate
GitHub stars
41k
Token cost
~790 tokens
SKILL.md length
276 words
Files
1
Skills in repo
63
Repo updated
First seen
Licence
MIT

At a glance

Guides when and how to split multi-step coding, research or verification work into focused sub-agent runs while the parent keeps integration and final checks.

  • Splitting a large refactor into parallel, focused sub-agent runs
  • SKILL.md covers Keep vs Delegate, Launch Focused Work, Evaluate and Verify and Prompt Shape
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • Running read-only exploration across a bounded set of files in the background

What it does

The parent agent keeps understanding the request, architecture, security, product and release-risk decisions, cross-module integration and the final review. Bounded read-only exploration, mechanical edits with clear file ownership, focused test or lint runs, boilerplate from a spec and independent checks can be handed off. Tiny one-step tasks, ambiguous product decisions, destructive operations without acceptance criteria and final verification are not delegated.

Children are launched through the agent tool, with independent ones started together so they run in parallel. The skill prefers a provider-neutral model_strength setting over hardcoded model ids, asks for a precise write boundary on code changes, and uses fork_context only when the child needs the conversation so far. Because sub-agent output is a self-report, the parent re-reads changed files, runs tests and inspects unexpected diffs. A good delegation prompt names the task, owned and off-limits files, output format and acceptance criteria.

When your agent uses it

  • Splitting a large refactor into parallel, focused sub-agent runs
  • Running read-only exploration across a bounded set of files in the background
  • Deciding whether a task is too small or too ambiguous to delegate

Example prompts

  • “Audit config handling across the TUI crate with a read-only sub-agent while you update the docs.”
  • “Delegate the mechanical rename in the docs folder, then verify the diff yourself.”
  • “Which parts of this migration should you keep and which should go to sub-agents?”

Requirements

  • An agent runtime whose agent tool can launch sub-agents

What it can do on your machine

Read from SKILL.md and the folder at commit fead51e. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Sub-Agent Delegation loads about 790 tokens when it runs. Until then it costs about 48 tokens; SKILL.md has 276 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~48
When it runs · the whole SKILL.md, loaded when a task matches
~790

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from codewhale-hq/Codewhale at commit fead51e, republished under its MIT licence (© codewhale-hq). 276 words, ~790 tokens.

Download SKILL.mdSave it as .claude/skills/delegate/SKILL.md (or your agent's skills folder).
name
delegate
description
Strategic delegation for multi-step coding, research, or verification work. Use when a task can be split into parent reasoning plus focused sub-agent execution through the agent tool.
metadata.short-description
Delegate focused work to sub-agents

Delegate

Use sub-agents when they can do focused work in parallel while the parent keeps architectural judgment, integration, and final verification.

Keep vs Delegate

Keep in the parent:

  • Understanding the user's actual request and constraints
  • Architecture, security, product, and release-risk decisions
  • Cross-module integration
  • Final review, test interpretation, and user-facing summary

Delegate to sub-agents:

  • Read-only exploration over a bounded file set
  • Mechanical edits with a clear file ownership boundary
  • Focused test or lint runs
  • Boilerplate generation from an explicit spec
  • Independent checks that can run while parent work continues

Do not delegate tiny one-step tasks, ambiguous product decisions, destructive operations without a clear acceptance criterion, or final verification.

Launch Focused Work

Use agent for a focused child run. Launch independent children together so they can run in parallel.

Prefer provider-neutral model_strength over hardcoded model ids. Children inherit the active model by default (model_strength: "same"), including type: "scout", so pass model_strength: "faster" explicitly to get the cheaper same-family sibling for read-only exploration:

json
{
  "name": "config_audit",
  "prompt": "Inspect crates/tui/src/config.rs and crates/tui/src/settings.rs for duplicate model-default logic. Return file/line findings only; do not edit files.",
  "type": "scout",
  "model_strength": "faster",
  "cwd": "."
}

For code changes, give the child a precise write boundary and tell it not to revert unrelated edits. Keep implementation children capable with model_strength: "same":

json
{
  "name": "docs_patch",
  "prompt": "Update only docs/configuration.md to document the new [statusline] keys. Match the surrounding style. Do not edit other files.",
  "type": "builder",
  "model_strength": "same",
  "cwd": "."
}

Use fork_context: true only when the child genuinely needs the current conversation prefix. Leave it omitted for fresh, narrower context.

Evaluate and Verify

Sub-agent outputs are self-reports. Re-check material claims before relying on them:

  • Read changed files directly.
  • Run the relevant tests locally.
  • Inspect unexpected diffs before committing.
  • Verify externally visible or destructive claims against source data.

Prompt Shape

A good delegation prompt includes:

  • The exact task
  • Files or modules owned by the child
  • Files or behavior the child must not touch
  • Expected output format
  • Acceptance criteria

Weak prompt:

text
Fix the settings bug.

Strong prompt:

text
Own only crates/tui/src/settings.rs and its tests. Preserve existing config key names. Add a regression test showing that provider-specific API key changes do not restart provider onboarding. Return the changed paths and test command output.

© codewhale-hq, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in crates/tui/assets/skills/delegate of codewhale-hq/Codewhale.

Open the folder on GitHubat commit fead51e

Compare with similar skills

Sub-Agent Delegation next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Sub-Agent Delegation compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Sub-Agent Delegation this skillcodewhale-hq/Codewhale41k—~790Automated safety check: PassMIT
Paseo Advisor Second Opiniongetpaseo/paseo20k1 repos~756Automated safety check: PassCustom licence
O2 Review Loopopenobserve/openobserve22k—~3.7kAutomated safety check: PassAGPL-3.0
Kimi Code DelegationCherryHQ/cherry-studio52k1 repos~504Automated safety check: PassAGPL-3.0
Harness Agent Team Designerrevfactory/harness9.1k—~4.5kAutomated safety check: PassApache-2.0
ClawTeam Multi-Agent Swarmwin4r/ClawTeam-OpenClaw1.5k1 repos~2.9kAutomated safety check: PassMIT

Similar skills

  • Launches one separate agent through Paseo to give a second opinion on the current task, with a self-contained briefing and no permission to edit files.

    20k GitHub starsUsed in 1 repo~756 tokens
    Agent WorkflowsAuto-check passed
  • O2 Review Loop

    openobserve/openobserve

    Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.

    22k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Kimi Code Delegation

    CherryHQ/cherry-studio

    Delegates one bounded repository task to Kimi Code in non-interactive prompt mode and reads back the final result from its JSON event stream.

    52k GitHub starsUsed in 1 repo~504 tokens
    Agent WorkflowsAuto-check passed
  • Harness Agent Team Designer

    revfactory/harness

    Designs a project-specific agent harness: defines specialist agents, writes the skills they follow, picks an execution mode and model for each, and keeps the setup maintained.

    9.1k GitHub stars~4.5k tokensUpdated 10 days ago
    Agent WorkflowsAuto-check passed
  • ClawTeam Multi-Agent Swarm

    win4r/ClawTeam-OpenClaw

    Launches a swarm of specialist Hermes agents in git-worktree-isolated tmux windows with a kanban board and file-based inboxes, using built-in templates like hedge-fund and code-review.

    1.5k GitHub starsUsed in 1 repo~2.9k tokens
    Agent WorkflowsAuto-check passed
  • Clawteam

    win4r/ClawTeam-OpenClaw

    Multi-agent swarm orchestration. An agent skill from win4r/ClawTeam-OpenClaw.

    1.5k GitHub stars~3.1k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed

More from codewhale-hq/Codewhale

All 63 skills in this repo
  • Codewhale Dogfood Install

    codewhale-hq/Codewhale

    Proves a Codewhale change in the real product: a stamped release build, an atomic local install, fresh-shell verification and manual QA that automated gates cannot cover.

    41k GitHub stars~1.3k tokensUpdated today
    Auto-check passed
  • Codewhale Session Handoff

    codewhale-hq/Codewhale

    Writes a paste-ready handoff for the next agent session, opening with a state-check command block and separating done, suspected and blocked work.

    41k GitHub stars~1.1k tokensUpdated today
    Auto-check passed
  • Codewhale Landing Workflow

    codewhale-hq/Codewhale

    Decides how verified work should reach main, directly, in a worktree or on an integration branch, while keeping contributor credit and respecting merge gates.

    41k GitHub stars~1.6k tokensUpdated today
    Auto-check passed
  • Codewhale Fleet Manager

    codewhale-hq/Codewhale

    Triages and manages Codewhale fleet runs and workers with typed commands, classifying failures and choosing a safe restart, resume or escalation.

    41k GitHub stars~1.2k tokensUpdated today
    Auto-check passed
  • GitHub Issue Bulk Assigner

    codewhale-hq/Codewhale

    Moves a list of GitHub issues into a milestone or assigns them to owners with the gh CLI, checking each one before and after the change.

    41k GitHub stars~953 tokensUpdated today
    Auto-check passed
  • Codewhale Issue Filing

    codewhale-hq/Codewhale

    Turns a bug or idea into a single actionable Codewhale GitHub issue with evidence, a gap-naming title, acceptance criteria and related links.

    41k GitHub stars~1.3k tokensUpdated today
    Auto-check passed

Categories

Questions about Sub-Agent Delegation

What does Sub-Agent Delegation do?

Guides when and how to split multi-step coding, research or verification work into focused sub-agent runs while the parent keeps integration and final checks. The parent agent keeps understanding the request, architecture, security, product and release-risk decisions, cross-module integration and the final review. Bounded read-only exploration, mechanical edits with clear file ownership, focused test or lint runs, boilerplate from a spec and independent checks can be handed off.

When should I use Sub-Agent Delegation?

Sub-Agent Delegation fits situations like: splitting a large refactor into parallel, focused sub-agent runs; running read-only exploration across a bounded set of files in the background; deciding whether a task is too small or too ambiguous to delegate.

How do I install Sub-Agent Delegation in Claude Code?

Run `npx skills add codewhale-hq/Codewhale --skill delegate -a claude-code`. Or copy the skill folder (crates/tui/assets/skills/delegate in codewhale-hq/Codewhale) into .claude/skills/delegate in your project. Claude Code loads it when a task matches its description.

How do I install Sub-Agent Delegation in Codex?

Run `npx skills add codewhale-hq/Codewhale --skill delegate -a codex`. Or copy the skill folder (crates/tui/assets/skills/delegate in codewhale-hq/Codewhale) into .agents/skills/delegate in your project. Codex loads it when a task matches its description.

Can I use Sub-Agent Delegation in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add codewhale-hq/Codewhale --skill delegate -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/delegate, .gemini/skills/delegate, .github/skills/delegate and .opencode/skills/delegate in your project.

What does Sub-Agent Delegation need to run?

SKILL.md names no scripts, command-line tools or credentials: Sub-Agent Delegation is instructions for the agent only. Our summary lists: An agent runtime whose agent tool can launch sub-agents.

Does Sub-Agent Delegation access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Sub-Agent Delegation safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Sub-Agent Delegation use?

Sub-Agent Delegation is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Sub-Agent Delegation use?

About 790 tokens (SKILL.md is roughly 3.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Sub-Agent Delegation?

Skills that share tags, products or a category with Sub-Agent Delegation: Paseo Advisor Second Opinion (getpaseo/paseo, 20k stars), O2 Review Loop (openobserve/openobserve, 22k stars), Kimi Code Delegation (CherryHQ/cherry-studio, 52k stars) and Harness Agent Team Designer (revfactory/harness, 9.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Sub-Agent Delegation?

codewhale-hq (a GitHub organization) maintains it in codewhale-hq/Codewhale, which has 41,079 GitHub stars. The repository holds 63 skills in this directory. The repository was last updated on October 8, 2026.

Source: codewhale-hq/Codewhale on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.