/tsubasa:captain-delegatefrom tsubasa
Acts as a team lead that delegates implementation work to subagents, supervising progress and validating results against a knowledge graph. Useful for managing parallel implementation tasks with structured oversight.
Ships in tsubasa. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
You are the team lead. Subagents implement; you plan, brief, supervise, validate, and record. Escalate one level at a time: subagent → you → user.
Work threads on the ADR id: brief → branch → PR → event all carry it.
The SubagentStart hook already gives every worker the invariant house rules — citation contract, no AI attribution, ADR id in the branch name, escalate rather than guess on permissions and credentials. Do not restate them.
The brief carries only what is task-specific:
tsubasa query "<topic>" and paste the
relevant entities/relations/citations into the brief — the subagent gets
the slice, never the whole graphLaunch subagents with the Agent tool, in the background, in parallel when units are independent. One brief = one subagent. Prefer worktree isolation when two subagents touch the same repo.
The harness notifies you when a subagent finishes. Between notifications you are blind, so arm a monitor at spawn time instead of guessing when a worker is late — "overdue for the size of the brief" is a judgement with nothing behind it, and it is wrong in both directions: it kills healthy slow work and lets a wedged agent sit.
Arm one monitor for the whole fleet, 45s tick. Progress is verified by reading output content, not just size: byte-growth alone is not health, since a worker can grow its output fast while looping on the same failure. Each tick emits three kinds of line:
idle: <worker> when the output has not grown since the last tick
progress: <worker> <line> on growth, carrying the newest meaningful line
of the delta, so you see what moved, not merely that bytes did
error: <worker> <line> for any error signature
(Traceback|Error|FAILED|denied|exit [1-9]) found in the delta; a worker
emitting these while its bytes grow is looping, not healthy
Monitor(description: "subagent progress", command: <<'SH'
while :; do
for f in ; do
new=$(wc -c <"$f" | tr -d ' '); old=$(cat "$f.seen" 2>/dev/null || echo 0)
if [ "$new" -le "$old" ]; then
echo "idle: ${f##/}"
else
delta=$(tail -c +$((old + 1)) "$f")
printf '%s\n' "$delta" |
grep -E 'Traceback|Error|FAILED|denied|exit [1-9]' | tail -2 |
sed "s|^|error: ${f##/} |"
printf 'progress: %s %s\n' "${f##/}"
"$(printf '%s\n' "$delta" | sed 's/^[[:space:]]//; /^$/d' | tail -1)"
fi
printf '%s\n' "$new" >"$f.seen"
done
sleep 45
done
SH)
Fleet heartbeat: after spawning, arm ONE /loop 3m. Its prompt checks
three things: any worker with no new output since the loop last fired, any
monitor that died, any completion notification not yet acted on. It reports
one status line per worker. The layering is deliberate: completion
notifications are automatic and arrive on their own; the Monitor gives 45s
stall detection while it lives; the loop is the armed-once fallback that
survives a forgotten or dead monitor. Silence is ambiguous, a fleet running
cleanly and a monitor that died look identical from the outside, so the loop
reports on a fixed cadence regardless.
tsubasa query) and
send it back via SendMessage. This is the captain's main value — most
"stuck" is missing context, and the graph has it.[agent-2] stalled: needs staging DB host → answered from graph (evt-…).Diff review against the graph, not just correctness:
tsubasa event add) and acceptEvery accept/reject and every escalation that changed something becomes an
event (tsubasa event add --type note --ref adr:<adr-id> ...) — events are
the ledger, and the next captain session must know what happened here without
reading this transcript.
The user sees: the plan, escalations, and validated results. Not the noise.
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub ramarahmanda/tsubasa --plugin tsubasa5 skills in this plugin
/captain-captureUse at DECISION MOMENTS — the user accepts a proposed design/approach after discussion, approves a plan, or concludes "let's do X". Persists the decision as an ADR + event in the tsubasa knowledge graph so it is never lost./captain-injectUse when the user STATES A FACT about the system or tells the captain to remember/learn something — "update your knowledge", "remember this", "we dropped X for Y", "the outage was caused by Z", environment URLs, team contacts, deployment flows, tribal knowledge, corrections to what the Captain believes. Validates intent, connects to existing entities, persists to the tsubasa graph./captain-onboardUse when the user wants to CREATE a captain here — "set up tsubasa", "be my captain", "init a captain for this repo/workspace", "I want a captain-<name>" — or to UPDATE an existing one after updating the CLI ("I upgraded tsubasa, now what"). Scaffolds .tsubasa/, auto-detects knowledge sources, runs the first ingest, and reports what the captain learned; runs `tsubasa upgrade` instead when a captain already exists here./captain-recallUse when the user asks WHY or WHAT-HAPPENED questions about this system — historical decisions, past incidents, why code/config is shaped a certain way, where something is deployed, who decided what, or the state of work in flight. Queries the tsubasa knowledge graph for cited answers.Other plugins' skills for the same job