Delegate To Subagents logo

Delegate To Subagents

Community
songjiun10-collab
delegate-to-subagents

Decide when to hand work to a subagent instead of doing it yourself, how to brief it, how to run the fix/review loop when something comes back wrong, and how to verify what comes back. Use when a task is big enough to delegate (independent research, a parallelizable slice, a second opinion, a review pass), when running more than one agent, when a subagent's report claims something is finished, or when a review comes back with findings that need fixing. Skip for single-step edits or when no subagent tooling is available. Bundles an optional PreToolUse/PostToolUse hook (scripts/check_dispatch_brief.py) that nudges on two of the mistakes this skill warns about, plus an execution-state dashboard CLI (scripts/execution_manager.py) for a coordinator tracking multiple workers.

Overview

Publishersongjiun10-collab
RepositorySenior-thinking-skills
Skill namedelegate-to-subagents
Stars
88
Forks
12
Bundled files
11
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 11 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by songjiun10-collab on GitHub. Read the source before you install it.

Installation

Install the Delegate To Subagents AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/songjiun10-collab/Senior-thinking-skills/tree/main/delegate-to-subagents
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/songjiun10-collab/Senior-thinking-skills.git /tmp/Senior-thinking-skills
mkdir -p .claude/skills
cp -r /tmp/Senior-thinking-skills/delegate-to-subagents .claude/skills/delegate-to-subagents
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Delegate To Subagents in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Delegate To Subagents on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Delegate To Subagents is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Delegating to Subagents

This skill's substantive guidance (deciding whether to delegate, briefing, coordinating a hierarchy, verifying results, handling blocked/loop cases, and everything else) is calibrated per model. Read the file matching the model you're running as before applying it.

ModelFile
Claude Opus 5.5opus-5-5.md
Claude Fable 5.1fable-5-1.md
Claude Sonnet 5sonnet-5.md
Claude Sonnet 5.5sonnet-5-5.md
Claude Haiku 5.5haiku-5-5.md
OpenAI GPT-6 Astragpt-6-astra.md
OpenAI GPT-6 Solgpt-6-sol.md
OpenAI GPT-6.1 Solgpt-6-1-sol.md
OpenAI GPT-6 Lunagpt-6-luna.md

Read whichever file matches the model actually running before applying this skill.

Running a model not listed above (an older generation, a different model family entirely)? sonnet-5.md carries the fullest general-purpose version of the underlying procedure.

The two pieces below — the dispatch-brief hook and the execution-manager script — are fixed infrastructure tied to specific script paths, not model-dependent guidance, so they live here rather than in the per-model files.

Optional: enforce with a hook

Two of this skill's principles are mechanically catchable — pasting a long conversation summary verbatim, and too many concurrent open dispatches (2-3 is normal, more than that trips it) — scripts/check_dispatch_brief.py detects both right before an Agent call (PreToolUse). By default it only warns, it doesn't block (a default chosen with the assumption this may get installed into projects that aren't your own). To actually block, add the environment variable DELEGATE_HOOK_STRICT=1 to the hook command — the script's header comment documents the exact behavior.

Add to .claude/settings.json:

json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Agent",
        "hooks": [
          { "type": "command", "command": "python3 .claude/skills/delegate-to-subagents/scripts/check_dispatch_brief.py" }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "Agent",
        "hooks": [
          { "type": "command", "command": "python3 .claude/skills/delegate-to-subagents/scripts/check_dispatch_brief.py" }
        ]
      }
    ]
  }
}

