@QingQ77: As an agent's skills grow, it's impossible to cram all skill descriptions into the context for every conversation. This tool organizes skills into a tree, so the agent queries the tree upon receiving a task and loads only the relevant skill. https://github.com/maip…
Summary
SkillTree is a tool that organizes an AI agent's multiple skills into a tree structure and loads them on demand, avoiding stuffing all instructions into the context at once and improving agent efficiency.
View Cached Full Text
Cached at: 05/22/26, 11:49 AM
As an agent’s skills grow, it becomes impractical to cram all skill descriptions into every conversation’s context. This tool organizes skills into a tree: when an agent receives a task, it first queries the tree, then loads only the relevant skill on demand.
https://github.com/maipianworni/SkillTree…
Generate a hierarchical routing tree (root node → router nodes → leaf skills), write it back to the agent’s skill directory, and inject the routing protocol into AGENTS.md or CLAUDE.md at the project root.
maipianworni/SkillTree
Source: https://github.com/maipianworni/SkillTree
Skill Tree Generator
⚠️ Research Preview
A tool that aggregates a large set of skills into a hierarchical routing tree, allowing AI agents to load sub-capabilities on demand, avoiding dumping all instructions into context.
Skill Tree demo
Supported Agents
- Bitfun (skill directory
.bitfun/skills/, memory fileAGENTS.md) - Claude Code (native support, skill directory
.claude/skills/, memory fileCLAUDE.md) - Codex CLI (routing protocol injected via
AGENTS.md, skill directory customizable, recommended.agent/skills/) - Other agents that read
AGENTS.md(Cursor, Aider, Jules, etc.) work the same way
Script Usage
Usage A: Bitfun
-
Place
skill-tree-generator/inside the project’s.bitfun/skills/directory. -
Open Bitfun.
-
Run:
./scripts/aggregate-skills.sh .bitfun/skills --agent bitfun -
Paste the output command back into Claude Code (looks like
/skill-tree-generator --aggregate ...). -
Generated results:
- Skill tree written to
.bitfun/skills/{name}-tree/ - Routing protocol appended to
AGENTS.mdat project root (created if missing)
- Skill tree written to
Usage B: Claude Code
-
Place
skill-tree-generator/inside the project’s.claude/skills/directory. -
Open Claude Code.
-
Run:
./scripts/aggregate-skills.sh .claude/skills -
Paste the output command back into Claude Code (looks like
/skill-tree-generator --aggregate ...). -
Generated results:
- Skill tree written to
.claude/skills/{name}-tree/ - Routing protocol appended to
CLAUDE.mdat project root (created if missing)
- Skill tree written to
Usage C: Codex CLI
-
Place
skill-tree-generator/inside the project’s.agent/skills/directory (or a custom directory). -
One-time install the custom prompt so Codex CLI recognizes
/skill-tree-generator:./scripts/install-codex-prompt.shThis script copies
SKILL.mdto~/.codex/prompts/skill-tree-generator.md. -
Run:
./scripts/aggregate-skills.sh .agent/skills --agent codex -
Paste the output command back into Codex CLI.
-
Generated results:
- Skill tree written to
.agent/skills/{name}-tree/ - Routing protocol appended to
AGENTS.mdat project root (created if missing)
- Skill tree written to
If you prefer not to install the custom prompt, you can also ask Codex CLI to read
SKILL.mdand execute the aggregation command directly. The script output will show the exact phrasing.
Usage D: OpenCode
-
Place
skill-tree-generator/inside the project’s.opencode/skills/directory (or a custom directory). -
Run:
./scripts/aggregate-skills.sh .opencode/skills --agent opencode -
Follow the prompt to paste the output command back into OpenCode (looks like
Read .../SKILL.md and execute: /skill-tree-generator --aggregate ...). -
Generated results:
- Skill tree written to
.opencode/skills/{name}-tree/ - Routing protocol appended to
AGENTS.mdat project root (created if missing)
- Skill tree written to
Direct Skill Usage
1. Single Skill to Skill Tree
/skill-tree-generator skill
2. Multiple Skills to Skill Tree
/skill-tree-generator –aggregate skill1,skill2,… [–domain domain-name]
3. Update Skill Tree
/skill-tree-generator –update tree-path –add skill
Path Conventions
| Agent | Skill Directory | Memory File |
|---|---|---|
| Bitfun | .bitfun/skills/ | AGENTS.md |
| Claude Code | .claude/skills/ | CLAUDE.md |
| Codex CLI | .agent/skills/ | AGENTS.md |
| OpenCode | .opencode/skills/ | AGENTS.md |
Using Both Agents in the Same Repository?
Recommended approach (maintain only one copy):
``
Use Codex-style skill directory, symlink so Claude Code can find it
ln -s .agent/skills .claude/skills
Share a single memory file
ln -s AGENTS.md CLAUDE.md ``
References
The routing protocol template can be found in skill-tree-generator/references/validation_template.md under Check 1.
Recommended Skill Tree Usage
- Place the memory file (e.g.,
CLAUDE.md) at the project root and verify it contains the routing protocol template content from “References” above. - After generating the Skill Tree in the skills directory (e.g.,
.claude/skills), remove other skills to better test the Skill Tree’s effect. - Run a task or input a prompt to test whether the Skill Tree’s routing can “trigger” the relevant skill.
Routing Tracing [Optional]
- When the user’s prompt contains “路由调试” / “debug routing” / “路由追踪”, routing trace mode is activated. This mode outputs routing trace logs, allowing you to see if the skill-tree actually reaches the skill node the user intended.
- Normal mode (default): no routing information output; executes directly.
Similar Articles
@vista8: Without good Skills, AI Agents cannot realize their potential. Another pain point is that with millions of Skills online, which one best matches my current task? Can it run? Is it safe? Vercel's find skill can search and install Skills, but only includes 90,000 Skills scattered across vertical domains…
SkillsVote is an AI Agent Skill management tool that filters 790K+ Skills from GitHub and extracts functional descriptions, environment requirements, and permission information. It supports precise recommendation, execution attribution, and iterative optimization, and can also provide workflow combination suggestions.
@10xmylife: I suddenly realized that as Agent capabilities keep evolving, Skill is likely to become a more important application form than software. Traditional software essentially imposes a fixed way of working: open the app, find a function, fill in forms, follow steps one by one. But Skill is different. It doesn't provide an interface, but rather…
This article discusses how with the evolution of AI Agent capabilities, Skill (skill/workflow encapsulation) may replace traditional software as a more important application form. In the future, Agents will dynamically combine Skills around tasks, while software will retreat to the background as infrastructure.
alchaincyf/zhangxuefeng-skill
alchaincyf/zhangxuefeng-skill 是一个基于张雪峰著作、采访和语录构建的AI agent skill,提供其认知框架和思维方式,可在多种AI agent runtime中运行。
@bojie_li: Thanks to reader LiNan1984 for distilling "In-Depth Understanding of AI Agent" into 22 skills, making it convenient for…
感谢读者 LiNan1984 将《深入理解 AI Agent》提炼为 22 项技能,方便代理开发和人类阅读。
@axichuhai: https://x.com/axichuhai/status/2062146611472400461
Shares 8 curated AI skills, covering basic configuration, product development, and content creation, to boost AI productivity for agents such as Claude Code and CodeX.