Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/maxesisn-subagent
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: agent-building
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
- Runs as
- Node.js package
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/subagent
What's inside
- Skill name
subagent- Description
- 派独立 subagent 执行任务——同步返回结果或后台运行完成时唤醒,同回合多次调用即并行 fan-out
- License
- MIT
- Instructions
- 102 lines in SKILL.md · view on GitHub
Before installing
- Ships executable scripts
Files (2)
- SKILL.md
- tools.ts
SKILL.md (first lines)
# Subagent Skill(v2)
`spawn_subagent` 派一个独立 agent 干活。子 agent 是一个普通 MaxClaw session:完整 agent loop、全部工具、独立上下文,跑完把最终回复交回来。
这是旧 subagent 子系统(2026-07 裁撤)的极简重建:没有 taskId、没有 OKR/Exit Protocol 模板、没有通知轮询。一次调用一个决定:任务写清楚,别的交给框架。
## 两种模式
**同步(默认)**——像调用一个会自己干活的函数:
```ts
spawn_subagent({
task: '扫描 ~/proj 的 npm 依赖已知漏洞。产出:漏洞列表(包名/版本/CVE/severity),按 severity 排序。',
label: '扫依赖漏洞',
})
// → 阻塞至完成,{ response: <子 agent 最终回复> }
```
**后台(`run_in_background: true`)**——长任务派出去就走,完成时框架以 framework 消息唤醒当前 channel,**不要轮询**:
```ts
spawn_subagent({ task: '...', label: '回测网格', run_in_background: true, timeout_ms: 3600000 })
// → 立即返回 { session_id, status: 'running' }
```
## 并行 fan-out
同一回合发多个 spawn_subagent 调用,框架并行执行:
```ts
// 一个回合内三个独立探索并行跑
spawn_subagent({ task: '调查 A...', label: '查A' })
spawn_subagent({ task: '调查 B...', label: '查B' })
spawn_subagent({ task: '调查 C...', label: '查C' })
```
## 参数速查
| 参数 | 必填 | 说明 |
|---|---|---|
| `task` | ✓ | 自包含任务描述。子 agent 看不到你的对话上下文——路径、数据源、期望产出都写进去 |
| `label` | ✓ | 3-8 字短标签 |
| `model` | | `palette:light`(快/便宜)/ `palette:mid` / `palette:frontier`,或精确 provider id。优先级:`model` > `role.model` > 继承父会话 |
| `role` | | 专职 role 名(`roles/<name>.md`):追加专职 system prompt + 模型倾向。用于审计/领域核查等需独立视角的任务。文件不存在 fail-loud |
| `context` | | 显式有限上下文(string/object):只传子 agent 所需最小背景。用于"保留主控+按需委托"(如多模态看图只传图路径+评判背景) |
| `run_in_background` | | 默认 false(同步) |
| `timeout_ms` | | 默认同步 15min / 后台 2h,上限 6h |
## 什么时候派 / 不派
**派**:可独立描述的探索、批量处理、数据拉取、计算回测;需要隔离上下文的繁重工作(避免污染主对话上下文);多个互不依赖的任务(fan-out)。
**不派**:3 步内自己能做完;任务依赖当前对话的隐含上下文(序列化成本 > 执行成本);需要逐步与用户确认的工作。
## role + context:专职委托与信息预算
`role` 和 `context` 解决两个 native runtime subagent 覆盖不到的场景:
**role(专职 prompt)**--子 agent 获得独立视角。审计场景典型:让审计员 subagent 看不到生成者的设计权衡,只以文件为证据对抗"放行倾向"。role 的 systemPrompt 追加到子 agent baseSystemPrompt(cache 友好的 system 层注入,不混进 user message)。
```ts
spawn_subagent({
role: 'excel-auditor',
task: '审计 /path/to/export.xlsx 的格式一致性。逐列检查类型/空值/枚举违例。',
label: '审计导出表',
})
```
**context(显式有限上下文)**--精确控制子 agent 该看到多少。看图委托场景典型:主 agent(纯文本模型)看不了图,派多模态子 agent 看图,只传图路径 + 评判背景,不把全量对话塞给它。
```ts
spawn_subagent({
model: 'palette:mid', // 或任一多模态 provider id
context: '训练目标:X。当前阶段:Y。期望 loss 单调下降。',
task: '用 view_image 加载 /path/loss.png,描述现象并评判训练是否正常。',
label: '看训练曲线',
})
```
role 只提供专职 prompt + 模型倾向,**不绑定工具/backend/编排**--那些是 native runtime 的领地。刻意不重建 2026-07 砍掉的 archetype 体系(worker/advisor/explorer 那种通用角色与 native runtime 重复)。
## 与 native runtime subagent 的分工
claude-agent-sdk / codex runtime 各自带 subagent 能力(SDK 的 Agent/Workflow、codex 的 collab),与 spawn_subagent 并存。按附加能力需求选:
| 需求 | 用 |
|---|---|
| 要 role 独立视角 / context 信息预算 / 结果进 MaxClaw session | `spawn_subagent` |
| 要多 agent 编排 / pipeline / cache-resume / ultracode | SDK `Workflow` |
| 简单一次性委托、不在乎治理 | SDK `Agent` |
不强制屏蔽 native subagent--都提供,按上述分工选。只有实测反复误用(如该用 context 的场景用了 native Agent 导致信息预算失控)才考虑屏蔽。
## 机制要点
- 子 session 记在 sessions 表(`parent_id` = 父 session),token 正常记账。`depth` 是剩余层级预算:channel session 3 → 子 2 → 孙 1 → 0 不能再派,禁止无限套娃。
- 子 agent 继承父 channel 的 worker 亲和性:channel 绑定了 worker,子 agent 的文件操作就在那台机器上。
- 私密会话(stealth)语义向下继承。
- 后台任务登记在进程内,MaxClaw 重启不恢复;`check_subagents` 可核对状态(不是轮询工具)。
- 父 turn 被用户 stop 时:同步子 agent 一并停止;后台子 agent 不受影响。From maxesisn/maxclaw-oss, MIT.
More from maxesisn/maxclaw-oss
- 0.526score
knowledge-base
maxesisn
通用知识库构建 & 查询工具。给定一个包含 PDF/Sphinx-HTML 的原始文档文件夹,批量转成可 grep 的 Markdown、抽符号倒排、生成 LLM 摘要 sidecar 和 manifest 聚合索引。Agent 进入陌生领域时先 `ls ~/.maxclaw/kb/` 看有无相关知识库,再按"L3…
SkillBFreshness: BClaude Code +9 - 0.521score
code-intelligence
maxesisn
代码仓库智能问答工具(repo_symbol_answer v1)。Tree-sitter AST 召回 function/class/method/interface/variable 定义 + ripgrep 词法搜索 + reranker 精排 + palette:mid LLM 综合,输出含…
SkillBFreshness: BClaude Code +9 - 0.521score
web-search
maxesisn
搜索互联网获取实时信息,通过自建 search-proxy 聚合 Tavily/Brave/Jina 三家付费 provider(带配额管理 + 失败 fallback 到 SearXNG)。适用于:查询新闻、实时价格、技术文档、不在训练数据中的信息。
SkillBFreshness: BClaude Code +9 - 0.521score
seek-advice
maxesisn
跨家 LLM 顾问 panel——给一个最小化 scenario,并行 dispatch 给 3-5 个不同 vendor 的模型,每个模型同时跑联网+离线两份,对抗单家族 prior 高度相关导致的 anchoring 偏差。用于复杂诊断、重要技术决策、自己推理 ≥2 小时未收敛兜底。
SkillBFreshness: BClaude Code +9 - 0.521score
pinned-notes
maxesisn
显式标记当前对话中需要永久保留的关键事实(必要开支、风险偏好、核心约束等),让它在 session compact/rollover 后仍存活。Agent 主动判断"哪些信息长期重要"调用,跨 session 通过 6 字符短 pin_id 引用。单 session 上限 25 条。
SkillBFreshness: BClaude Code +9 - 0.520score
reflection
maxesisn
自主反思与行动——静默处理能处理的,把该 Max 决策的记上面板
SkillBFreshness: BClaude Code +9 - 0.519score
channel-notes
maxesisn
Channel-scoped working notes — a short Markdown document per channel for decisions, deferred items, open questions, and next steps.
SkillBFreshness: BClaude Code +9 - 0.518score
async-runtime
maxesisn
需要未来唤醒、后台等待、跨 channel 通知或长期订阅时的调度选择;覆盖 cron、后台 subagent、notification、channel_subscribe、wake_channel。
SkillBFreshness: BClaude Code +9 - 0.518score
workdir
maxesisn
声明当前 channel 正在使用的工作目录(可多个),显示在右侧 Workspace 卡并在压缩后可查回。多文件任务时用 set_workdirs 钉下工作目录,避免文件散落 /tmp 或每次重说。仅记录+展示,不改进程 cwd。
SkillBFreshness: BClaude Code +9 - 0.518score
wake-channel
maxesisn
跨 channel agent 通信原语——通过 wake_channel "按门铃"通知另一个 channel 的 agent 有新状态变化
SkillBFreshness: BClaude Code +9 - 0.517score
notifications
maxesisn
持久化事件通知层 + topic-based pub-sub。所有 cron / sub-agent / mail / 价格异动等事件写入 SQLite 并按 channel 订阅 fan-out。channel 通过 channel_subscribe 声明关心哪些 topic;同时所有事件无条件 union…
SkillBFreshness: BClaude Code +9 - 0.515score
cron
maxesisn
管理定时任务(cron jobs),支持添加、删除、列出、立即执行
SkillBFreshness: BClaude Code +9
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Aug 9, 2026 (2 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/maxesisn/maxclaw-oss
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from maxesisn
- 0.526score
knowledge-base
maxesisn
通用知识库构建 & 查询工具。给定一个包含 PDF/Sphinx-HTML 的原始文档文件夹,批量转成可 grep 的 Markdown、抽符号倒排、生成 LLM 摘要 sidecar 和 manifest 聚合索引。Agent 进入陌生领域时先 `ls ~/.maxclaw/kb/` 看有无相关知识库,再按"L3…
SkillBFreshness: BClaude Code +9 - 0.521score
seek-advice
maxesisn
跨家 LLM 顾问 panel——给一个最小化 scenario,并行 dispatch 给 3-5 个不同 vendor 的模型,每个模型同时跑联网+离线两份,对抗单家族 prior 高度相关导致的 anchoring 偏差。用于复杂诊断、重要技术决策、自己推理 ≥2 小时未收敛兜底。
SkillBFreshness: BClaude Code +9 - 0.521score
pinned-notes
maxesisn
显式标记当前对话中需要永久保留的关键事实(必要开支、风险偏好、核心约束等),让它在 session compact/rollover 后仍存活。Agent 主动判断"哪些信息长期重要"调用,跨 session 通过 6 字符短 pin_id 引用。单 session 上限 25 条。
SkillBFreshness: BClaude Code +9 - 0.521score
code-intelligence
maxesisn
代码仓库智能问答工具(repo_symbol_answer v1)。Tree-sitter AST 召回 function/class/method/interface/variable 定义 + ripgrep 词法搜索 + reranker 精排 + palette:mid LLM 综合,输出含…
SkillBFreshness: BClaude Code +9 - 0.521score
web-search
maxesisn
搜索互联网获取实时信息,通过自建 search-proxy 聚合 Tavily/Brave/Jina 三家付费 provider(带配额管理 + 失败 fallback 到 SearXNG)。适用于:查询新闻、实时价格、技术文档、不在训练数据中的信息。
SkillBFreshness: BClaude Code +9 - 0.520score
reflection
maxesisn
自主反思与行动——静默处理能处理的,把该 Max 决策的记上面板
SkillBFreshness: BClaude Code +9
Cite this page
subagent skill. Agent Mart. https://agentmart.dev/skills/maxesisn-subagent (last updated 2026-10-24)