using-subagents

using-subagents is a skill for Claude Code, Codex from Lianues/Lim-Code. It costs 75 tokens per session (2,911 once invoked), scanned A, original, MIT.

A guide to using multiple coding subagents, which are separate agents that handle assigned tasks independently. It explains how to share facts, decisions, reviews, and blockers through durable project files.

In plain words
What is it for?
Use it to split a project into agent tasks, run parallel reviews, collect findings, record decisions, and coordinate later revisions.
Why use it?
It prevents important context from being lost between independent agents or between review rounds. It also sets rules for parallel work and approval-based iteration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: mentions subagents.

Good fit Use it to split a project into agent tasks, run parallel reviews, collect findings, record decisions, and coordinate later revisions.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/lianues/lim-code/using-subagents
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.

Any agent
npx skills add Lianues/Lim-Code --skill using-subagents
Clone the repo
git clone --depth 1 https://github.com/Lianues/Lim-Code

Made for: Claude Code, Codex.

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 using-subagents

README.md
[![agentmods](https://agentmods.dev/badge/skills/lianues/lim-code/using-subagents/github.svg)](https://agentmods.dev/skills/lianues/lim-code/using-subagents)
Your own site
<a href="https://agentmods.dev/skills/lianues/lim-code/using-subagents"><img src="https://agentmods.dev/badge/skills/lianues/lim-code/using-subagents/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.

agentmods 80×15 button for using-subagents

Your own site · 80×15
<a href="https://agentmods.dev/skills/lianues/lim-code/using-subagents"><img src="https://agentmods.dev/badge/skills/lianues/lim-code/using-subagents.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 75 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,911 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.00075 $0.02911
Opus 5.5 $0.00030 $0.01164
Sonnet 5.5 $0.00015 $0.00582
Haiku 4.5 $0.00007 $0.00291

Measured 1mo ago against content hash 021bd686ab39, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

using-subagents 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.

resources/skills/using-subagents/SKILL.md · 142 lines

How it starts

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

使用 Subagents

背景知识

SubAgent 是无状态的:每一次调用的 SubAgent 都是无状态且独立的。它不会继承主 Agent 的聊天记录、主 Agent 已读过的 Skill、其他 Agent 的输出、上一轮结论,也不会知道主 Agent 脑中的计划。

中央数据库 / 共享信息库是同一概念:使用多个 SubAgents、多轮复核、审批、阻断项收敛或任何需要共享状态的任务时,公共事实、决策、阻断项、修订结果、审批结论必须写进外部位置,不能只留在聊天里。例如 docs/pm/{对应session主题名}/。

Skill 资源遵循渐进披露:先读取 Skill 主体;当 Skill 主体或任务需要引用附属资料时,再按 read_skill 返回的 resources manifest,用 read_skill_resource 按需读取 textReadable=true 的相关资源。不要无条件读取所有 resources。

集群并行调用 SubAgents 的方法:并行应该在单轮输出中同时调用多次 SubAgents 工具,禁止分轮次调用,除非一个 SubAgent 的输入信息依赖另一个 SubAgent 的输出。

调用前门禁

调用任何 SubAgent 之前,主 Agent 必须先判断任务类型。

一次性简单任务

如果任务不依赖上一轮结论、不依赖其他 SubAgent 输出、不需要审批收敛,也不需要后续复核,可以直接在 prompt/context 中完整写入目标、背景、约束、范围、输出格式和成功标准。

必须使用中央数据库的任务

只要满足以下任一条件,必须先建立或引用中央数据库 / 共享信息库,不允许只靠 prompt 摘要:

  • 用户要求使用多个 Agents、SubAgents、并行 Agent、对抗性审查、多角色审查或集群处理。
  • 任务出现“第一轮”“第二轮”“上一轮”“复核”“审批”“阻断项”“修订后”“Approve/Blocker 收敛”等语义。
  • 需要多个 SubAgents 共享事实或接力。
  • 需要后续 SubAgent 继承前一轮结论。
  • 需要记录采纳、拒绝、阻断项、验证结果或最终决策。
  • 任务会跨多次工具调用、多个 Agent 或多次对话轮次。

中央数据库推荐放在 docs/pm/{task-name}/,至少包含:

  • README.md:索引和文件用途。
  • MASTER_CONTEXT.md:长期背景、目标、术语、边界和硬约束。
  • STATUS.md:当前阶段、已完成项、阻断项和下一步。
  • DECISIONS.md:已采纳/拒绝的关键决策和理由。
  • reports/:每个 SubAgent 的调研、审查、审批、复核报告。

Agents Approve 迭代模式

当用户明确说出 进入agents approve迭代模式、进入 agents approve 迭代模式 或等价表达时,主 Agent 必须进入多 Agent 审批迭代流程。该模式不是普通并行审查,而是一个以 APPROVE / BLOCKER / CONCERN / NEEDS_INFO 为结论类型的闭环。

进入该模式后,主 Agent 必须:

  1. 建立或引用中央数据库 / 共享信息库。
  2. 将目标、长期背景、被审对象、通过标准、阻断标准、当前阶段和报告写入位置写入共享信息库。
  3. 并行派发多个 SubAgent 进行独立审查;每个 SubAgent 的 prompt 都必须自包含,或明确要求读取共享信息库中的指定文件。
  4. 汇总每个 SubAgent 的结论、证据、阻断项、关注项和缺失信息。
  5. 对确认采纳的阻断项进行修订,并把采纳 / 拒绝理由、修订摘要和验证结果回写共享信息库。
  6. 再次派发定向复核 SubAgent,直到没有阻断项、用户停止,或主 Agent 判断必须由用户作出产品、架构、安全或取舍决策。

本模式必须强制执行“SubAgent 无状态”这一全局不变量。当然,无论是否进入该模式,SubAgent 都不会自动继承聊天记录、主 Agent 记忆、上一轮结论或其他 SubAgent 输出;本模式只是把这条全局规则用于审批迭代场景,并要求每一轮的阻断项、修订摘要、审批结论和证据路径都回写到中央数据库 / 共享信息库。

复核和审批强制字段

二轮或后续复核、审批、阻断项收敛的 prompt 必须包含或引用以下内容;缺一项时不得派发 SubAgent:

  1. 中央数据库 / 共享信息库路径。
  2. SubAgent 开始前必须读取的文件列表。
  3. 上一轮报告路径。
  4. 上一轮完整问题清单,每个问题都要有证据路径、行号或来源。
  5. 本轮修订摘要,并逐条对应上一轮问题。
  6. 被复核对象路径。
  7. 期望验证点。
  8. 通过标准和仍然阻断的判定标准。
  9. 输出格式和报告写入位置。
  10. 缺失检查规则:如果无法读取中央数据库、上一轮报告或修订摘要,必须输出 REJECT: 缺少复核上下文,不得猜测。

Read the full file on GitHub · 142 lines

Files

What ships with it

6 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. 1mo ago First seen · 142 lines · 75 tokens per session scan A 021bd686ab39

Subscribe to this mod's changes

using-subagents is a skill published in the GitHub repository Lianues/Lim-Code (144 stars, last pushed 4mo ago), licensed MIT. It adds 75 tokens to every session and 2,911 once invoked, about $0.0003 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-08-30.

Related

Other skills, from other repositories

mailbox-bridge

Use this skill when external coding agents (Claude Code, Aider, custom scripts) need to participate in the project's shared WrongStack mailbox, or when a user asks to "expose the mailbox", "let Claude Code read the mailbox", "external agent mailbox", "mailbox bridge", or "HTTP mailbox bridge". Starts a loopback HTTP…

WrongStack/WrongStack · 111 tokens

nav-loop

Run tasks until complete with structured completion signals. Auto-invoke when user says "run until done", "keep going until complete", "iterate until finished", "loop mode", "autonomous mode".

qf-studio/navigator · 43 tokens

shadow-agent

Use this skill when you need a background monitoring agent that watches the fleet, detects anomalies, and can intervene on command. Triggers: user says "shadow", "monitoring agent", "fleet watcher", "hoop command", "spike detection".

WrongStack/WrongStack · 55 tokens

output-standards

Use this skill when defining or enforcing output formatting standards for agent responses in WrongStack. Triggers: user says "next steps format", "output standard", "response format", "final message format", "standardize next steps".

WrongStack/WrongStack · 52 tokens

debugging

Use this skill when something is broken and the cause is unknown — a failing test, a crash, an error message, wrong output, a regression, a hang, or behaviour that differs between environments — and it has to be found and fixed at the root. Also use it to build the failing proof for a suspected defect before fixing…

WrongStack/WrongStack · 148 tokens

design-craft

Design or substantially improve user-facing interfaces with a product-specific visual direction, content hierarchy, and rendered critique. Use for new screens, landing pages, redesigns, typography/layout work, or UI that feels generic or AI-generated. For small fixes, preserve the existing design without starting a…

WrongStack/WrongStack · 63 tokens