hub

hub is a command for coding agents from shahtuyakov/claude-setup. It costs 0 tokens per session (982 once invoked), scanned A, original, MIT.

A command that coordinates work between multiple coding agents, such as database, backend, frontend, iOS, DevOps, or design agents.

In plain words
What is it for?
It parses delegation requests, starts agents one at a time or in parallel, waits for dependencies, and combines their results.
Why use it?
It removes the need to manually track which agent should do each task, which tasks depend on others, and how results return to the main agent.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/shahtuyakov/claude-setup/hub
Clone the repo
git clone --depth 1 https://github.com/shahtuyakov/claude-setup

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for hub

README.md
[![agentmods](https://agentmods.dev/badge/commands/shahtuyakov/claude-setup/hub.svg)](https://agentmods.dev/commands/shahtuyakov/claude-setup/hub)
Your own site
<a href="https://agentmods.dev/commands/shahtuyakov/claude-setup/hub"><img src="https://agentmods.dev/badge/commands/shahtuyakov/claude-setup/hub.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 982 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00982
Opus 5 $0.00000 $0.00491
Sonnet 5 $0.00000 $0.00196
Haiku 4.5 $0.00000 $0.00098

Measured 5d ago against content hash dad0dde67e8e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade A, and why

hub scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/hub.md · 180 lines

How it starts

The opening of the file, as written. The whole thing — 180 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Hub Orchestrator Command

Process delegation requests from agents and orchestrate multi-agent workflows.

Instructions

You are the Hub Orchestrator. Your job is to:

  1. Parse delegation requests from agent responses
  2. Spawn requested agents via the Task tool
  3. Aggregate results and return them to the requesting agent
  4. Handle dependencies and parallel execution

Delegation Request Format

Agents return delegation requests in this format:

{
  "delegation_request": {
    "type": "sequential|parallel|single",
    "agents": [
      {
        "agent": "database|backend|frontend|ios|devops|designer",
        "task_id": "task-001",
        "prompt": "Specific instructions for the agent",
        "depends_on": null | "agent_name"
      }
    ],
    "parallel_groups": [["frontend", "ios"]],
    "context_file": ".agents/architect/current-plan.md",
    "return_to": "architect"
  }
}

Or a simpler single-agent request:

{
  "delegation_request": {
    "agent": "database",
    "reason": "Need schema before implementing API",
    "prompt": "Create users table",
    "blocking": true
  }
}

Processing Steps

Step 1: Parse the Request

Extract the delegation request JSON from the agent's response.

Step 2: Resolve Dependencies

Build an execution order:

  1. Agents with depends_on: null run first
  2. Agents are executed after their dependencies complete
  3. Agents in parallel_groups can run concurrently

Step 3: Execute Agents

For each agent in order:

Task(
  subagent_type="[agent]",
  prompt="[prompt from delegation request].

Context: Read [context_file] for full plan details.
Previous results: [results from completed agents]

Return your work summary and any delegation requests if you need other agents."
)

Step 4: Check for Nested Delegations

After each agent completes:

  1. Parse their response for delegation requests
  2. If found, add to the execution queue
  3. Continue until no more delegations

Step 5: Aggregate Results

Read the full file on GitHub · 180 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 180 lines · 0 tokens per session scan A dad0dde67e8e

Subscribe to this mod's changes

hub is a command published in the GitHub repository shahtuyakov/claude-setup (13 stars, last pushed 8mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 982 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.