skill-tree
CLAUDE.md2 starsChanged 7 months agoApache-2.0View on GitHub
Cross-platform skill clustering plugin. Repo at ~/Projects/skill-tree/. Each platform has its own variable for referencing plugin-bundled files: Never use bare relative paths like uv run scripts/foo.py — they only work during development. 176+ tests. Key test files: - test_plugin_structure.py — validates ${CLAUDE_PLUGIN_ROOT} usage, manifest metadata - test_gemini_extension.py — validates TOML commands, ${extensionPath}, skill parity - test_openclaw_plugin.py — validates OpenClaw package, {baseDir} paths, same-directory compat - test_scan_additive.py — additive merge preserves existing manifest - test_status.py — combined health check output -…
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 1 is distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 21
Never use bare relative paths like uv run scripts/foo.py — they only work during development.
- Distinctive: line 68
Never put internal names (agent names, private infrastructure) in public commits, PRs, or branches
≈ “Common” is an estimate: at least 1 in 5 of the 28,633 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
skill-tree
Cross-platform skill clustering plugin. Repo at ~/Projects/skill-tree/.
Architecture
- Claude Code plugin at repo root (
.claude-plugin/,skills/,hooks/) - Gemini extension (
gemini-extension.json,GEMINI.md,commands/*.toml). Thenamefield in the manifest must match the directory name. - OpenClaw plugin in
openclaw/subdirectory (separate package with its own scripts copy) - Codex CLI uses scripts directly with
--codexflag - Python scripts in
scripts/are the shared engine — all platforms invoke them viauv run
Platform path variables
Each platform has its own variable for referencing plugin-bundled files:
- Claude Code:
${CLAUDE_PLUGIN_ROOT}— required in skills, hooks, MCP configs. Plugins are copied to~/.claude/plugins/cache/so relative paths break. - Gemini CLI:
${extensionPath}— used in TOML commandpromptfields and MCP configs. - OpenClaw:
{baseDir}— interpolated in SKILL.md content. Refers to the skill directory, not plugin root. Scripts are at{baseDir}/../scripts/.
Never use bare relative paths like uv run scripts/foo.py — they only work during development.
Testing
uv run --with pytest --with scikit-learn --with pyyaml pytest tests/ -v176+ tests. Key test files:
test_plugin_structure.py— validates${CLAUDE_PLUGIN_ROOT}usage, manifest metadatatest_gemini_extension.py— validates TOML commands,${extensionPath}, skill paritytest_openclaw_plugin.py— validates OpenClaw package,{baseDir}paths, same-directory compattest_scan_additive.py— additive merge preserves existing manifesttest_status.py— combined health check outputtest_sync.py— cluster file generation + Codex YAMLtest_codex.py—agents/openai.yamlgeneration
Commands
Three slash commands across all platforms: /check, /setup, /fetch.
Command names were chosen to avoid collision with Claude Code built-ins (init, check, sync, list all collide). Skills live in skills/<name>/SKILL.md — not commands/*.md (which is legacy per Claude Code docs).
OpenClaw differences
- Single directory (
~/.openclaw/skills/) for both routers and leaves - Leaf hiding via
disable-model-invocation: trueonly (no directory separation) - Scripts are copied into
openclaw/scripts/(can't reference parent directory after plugin install) - OpenClaw skills use
{baseDir}/../scripts/to reach the bundled scripts
Key design decisions
- Clustering is done by the model, not an algorithm.
scan.pycollects descriptions; the/setupskill instructs the model to group them semantically and write the manifest. No TF-IDF, no scikit-learn, no threshold. scan.pyreports which skills are new (not in manifest) vs already tracked.manifest.jsonis the source of truth. Cluster SKILL.md files are generated artifacts. Never edit clusters directly.- Fetched skills are sandboxed (
disable-model-invocation: true) until explicitly added to a cluster.
Operational lessons
scripts/sync.pydefaults--skills-dirto~/.claude/skills/— always pass it explicitly. Runninguv run sync.pywith no--skills-dirmaterializes ALL cluster routers there, clobbering the project-scoped (~/vault/.claude/skills/) and plugin-scoped (~/Projects/skills/plugins/*/skills/) setups — a bare run once dumped 24 routers globally and blew up token usage until they wererm'd back to the intended 6. For per-cluster edits (add a leaf, setdisable-model-invocation: true, set a routing hint), editmanifest.jsondirectly and hand-write the affected SKILL.md — don't reach for sync.py at all.- Read the platform docs before building, not after. Copying other plugins' patterns instead of the official reference produced bare relative paths, missing manifest metadata (author/license/repository/keywords), legacy
commands/*.mdinstead ofskills/<name>/SKILL.md, and a fabricateduser-invocable: truefield that isn't real. Fetchhttps://code.claude.com/docs/llms.txtfor the index, then read the reference page for the component you're building. - User-facing docs use the short command name. Autocomplete fires on the command (
/check), not the plugin-prefixed form (/skill-tree:check) — README and examples should show/check.
Git
- Git email:
11337994+danielbrodie@users.noreply.github.com(NOTdaniel@users...) - Branch protection enabled on main — no force pushes
- Never put internal names (agent names, private infrastructure) in public commits, PRs, or branches
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

