loom-subagent-driven-development

loom-subagent-driven-development is a skill for Claude Code, Codex from xiqin/loom. It costs 45 tokens per session (3,064 once invoked), scanned A, original, MIT.

A workflow for carrying out an approved coding plan with separate helper agents and review checkpoints.

In plain words
What is it for?
It helps implement multi-file features, review each task, retry failed fixes, and pass only the needed notes between coding sessions.
Why use it?
It keeps large or risky changes isolated and makes it clear whether each task is finished, blocked, or missing information.

Skill for Claude CodeCodex

Part of the loom-engineering plugin — 22 skills shipped together

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 skills/xiqin/loom/loom-subagent-driven-development
Any agent
npx skills add xiqin/loom --skill loom-subagent-driven-development
Clone the repo
git clone --depth 1 https://github.com/xiqin/loom

Made for: Claude Code, Codex.

Or install loom-engineering, the plugin that ships this one along with the rest of its 22 skills.

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 loom-subagent-driven-development

README.md
[![agentmods](https://agentmods.dev/badge/skills/xiqin/loom/loom-subagent-driven-development.svg)](https://agentmods.dev/skills/xiqin/loom/loom-subagent-driven-development)
Your own site
<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>
Per session 45 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,064 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 $0.00045 $0.03064
Opus 5 $0.00023 $0.01532
Sonnet 5 $0.00009 $0.00613
Haiku 4.5 $0.00005 $0.00306

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

Security

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.

skills/loom-subagent-driven-development/SKILL.md · 245 lines

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.mdrequirements.jsontraceability.jsontasks/ 已存在。
  • git worktree 已创建(或明确不需要隔离分支)。
  • 用户确认 plan 后进入执行阶段。

产物根目录

本阶段的 specDirspecs/<date+feature>/。所有阶段产物都必须写入该目录内;禁止在项目根目录写 test-report.mdtraceability.jsonprogress.mdtask-states/handoffs/ 或复制 plan.mdtasks/

核心机制

每个 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.md
  • combined-reviewer-prompt.md
  • test-reporter-prompt.md

熔断配置

.loom/workflow.yamldefaults 读取全局配置,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。

  1. 读取 specs/<date+feature>/plan.md Task 概览和 specs/<date+feature>/tasks/TN.md 详细内容,创建任务追踪列表。
  2. 读取 specs/<date+feature>/requirements.jsonspecs/<date+feature>/traceability.json,确认每个 task frontmatter 的 behavior_ids 已在账本中映射到该 task。
  3. 读取 .loom/workflow.yamldefaults,获取 max_retriestimeout_minutes;当前 step 有 config 字段时以 step 级别为准。
  4. 读取 .loom/contexts/subagent-context.md,必要时读取 specs/<date+feature>/spec.md 相关章节。
  5. 对每个 task,执行以下循环(retry_count 初始为 0):

Read the full file on GitHub · 245 lines

Files

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.

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 · 245 lines · 45 tokens per session scan A 060606936185

Subscribe to this mod's changes

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.

Related

Other skills, from other repositories

systematic-debugging

Use when encountering any bug, test failure, or unexpected behavior, before proposing fixes.

obra/superpowers · 21 tokens

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…

microsoft/ai-agents-for-beginners · 200 tokens

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…

microsoft/vscode · 72 tokens

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…

openai/codex · 113 tokens

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.

microsoft/vscode · 53 tokens

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…

microsoft/vscode · 71 tokens