为 AI coding agent(Claude Code / Codex CLI 等)打造的 Skill 分层路由树生成器。把臃肿的单体 Skill 拆分/聚合成 ROOT → ROUTER → SKILL 的树形结构,让 agent 根据用户意图按需加载子能力,避免一次性塞满上下文。支持单 Skill 拆树、多 Skill 聚合(含歧义消解)、增量扩展三种模式,兼容 。
概览
将一堆平坦的代理技能变成层级结构,你的AI代理按需行走,只加载它真正需要的叶子——一个用于特定任务,当提示跨越意图时并行加载多个。 与·以及任何读到 AGENTS.md 的代理人(Cursor、Aider、Jules......)合作。 技能固然重要——直到你拥有大量技能。你的经纪人能看到的每一个 SKILL.md 都必须是。你添加的能力越多,情况就越糟: - 🧠 ——数十个完整技能文件争夺窗口 - 🎯 - 特工必须阅读所有内容后决定使用何种 - 💸 - 你为本回合未曾用过的代币付费 将你的技能重组成一棵由微小路由文件组成的树(ROOT.md → ROUTER.md →叶子 SKILL.md)。代理先读取一个小路由表,然后逐个分支缩小范围,从不覆盖整个目录。 代理在接听前遵循路由协议:读取 ROOT.md,匹配意图,然后通过路由器下降。
概述(AI 翻译)
你的经纪人不需要所有技能——只需掌握所需的。
把一堆特工技能变成层级化的路由树你的AI特工 按需行走,只装上它真正需要的叶子——一个用于专注任务, 当提示跨越意图时,多个并行进行。
-success.svg)
英语 ·中文
可与Claude代码****Codex CLI ·OpenCode ·OpenClaw ·Bitfun ·Hermes ·以及任何读取AGENTS.md的代理(Cursor、Aider、Jules…)
😩 问题所在
技能很好——直到你拥有很多技能。你的经纪人看到的每一个SKILL.md都必须是
每回合都被加载或扫描。你添加的能力越多,情况越糟:
- 🧠 上下文膨胀 — 数十个完整技能文件争夺窗口
- 🎯 更差的路由 — 代理必须阅读所有内容后才能决定使用哪种路由
- 💸 更高的成本和延迟 — 你为本回合根本不需要的代币付费
✨ 解决方案
技能树生成器将你的技能重组成一棵由微小路由文件组成的树
(ROOT.md → ROUTER.md → leaf SKILL.md)。代理首先读取一个小型路由表,
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
😩 The problem
Skills are great — until you have a lot of them. Every SKILL.md your agent can see has to
be loaded or scanned on every turn. The more capabilities you add, the worse it gets:
- 🧠 Context bloat — dozens of full skill files compete for the window
- 🎯 Worse routing — the agent must read everything before deciding what to use
- 💸 Higher cost & latency — you pay for tokens you never needed this turn
BEFORE — flat skills, all loaded every turn
.claude/skills/
├── web-dev/SKILL.md ┐
├── data-pipeline/SKILL.md │
├── pdf-tools/SKILL.md ├──▶ everything in context ──▶ 🧠💥 bloat
├── seo-audit/SKILL.md │
└── …20 more/SKILL.md ┘
✨ The solution
Skill Tree Generator restructures your skills into a tree of tiny routing files
(ROOT.md → ROUTER.md → leaf SKILL.md). The agent reads a small routing table first,
narrows down branch by branch, and loads only the leaves it needs — never the whole catalog.
AFTER — a routing tree, leaves loaded on demand
.claude/skills/my-tree/
├── ROOT.md ◀── agent reads this first (a tiny routing table)
│ └─ narrows to one branch…
├── web-dev/ROUTER.md ◀── …then one sub-branch…
│ └─ frontend/SKILL.md ◀── ✅ this leaf is loaded on demand
└── data-pipeline/ROUTER.md
🌳 How it works
The agent follows a routing protocol before answering: read ROOT.md, match the intent,
descend through ROUTER.md files, stop at the [LEAF NODE](s) it needs, and execute those —
and only those. A focused prompt lands on a single leaf; a multi-intent or cross-domain prompt
fans out to every matched leaf and reads them in parallel — you’re never locked to one branch.
flowchart TD
推荐工具
换一个关键词,或者移除筛选条件。
安装
npx skillfish add openbitfun/skill_tree