Skip to main content

SkillTree

SkillTree

Licence Version Stars Last commit

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 <target> --into <node> --tree <root> [--kind K] [--what-for TEXT] [--name NAME] [--absolute] add a pointer row to a node's table; --kind names a kind a detector speaks for
detectors list the detectors installed: each kind SkillTree has been taught beyond a skill
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] [--remedy TEXT] · watch <root> [--interval S] [--once] [--remedy TEXT] write the tree's health into one notice file, once or on a timer
demo build a small tree, walk it, check it, break it, and show the check catching the break

The library, import skilltree: SkillTree, TreeNode and parse_identity (the model), materialize and validate (write and check), discover, cohere, emit, unemit and watch (coherence), project, link_tree and build_forest (surfacing), Detector, Problem, detectors, register, add_row and fold (detectors and rows), and build_map, build_index and search (navigation).

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. 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 rows on a node: a node holding pointer rows to skill folders, the operation that adds one, 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. reached
0.5.0 detectors: a package plugs in what SkillTree should detect in a folder beyond a skill, and what a node holds for it; SkillTree itself knows only skills and names nothing built on it, and the exchange, the reports queue and the marketplace modules are gone. reached
0.6.0 the checks made true: every gate exiting non-zero on a fault, 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

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.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for agent-skilltree 0.6.0
File Size Uploaded Provenance Actions
agent_skilltree-0.6.0.tar.gz 61.1 kB Without provenance Details for agent_skilltree-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for agent-skilltree 0.6.0
File Interpreter ABI Platform Actions
agent_skilltree-0.6.0-py3-none-any.whl Python 3 none any Details for agent_skilltree-0.6.0-py3-none-any.whl

Total release size: 108.0 kB

Release files / agent_skilltree-0.6.0.tar.gz

Download URL agent_skilltree-0.6.0.tar.gz
Size 61.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6b5d26961c65b6c3aca07d3ec947361d8b3b75c13cf37b575e4d46704fa9dbb6
BLAKE2b-256 checksum
How to use checksums
1b871d803fc1b4ce784b9cff1da3f85514e07bc38fc00a388f797742d947f1a1
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.6.0-py3-none-any.whl

Download URL agent_skilltree-0.6.0-py3-none-any.whl
Size 46.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8251f61051af33b632398b72bd17547d201bf7c9be8ef75f74be65ff9f9dd42f
BLAKE2b-256 checksum
How to use checksums
ff2541a7e9245ebae30499c6d28c6088e372a25bb8dc76431e3ca42eef607664
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.6.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page