Install
$ agentstack add skill-kilimiaosix-agent-skills-subagent-model-router ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Subagent Model Router
在 Claude Code 中派发子 agent 前,按下面的规则为每个子任务单独选择 model 参数。适用于:
- Agent 工具的
model参数(Explore、Plan、general-purpose、自定义 agent 类型均可传) - Workflow 脚本中的
agent(prompt, {model})
一次并行 fan-out 中的不同子任务分别评估,可以混用不同模型。
四档映射
| model | 档位 | 典型任务信号 | |---|---|---| | fable | 高难·推理型 | 架构设计与方案权衡、跨模块疑难 debug、影响面/根因分析、安全审计、对抗性验证与裁决——多步推理、判断出错代价高 | | opus | 高难·实现型 | 大规模代码产出、大型重构/迁移的执行、复杂但方向已明确的实现 | | sonnet | 中等 | 常规功能实现、单模块 bug 修复、单一维度代码审查、常规文档撰写、中等规模调研汇总 | | haiku | 简单 | 文件/关键词搜索定位、清单式调研、机械性批量编辑、冒烟测试运行、格式检查——产出可被轻易验证 |
判断依据是任务本身的推理难度和出错代价,不是 prompt 的长度或涉及文件的数量。
默认与例外
- 复杂度介于两档之间、或拿不准 → 不传
model,继承主会话模型。不要为省成本强行降档。 - 用户显式指定了模型 → 以用户为准。
- 子 agent 的结论将直接决定不可逆操作(删除、部署、对外发布) → 宁可升一档。
传参示例
Agent 工具(同一次并行 fan-out 中混用模型):
- 简单搜索:
{subagent_type: "Explore", model: "haiku", prompt: "找出所有引用 X 的文件…"} - 深度分析:
{subagent_type: "general-purpose", model: "fable", prompt: "分析改动 Y 对模块 Z 的影响面…"} - 常规实现:
{subagent_type: "general-purpose", model: "sonnet", prompt: "按既有约定实现接口 W…"}
Workflow 脚本(机械型任务可同时降 effort):
const hits = await agent('grep 所有调用点并列出 文件:行号', {model: 'haiku', effort: 'low'})
const verdict = await agent(`对抗性验证该结论是否成立: ${claim}`, {model: 'fable'})
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: KilimiaoSix
- Source: KilimiaoSix/agent-skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.