/skilltree:skilltreefrom skilltree
WHAT: turn a flat .claude/skills folder (or any folder of skills) into a walkable coordinate-addressed tree so the model loads one layer at a time instead of the whole pile - the skilltree CLI (discover, cohere, emit, unemit, place, map, search, fold, adapt, position, detectors, project, unproject, validate, watch). WHEN: when the user mentions skilltree, skill tree, too many skills, skills all load at once, organize/structure my skills, progressive disclosure for skills, tree-ify a flat skills folder, or a skills folder has grown past the point where tool selection degrades (any of).
Ships in skilltree. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The problem this solves: the platform auto-loads .claude/skills one layer
deep, so at scale EVERY skill lands in context EVERY turn and tool selection
degrades. skilltree imposes a coordinate-addressed tree on that flat substrate
using the three levers the runtime leaves open: path = coordinate
(0 -> 0.1 -> 0.1.1), depth = gate (a nested .claude never auto-loads,
so deeper nodes stay out of context until entered), Read = edge (the Read
tool injects a directory's layer; a shell cat injects nothing).
Check, and install if missing:
skilltree --help >/dev/null 2>&1 || pip install agent-skilltree
| Command | What it does |
|---|---|
skilltree tree <root> | show the coordinate tree on disk, each node's kind as the tree's manifest records it |
skilltree cohere <root> | report drift between reality and the coherent shape (a bare forest, stale breadcrumbs, flat drops) |
skilltree emit <root> [--root-forest] [--name N] [--localize] | re-cohere in place; --root-forest tree-ifies a flat forest under a synthesized root 0-<the folder's name>, or --name's — a folder of one skill is already a tree of one, rooted at that skill (lossless — every move journaled); breadcrumbs portable unless --localize |
skilltree relink <root> [--localize] | rewrite only the breadcrumb paths: portable (relative to each node's folder — what you commit and ship) or absolute for this machine (--localize, after installing a tree) |
skilltree unemit <root> | reverse the last journaled step (a tree-making emit or a place), byte-for-byte; run again for the step before |
skilltree place <skill> --into <node> --tree <root> | put a skill folder under a node: a new name is a new child, a name the node already has becomes its next version (the earlier kept as -v1, the breadcrumb led to the newest) |
skilltree map <folder> [--write] | render ANY flat folder as one coordinate-addressed index (progressive disclosure over a pile) |
skilltree search <folder> <query> [--scope <coord>] [--all-versions] | FTS5/BM25 retrieval; --scope restricts to a coordinate subtree; a skill kept in several versions answers with its newest unless --all-versions |
skilltree fold <dir> --into <node> --tree <root> [--kind K] | add a pointer row to a node's table (idempotent); --kind names a kind a detector speaks for |
skilltree adapt codex|gemini <root> [<target>] [--node <coord>] | walk the tree under another coding agent: writes the node's layer into the .agents/skills/ folder Codex (the node's own folder, where Codex is started) or Gemini (the target it reads) loads; each skill written says how to descend under that agent |
skilltree position <root> [--node <coord>] [--all] | write and show the positional map of a node — where it is, the path down to it, every top-level branch and the siblings at each level; emit writes every node's map, and the plugin's hook shows the map of each node you Read into |
skilltree unproject <root> <target> | retire a place a tree was projected into; project records every place, so cohere reports a link removed by hand and emit puts it back |
skilltree detectors | list the detectors installed: each kind SkillTree has been taught beyond a skill |
skilltree project <root> <target> [--policy flat|progressive] | deploy a tree into a skills dir as symlinks |
skilltree validate <root> | gate: every breadcrumb must resolve |
skilltree notify <root> [--rules-dir D] [--remedy TEXT] | one decoherence check writing the managed notice rule (--remedy for a read-only release skills folder) |
skilltree watch <root> [--rules-dir D] [--remedy TEXT] | the decoherence cron — a drifted tree announces itself |
When code must read, make or write a skill, use from skilltree import Skill — never parse a SKILL.md by hand.
| to | call |
|---|---|
| read a skill | Skill.read("path/to/deploy") — the skill's folder, the one holding SKILL.md, not the file; Skill.parse(text) reads a SKILL.md's text |
| make one | Skill.new(name, description, content="", version=None) |
| read its fields | .name · .description · .content (the body), each trimmed of the spaces and line breaks at its ends · .version (SkillTree's integer version; None when it has none, and for an author's release number such as 2.0.0, which is kept as written) · .keys() every frontmatter field in order · .get(field) a field's value as YAML reads it — a block or quoted description comes back as its text, its line breaks kept — and None for a list or a mapping, whose lines .raw(field) gives as written |
| change it | set .name, .description, .version or .content, or .set(field, value) (None removes the field): only that field's lines change |
| write it | .write(folder) writes the folder's SKILL.md, making the folder when it is missing, every other field kept byte for byte; .text() returns the same text |
| know whether it loads | .problems() — a list of what keeps the skill from loading in Claude Code (no \name` in its frontmatter, no `description` in its frontmatter), empty when it loads; skilltree validate` refuses a tree holding such a node |
To build a nested tree from code, describe it and write it whole — writing coordinate-named skill folders yourself
makes no tree (validate finds no skilltree.json, and emit --root-forest roots them flat, numbered by name):
from skilltree import SkillTree, TreeNode, materialize, validate
tree = SkillTree(TreeNode("root", "sc", children=[TreeNode("debug", "cor"), TreeNode("explain", "cor")]))
materialize(tree, "out/", coords=True) # every node an addressed folder, its breadcrumbs, and skilltree.json
assert validate("out/") == [] # every branch can be walked
A node's kind says what its skill holds: skill a plain skill, sc a skill chain, cor a chain of reasoning, ac an
attention chain. coords=True gives each node its address, its coordinate (0, 0.1), and names its skill folder
<coordinate>-<name> (0-root, 0.1-debug), which is what skilltree tree out/ prints. To add a skill under a node
of a tree that exists, use skilltree place <skill folder> --into <node> --tree out/, <node> the node's coordinate
(0.1) or its name (debug), never its folder's name.
Breadcrumbs instruct you to use the Read tool on a child's SKILL.md — that
injects the child's layer. A shell cat of the same file injects NOTHING (the
bytes arrive, the skill does not load). Never descend with cat.
skilltree cohere ~/.claude # see the drift before changing anything
skilltree emit ~/.claude --root-forest # tree-ify (reversible: unemit)
skilltree tree ~/.claude # every skill by its address
skilltree search ~/.claude "roll back" --scope 0.2 # search inside one branch
skilltree unemit ~/.claude # undo, byte for byte
<root> is the folder whose skills become the tree: a project folder holding .claude/skills, or ~/.claude itself,
which holds skills/. emit --root-forest moves each skill folder whole into a node folder of its own beside the
root's .claude (deploy/.claude/skills/0.2-deploy/), and writes the manifest skilltree.json, the journal
.emit-journal.json, and beside every node its map skill <coord>-<name>-where-you-are; the children of a node are
numbered in name order, so read a branch's coordinate from tree before passing it to --scope; unemit removes all of it
and puts every file back byte for byte. cohere and validate exit 1 when they find anything, 0 when the tree is
clean.
For an installation whose skills folder is a read-only release, pass --remedy to notify / watch and run emit on the new release while it is writable, then promote it.
The full mechanics (verified runtime table, file geometry, invariants, source
path:line map) are in this repo: README.md, papers/skilltree-paper.md,
and papers/flat-vs-tree.md. Read them from the plugin checkout when the user
asks how it works under the hood.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
skilltree@sancrev-marketplace is listed by sancovp/sancrev-marketplace — review the source before installing
npx claudepluginhub sancovp/sancrev-marketplace --plugin skilltree