@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…

X AI KOLs Timeline Tools

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.

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/maipianworni/SkillTree… Generates a hierarchical routing tree (root → router nodes → leaf skills), writes it back to the agent's skill directory, and injects the routing protocol into AGENTS.md or CLAUDE.md in the project root.
Original Article
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 file AGENTS.md)
  • Claude Code (native support, skill directory .claude/skills/, memory file CLAUDE.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

  1. Place skill-tree-generator/ inside the project’s .bitfun/skills/ directory.

  2. Open Bitfun.

  3. Run:

    ./scripts/aggregate-skills.sh .bitfun/skills --agent bitfun

  4. Paste the output command back into Claude Code (looks like /skill-tree-generator --aggregate ...).

  5. Generated results:

    • Skill tree written to .bitfun/skills/{name}-tree/
    • Routing protocol appended to AGENTS.md at project root (created if missing)

Usage B: Claude Code

  1. Place skill-tree-generator/ inside the project’s .claude/skills/ directory.

  2. Open Claude Code.

  3. Run:

    ./scripts/aggregate-skills.sh .claude/skills

  4. Paste the output command back into Claude Code (looks like /skill-tree-generator --aggregate ...).

  5. Generated results:

    • Skill tree written to .claude/skills/{name}-tree/
    • Routing protocol appended to CLAUDE.md at project root (created if missing)

Usage C: Codex CLI

  1. Place skill-tree-generator/ inside the project’s .agent/skills/ directory (or a custom directory).

  2. One-time install the custom prompt so Codex CLI recognizes /skill-tree-generator:

    ./scripts/install-codex-prompt.sh

    This script copies SKILL.md to ~/.codex/prompts/skill-tree-generator.md.

  3. Run:

    ./scripts/aggregate-skills.sh .agent/skills --agent codex

  4. Paste the output command back into Codex CLI.

  5. Generated results:

    • Skill tree written to .agent/skills/{name}-tree/
    • Routing protocol appended to AGENTS.md at project root (created if missing)

If you prefer not to install the custom prompt, you can also ask Codex CLI to read SKILL.md and execute the aggregation command directly. The script output will show the exact phrasing.

Usage D: OpenCode

  1. Place skill-tree-generator/ inside the project’s .opencode/skills/ directory (or a custom directory).

  2. Run:

    ./scripts/aggregate-skills.sh .opencode/skills --agent opencode

  3. Follow the prompt to paste the output command back into OpenCode (looks like Read .../SKILL.md and execute: /skill-tree-generator --aggregate ...).

  4. Generated results:

    • Skill tree written to .opencode/skills/{name}-tree/
    • Routing protocol appended to AGENTS.md at project root (created if missing)

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

AgentSkill DirectoryMemory 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

  1. Place the memory file (e.g., CLAUDE.md) at the project root and verify it contains the routing protocol template content from “References” above.
  2. After generating the Skill Tree in the skills directory (e.g., .claude/skills), remove other skills to better test the Skill Tree’s effect.
  3. 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…

X AI KOLs Timeline

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…

X AI KOLs Timeline

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

GitHub Trending (daily)

alchaincyf/zhangxuefeng-skill 是一个基于张雪峰著作、采访和语录构建的AI agent skill,提供其认知框架和思维方式,可在多种AI agent runtime中运行。