SkillTree
SkillTree turns a flat folder of agent skills into a tree that a model walks one layer at a time. Every skill gets an
address (0, 0.1, 0.1.1), every branch tells the model what lies below it and how to go down into it, and a set
of checks keeps the tree true as skills are added, moved or removed. It is a Python library and a command line,
skilltree, published on PyPI as agent-skilltree, and it ships as a Claude Code plugin whose one skill teaches
Claude to install and use it.
The problem it solves
Claude Code loads a skills folder one layer deep: every skill in ~/.claude/skills or a project's .claude/skills is
offered to the model at once, and a .claude folder nested inside another is never loaded. With ten skills that costs
nothing. With a hundred, every skill's description is in front of the model on every turn, and choosing the right one
gets worse as the pile grows, because the model has to work out, each time, how the skills relate — which is general
and which is specific, which belongs under which — from a list that no longer says.
Those relations are already there in the skills themselves; the flat folder throws them away. The platform ships the nodes and forbids the edge: no skill can cause a deeper skill to be loaded. SkillTree puts the edges back on the disk. A model then reads the top layer, chooses a branch, and reads into it, so what it holds at any moment grows with how deep it has gone, not with how many skills exist.
Install
pip install agent-skilltree
First use
Point it at a skills folder, see what shape it is in, turn it into a tree, and undo it if you want:
skilltree cohere ~/my-project # is it a tree, or a flat pile with no root?
skilltree emit ~/my-project --root-forest --name my-project # make it a tree, in place
skilltree tree ~/my-project # show the tree, every skill by its address
skilltree search ~/my-project "deploy rollback" --scope 0.1 # search inside one branch
skilltree unemit ~/my-project # put everything back exactly as it was
From a clone of the repository, pip install -e . installs the same command.
From Python:
from skilltree import SkillTree, TreeNode, materialize, validate
tree = SkillTree(TreeNode("root", "sc", children=[TreeNode("debug", "cor"), TreeNode("explain", "cor")]))
materialize(tree, "out/", coords=True) # write it to disk
assert validate("out/") == [] # every branch can be walked
Its interface
Show its interface
The command line, skilltree <command>:
| command | what it does |
|---|---|
discover <root> · tree <root> |
read the tree that is actually on disk and print it, every skill by its address |
cohere <root> |
report where the tree on disk has drifted from its recorded shape; exits 1 on any drift |
emit <root> [--root-forest] [--name N] [--localize] |
rewrite addresses and breadcrumbs in place; --root-forest turns a flat folder into a tree, moving each skill whole and recording every move |
unemit <root> |
undo the last tree-making emit exactly |
relink <root> [--localize] |
rewrite only the breadcrumb paths: relative (what you ship) or absolute for this machine |
build <manifest> <root> [--localize] |
write a tree from its manifest, then check it |
validate <root> |
check that every node loads and every breadcrumb leads somewhere |
map <folder> [--write] |
render any folder as one addressed index file |
search <folder> <query> [--scope C] [--ext E] [--limit N] |
ranked search over any folder, optionally inside one branch |
fold <dir> --into <node> --tree <root> [--relative] |
bind a framework into a volume of a tome |
project <root> <target> [--policy progressive|flat] [--link absolute|relative] [--node N] |
surface a tree into a skills folder as links |
notify <root> [--rules-dir D] · watch <root> [--interval S] [--once] |
write the tree's health into one notice file, once or on a timer |
exchange build <manifest> <repo> · exchange validate <manifest> <repo> |
many trees in one repository under one master |
report-missed · mark-problem · reports |
record a skill that was needed and missing, or one that should have been used, for whoever improves the tree |
demo |
build a small tree, walk it, check it, break it, and show the check catching the break |
The library, import skilltree: SkillTree and TreeNode (the model), materialize and validate (write and
check), discover, cohere, emit, unemit and watch (coherence), project, link_tree, build_forest and
fold (surfacing and the tome), build_map, build_index and search (navigation), build_exchange,
walk_federation, validate_registry, validate_contribution and promote (many trees), and report_missed,
mark_problem, list_reports and resolve (the reports queue).
How it works
SkillTree uses the only three levers the platform leaves open. Placement: each node is a plain folder carrying its
own one-skill .claude/, so the path is the coordinate. The inert nested .claude: only the top layer loads, so
deeper nodes stay out of context until entered. Breadcrumbs: each node's SKILL.md ends with what lies below it
and the instruction to Read into it. A coordinate stands in for a node's identity and a breadcrumb for an edge —
emulations of what a graph would hold natively.
So a tree is plain folders. The root's skill lives at <root>/.claude/skills/0-<root>/SKILL.md; each child is a
folder beside that .claude, holding its own one-skill .claude/skills/, and only the root's skill is offered at
first. The root's SKILL.md ends with two generated parts: an index summary, which names everything reachable below
it so that a search for a deep skill still finds the branch that leads to it, and the breadcrumbs, one line per child
of the form - 0.1-debug (cor): Read `debug/.claude/skills/0.1-debug/SKILL.md` .
Descending is reading. When the model uses Claude Code's Read tool on a child's SKILL.md, Claude Code loads that
folder's layer — its CLAUDE.md, its rules and its skills — and nothing below it; a folder outside the project loads
nothing when read. A shell cat of the same file loads nothing either, so every breadcrumb says Read, never cat.
The shape is recorded in a manifest, skilltree.json, beside the tree. Breadcrumbs and the manifest's paths are
relative, so a tree names no machine and still works when copied; installing a tree writes them absolute for the place
it is installed. Because the platform does nothing to keep such a structure intact, SkillTree keeps it itself:
validate refuses a tree a model could not walk, cohere names every way the disk has drifted from the manifest,
emit repairs it in place, and a watch writes the verdict into one notice file that every session reads, so a broken
tree announces itself.
What it needs
Python 3.11 or later and the click package, which pip installs with it. Search uses SQLite's FTS5, which ships with
Python. Reading an exchange manifest written in YAML needs PyYAML. Walking a tree by its breadcrumbs needs a coding
agent whose file reader loads a folder's skills when it reads a file there — Claude Code does; other agents need the
adapters of a later version.
Roadmap
| version | what it holds | where it stands |
|---|---|---|
| 0.1.0 | the tree and its gate: materialize, validate, discover, cohere, emit, unemit, the watch and its notice, the command line. | reached |
| 0.2.0 | one product: map and search folded in as commands, and the tree view. | reached |
| 0.3.0 | the tome's bind operations: a volume node holding framework rows, fold, project, and the check that every row resolves. | reached |
| 0.4.0 | trees that ship portable: relative breadcrumbs and manifest paths, localized only at install. | reached |
| 0.4.1 | the install line names this package. | reached |
| 0.4.2 | the design and its face: every file of SkillTree explained in its design, the README written from that design, one roadmap, frontmatter every parser reads, search that finds a tree's skills and answers any query, and no hosted workflow. | next |
| 0.5.0 | the typed volume: a volume holding skills, frameworks, AIOSes and apps, each kind bound by its own fold and checked by its own table. | next |
| 0.6.0 | the checks made true: every gate exiting non-zero on a fault, portable rows by default, one rule of addressing, and a notice whose remedy fits the installation. | next |
| 0.7.0 | versioned skills: a skill placed again keeps its history, and descent and search go to its newest version. | next |
| 0.8.0 | adapters for other coding agents: the same tree walked under Codex and under Gemini, each by its own emulation of descent. | next |
| 1.0.0 | the positional map: wherever the agent stands, it is shown the branches above it and around it, and skills placed by the graph that owns them are restored when missing. | next |
Links
PyPI · Marketplace · Paper — Flat versus Tree · Paper — Coordinate-Addressed Skill Trees
Changelog
Every publish is recorded in CHANGELOG.md.
Licence
MIT License — see LICENSE.
Metadata
Release files for agent-skilltree 0.4.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agent_skilltree-0.4.2.tar.gz | 58.0 kB | Without provenance | Details for agent_skilltree-0.4.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agent_skilltree-0.4.2-py3-none-any.whl | Python 3 | none | any | Details for agent_skilltree-0.4.2-py3-none-any.whl |
Total release size: 107.7 kB
Release files / agent_skilltree-0.4.2.tar.gz
| Download URL | agent_skilltree-0.4.2.tar.gz |
|---|---|
| Size | 58.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d8d37c043c21991958414be104d0a8090f5370ab4e3300209f91a3dfcca21025
|
|
BLAKE2b-256 checksum How to use checksums |
c75e66ce923d13c04c936c1d95bcf42ea6dce1baa21dd223d50fbe8965825d7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.13
|
Release files / agent_skilltree-0.4.2-py3-none-any.whl
| Download URL | agent_skilltree-0.4.2-py3-none-any.whl |
|---|---|
| Size | 49.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7cf9c9677141567ebad2aed21ce2bbf108767531b71c5710f8b93072ae548ba
|
|
BLAKE2b-256 checksum How to use checksums |
b4a91fd55bd29cbec994253a09247b7f763b285c95197b5768e67bf70ffde696
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.13
|
Security for agent-skilltree 0.4.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.