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 agentmods add skills/xiqin/loom/loom-subagent-driven-developmentnpx skills add xiqin/loom --skill loom-subagent-driven-developmentgit clone --depth 1 https://github.com/xiqin/loomWrote 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/xiqin/loom/loom-subagent-driven-development)<a href="https://agentmods.dev/skills/xiqin/loom/loom-subagent-driven-development"><img src="https://agentmods.dev/badge/skills/xiqin/loom/loom-subagent-driven-development.svg" alt="Measured on agentmods" height="20"></a>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 | $0.00045 | $0.03064 |
| Opus 5 | $0.00023 | $0.01532 |
| Sonnet 5 | $0.00009 | $0.00613 |
| Haiku 4.5 | $0.00005 | $0.00306 |
Grade A, and why
loom-subagent-driven-development 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.
How it starts
The opening of the file, as written. The whole thing — 245 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Subagent 编码执行
触发条件
重要:subagent 模式会增加约 4-15x token 消耗,不应默认用于所有任务。
仅在以下条件满足任意一条时才使用本 skill:
- 涉及 3 个以上 task 文件
- 预计改动 5 个以上源文件
- 需要跨模块搜索或并行探索
- 有安全、数据一致性、迁移或权限风险
- 主上下文已严重污染,需要隔离重试
不满足以上条件时,由主 agent 直接执行,不派发 subagent。
此外仍需满足:
specs/<date+feature>/plan.md、requirements.json、traceability.json和tasks/已存在。- git worktree 已创建(或明确不需要隔离分支)。
- 用户确认 plan 后进入执行阶段。
产物根目录
本阶段的 specDir 是 specs/<date+feature>/。所有阶段产物都必须写入该目录内;禁止在项目根目录写 test-report.md、traceability.json、progress.md、task-states/、handoffs/ 或复制 plan.md、tasks/。
核心机制
每个 task 派发一个 fresh subagent;实现后由 reviewer 做合并审查(spec 合规 + 代码质量)。审查、测试或验证失败时,提取修复指令,派发 implementer 的修复模式,只传递修复指令 + .loom/contexts/subagent-context.md。
每个 fresh subagent 都必须以 task handoff 作为跨会话边界:上游只传递必要 spec 片段、task、subagent-context 和相关 handoff,不把主会话的原始讨论、大段搜索输出或长日志整体塞入子会话。
详细状态处理、执行循环和红线见 references/execution-details.md。派发前必须读取相关 prompt 模板:
implementer-prompt.mdcombined-reviewer-prompt.mdtest-reporter-prompt.md
熔断配置
从 .loom/workflow.yaml 的 defaults 读取全局配置,step 级别配置可覆盖全局值:
# 全局默认(workflow.yaml defaults 区块)
max_retries: 3 # 单个 task 的最大修复重试次数
timeout_minutes: 30 # 单个 subagent 的超时时间(分钟)
每个 task 独立计算重试次数,不跨 task 累计。
执行前准备
启动执行阶段前,若 loom CLI 已安装,运行批次调度分析:
loom tasks --spec-dir specs/<date+feature>
输出会告知哪些 task 可以并行(无 owns 冲突 + 无依赖),哪些必须串行。以此结果决定派发策略,而非自行判断。
Handoff 协议(任务交接)
每个 subagent task 完成后必须生成交接文件 specs/<date+feature>/handoffs/TN.json,格式:
{
"task_id": "T1",
"status": "done",
"summary": "认证接口已完成,JWT 密钥从环境变量 JWT_SECRET 读取,未硬编码",
"artifacts": ["src/auth/index.ts", "tests/auth.test.ts"],
"exported_interfaces": [
{
"name": "Authenticate",
"path": "src/auth/index.ts",
"signature": "(token: string) => Promise<User>"
}
],
"breaking_changes": []
}
下游 task 的 subagent 派发前必须读取上游 handoff 作为紧凑索引,并按 artifacts 定向核对当前源码。handoff 不覆盖源码事实;自动保存的指纹过期时必须刷新 handoff。
- 读取
specs/<date+feature>/plan.mdTask 概览和specs/<date+feature>/tasks/TN.md详细内容,创建任务追踪列表。 - 读取
specs/<date+feature>/requirements.json与specs/<date+feature>/traceability.json,确认每个 task frontmatter 的behavior_ids已在账本中映射到该 task。 - 读取
.loom/workflow.yaml的defaults,获取max_retries和timeout_minutes;当前 step 有config字段时以 step 级别为准。 - 读取
.loom/contexts/subagent-context.md,必要时读取specs/<date+feature>/spec.md相关章节。 - 对每个 task,执行以下循环(
retry_count初始为 0):
What ships with it
5 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
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.
- 5d ago First seen · 245 lines · 45 tokens per session scan A 060606936185
loom-subagent-driven-development is a skill published in the GitHub repository xiqin/loom (5 stars, last pushed 1mo ago), licensed MIT. It adds 45 tokens to every session and 3,064 once invoked, about $0.0002 per session on Opus 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-08-31.
Other skills, from other repositories
systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.
local-ai-agents
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the…
chronicle
Analyze Copilot session history for standup reports, usage tips, session search, and session reindexing. Use when the user asks for a standup, daily summary, usage tips, workflow recommendations, wants to search or find past sessions by keyword/file/PR, wants to reindex their session store, or asks about deleting…
imagegen
Generate or edit raster images when the task benefits from AI-created bitmap visuals such as photos, illustrations, textures, sprites, mockups, or transparent-background cutouts. Use when Codex should create a brand-new image, transform an existing image, or derive visual variants from references, and the output…
chat-pet-sprite-creation
Use when creating or changing VS Code chat pet sprite art, sprite sheets, state animations, eye treatments, Stable/Insiders variants, or pet transitions under src/vs/workbench/contrib/chat/browser/widget/media/chatPet.
cpu-profile-analysis
Analyze V8/Chrome CPU profiles (.cpuprofile) and DevTools trace files (Trace-.json). Use when: profiling performance, investigating slow functions, comparing code paths, finding bottlenecks, analyzing timeToRequest, understanding call trees from sampling profiler data, analyzing layout/paint/rendering, investigating…