Agent is the built-in dispatch tool's name (some docs/blogs from older Claude Code versions still say Task — if your version predates the rename, use that instead and confirm against your own tool_name in a hook payload). Hook the same script into both PreToolUse and PostToolUse — PostToolUse closes out the specific dispatch that finished, keyed by the call's tool_use_id (hook only one side and open dispatches never get closed). If your skill is installed at a different path, update the command path to match. By default it only warns quietly (visible only in the human-facing transcript) — to make Claude actually react to it (i.e. actually block), prefix the command with DELEGATE_HOOK_STRICT=1 ("command": "DELEGATE_HOOK_STRICT=1 python3 ..."). This hook is example-level enforcement — not a red-team-tested CRITICAL-tier block. For that tier (severity-graded PreToolUse/PostToolUse guards that actually deny rm -rf, force-push, committing to main, etc., by default rather than just warning), see songjiun10-collab/hook — a portable extraction of the same hook framework this line used to point at internally. That plugin covers hard enforcement; this bundle covers the thinking that should prevent the situation from reaching a hook in the first place. If you need something stronger than this example script but lighter than that plugin, use this script as a starting point and adapt it to your project.

Limitation: the hook only counts how many dispatches are open, it doesn't know which files each one touches — two parallel dispatches editing the same file won't trip anything as long as the total count stays under the threshold. Catching that mechanically would mean parsing each brief for the files it intends to touch and cross-checking against the others' — out of scope for this example script; "never let two dispatches edit the same live file" stays something you enforce by reading the briefs yourself.

Optional: track execution state with a script

Acting as a coordinator over several workers means tracking whose status is what — scripts/execution_manager.py is a small CLI for that, so it doesn't have to live in your head or get re-derived from scratch every time you check in:

bash
python3 scripts/execution_manager.py start worker-a "exploring the auth bug"
python3 scripts/execution_manager.py update worker-a blocked "waiting on a prod API key"
python3 scripts/execution_manager.py dashboard
python3 scripts/execution_manager.py clear worker-a

dashboard prints one line per tracked worker — status, elapsed time, and note — and flags any blocked entry that's been stuck past EXECUTION_MANAGER_BLOCKED_WARN_SECONDS (default 1800s). Be precise about what this does and doesn't do: it tracks and displays status; it does not detect that a worker has a problem (something has to call update ... blocked — the worker itself, or you noticing), and it does not decide what to do about a stale one — that's still your judgment call, same as everywhere else in this skill. Read "problem detected → automatic decision → automatic fix" nowhere in this script; it stops at "here's what's stale, go look."

Optionally wire it as a PreToolUse hook on the Agent tool so a stale-blocked warning surfaces automatically right before you dispatch yet another worker, instead of only when you remember to run dashboard yourself:

json
{
  "hooks": {
    "PreToolUse": [
      {
        "matcher": "Agent",
        "hooks": [
          { "type": "command", "command": "python3 .claude/skills/delegate-to-subagents/scripts/execution_manager.py hook" }
        ]
      }
    ]
  }
}

This can sit in the same PreToolUse/Agent matcher block as check_dispatch_brief.py above — Claude Code runs every hook command listed under a matcher, in order. State lives in its own file (.claude/hooks/.execution_manager_state.json by default, override with EXECUTION_MANAGER_STATE_FILE), separate from check_dispatch_brief.py's marker files, so the two don't interfere with each other. Verified with 13 isolated stdin/CLI cases (empty dashboard, start/update/clear, unknown-status rejection, hook mode silent when nothing's stale, hook mode warning once staleness is simulated, PostToolUse and non-Agent calls both silent, malformed stdin fails open, multiple workers with mixed states).

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Delegate To Subagents AI skill do?

Decide when to hand work to a subagent instead of doing it yourself, how to brief it, how to run the fix/review loop when something comes back wrong, and how to verify what comes back. Use when a task is big enough to delegate (independent research, a parallelizable slice, a second opinion, a review pass), when running more than one agent, when a subagent's report claims something is finished, or when a review comes back with findings that need fixing. Skip for single-step edits or when no subagent tooling is available. Bundles an optional PreToolUse/PostToolUse hook (scripts/check_dispatch...

Why use Delegate To Subagents on TypingMind?

Because you install it once and use it with any model. Delegate To Subagents is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Delegate To Subagents in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/songjiun10-collab/Senior-thinking-skills/tree/main/delegate-to-subagents. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Delegate To Subagents?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Delegate To Subagents?

As many as you like. As long as a model supports skills, you can use Delegate To Subagents with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Delegate To Subagents AI skill free?

Yes. It is published on GitHub by songjiun10-collab under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