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.
npx skills add echoVic/blade-code --skill subagent-runtimegit clone --depth 1 https://github.com/echoVic/blade-codeWrote 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.
[](https://agentmods.dev/skills/echovic/blade-code/subagent-runtime)<a href="https://agentmods.dev/skills/echovic/blade-code/subagent-runtime"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/subagent-runtime/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/echovic/blade-code/subagent-runtime"><img src="https://agentmods.dev/badge/skills/echovic/blade-code/subagent-runtime.svg" alt="Reviewed on agentmods" width="80" height="20"></a>- NVIDIA SkillSpector pass
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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00117 | $0.02367 |
| Opus 5.5 | $0.00047 | $0.00947 |
| Sonnet 5.5 | $0.00023 | $0.00473 |
| Haiku 4.5 | $0.00012 | $0.00237 |
Grade A, and why
knowledge-agent-execution-and-orchestration-subagent-runtime 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 1mo 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.
How it starts
The opening of the file, as written. The whole thing — 71 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Module Structure
子代理是拥有独立 SessionRuntime、transcript 和 sidecar 的 child run;Task 工具负责身份与调用契约,执行器负责运行,后台管理器负责持久状态、通知和崩溃恢复。
Directory Layout
packages/cli/src/agent/subagents/— 注册表、执行器、sidecar、恢复、结果采纳和内置代理SubagentRegistry.ts— Markdown/frontmatter 配置加载和优先级SubagentExecutor.ts— 独立 child SessionRuntime 执行BackgroundAgentManager.ts— 后台运行、等待、取消、resume 和 orphan reconciliationAgentSessionStore.ts— durable sidecar 与 lineage/config snapshotSubagentWorktreeLifecycle.ts— 隔离 worktree 准备与收尾SubagentResultAdoption.ts— 父 Task 缺失结果时的重启采纳BackgroundSubagentCompletion.ts— 后台终态通知构造
packages/cli/src/tools/builtin/task/task.ts— Task 工具前台、后台和 resume 协议packages/cli/src/cli/agents.ts—--agents单次运行定义严格解析packages/cli/src/slash-commands/agents.ts— TUI agent 管理入口.claude/agents/— Git 可见的 Claude Code 兼容 agent 定义docs/guides/subagents.md— 用户可见配置与恢复契约
Key Entry Points
createTaskTool()inpackages/cli/src/tools/builtin/task/task.ts— 模型侧委派入口SubagentRegistry.loadFromStandardLocations()inpackages/cli/src/agent/subagents/SubagentRegistry.ts— 分层资源发现SubagentExecutor.execute()inpackages/cli/src/agent/subagents/SubagentExecutor.ts— 直接前台执行器BackgroundAgentManager.startBackgroundAgent()inpackages/cli/src/agent/subagents/BackgroundAgentManager.ts— durable 后台 child 启动BackgroundAgentManager.resumeAgent()inpackages/cli/src/agent/subagents/BackgroundAgentManager.ts— immutable child resume
Gotchas
resume_from不会复用原 agent ID,而会创建新的 child run;源运行必须已终止、类型必须一致,并记录rootAgentId → resumedFrom → resumeDepth,否则恢复被拒绝 (packages/cli/src/tools/builtin/task/task.ts,packages/cli/src/agent/subagents/BackgroundAgentManager.ts)- resume 使用源 sidecar 中冻结的模型、权限、工具、系统提示、最大回合和隔离配置,不重新读取同名 agent 的最新定义;修改配置不会改变既有 lineage (
packages/cli/src/agent/subagents/AgentSessionStore.ts,packages/cli/src/agent/subagents/BackgroundAgentManager.ts,git:888d608f) - 子代理访问权按
parent sessionId + canonical projectPath复合校验;只有相同 session ID 不足以跨 workspace 查询、取消、采纳或恢复 child (packages/cli/src/agent/subagents/AgentSessionStore.ts,packages/cli/src/tools/builtin/task/task.ts) - 子 Agent 的 blacklist 总会加入
EnterWorktree、ExitWorktree和TeamCreate;隔离 worktree 由宿主生命周期创建,teammate 也不能嵌套创建团队 (packages/cli/src/agent/subagents/SubagentExecutor.ts,packages/cli/src/agent/subagents/BackgroundAgentManager.ts) - 隔离运行只有“成功且无改动、无提交”才自动删除 worktree;失败或任何变更都会保留路径与分支,调用方必须按交付语义处理 (
packages/cli/src/agent/subagents/SubagentWorktreeLifecycle.ts) - 后台完成通知只内联最多 32,000 字符结果和 8,000 字符错误,并明确标为不可信数据;需要完整 durable 结果时才调用
TaskOutput,不能通过高频轮询代替 completion push (packages/cli/src/agent/subagents/BackgroundSubagentCompletion.ts,packages/cli/src/tools/builtin/task/task.ts) - orphan child 只有在 durable turn 已
turn_completed且恢复上下文中存在最终 assistant 文本时才恢复为 completed;其他情况记为 interrupted failed 并允许用新 ID resume (packages/cli/src/agent/subagents/BackgroundAgentManager.ts) - running sidecar 同时保存 PID 和进程启动身份,防止 PID 复用被误判为原 owner 仍存活;旧记录缺身份时采用更保守的兼容窗口 (
packages/cli/src/agent/subagents/AgentSessionStore.ts,packages/cli/src/agent/subagents/BackgroundAgentManager.ts) - 父 transcript 中缺失前台 Task 结果时,只有 child ID、owner、description、显式 type、resume lineage 和终态结果全部匹配才会采纳;后台 child 或 cancelled child 不走该路径 (
packages/cli/src/agent/subagents/SubagentResultAdoption.ts,git:103e57b7) verification与goal-verification是保留名称,用户、项目和命令行 override 都不能覆盖;普通内置 agent 则允许被后续高优先级来源替换 (packages/cli/src/agent/subagents/SubagentRegistry.ts)
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.
- 1mo ago First seen · 71 lines · 117 tokens per session scan A 40f55a36e2d1
knowledge-agent-execution-and-orchestration-subagent-runtime is a skill published in the GitHub repository echoVic/blade-code (181 stars, last pushed 3d ago), licensed MIT. It adds 117 tokens to every session and 2,367 once invoked, about $0.0005 per session on Opus 5.5. 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-09-03.
Other skills, from other repositories
pypi-release
This skill should be used when releasing tunacode-cli to PyPI. It keeps the existing local release checks, then hands the actual PyPI upload to a GitHub Actions workflow that uses the repository's PYPIAPITOKEN secret.
datalad
Retrieve, version, and publish scientific datasets with DataLad and git-annex, and capture computational provenance with datalad run, rerun, and containers-run. Use when cloning or fetching data from OpenNeuro, DANDI, datasets.datalad.org, or any DataLad dataset; when a file in a dataset reads as a broken symlink or a…
github-auth
GitHub auth setup: HTTPS tokens, SSH keys, gh CLI login.
github-repo-management
Clone/create/fork repos; manage remotes, releases.
github-issues
Create, triage, label, assign GitHub issues via gh or REST.
github-pr-workflow
GitHub PR lifecycle: branch, commit, open, CI, merge.