agentleFS
danielbrodiedanielbrodie/skill-tree/CLAUDE.md

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
  1. Very specific:

    Never use bare relative paths like uv run scripts/foo.py — they only work during development.

    line 21
  2. Distinctive:

    Never put internal names (agent names, private infrastructure) in public commits, PRs, or branches

    line 68

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
CLAUDE.md

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). The name field 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 --codex flag
  • Python scripts in scripts/ are the shared engine — all platforms invoke them via uv 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 command prompt fields 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/ -v

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
  • test_sync.py — cluster file generation + Codex YAML
  • test_codex.py — agents/openai.yaml generation

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: true only (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.py collects descriptions; the /setup skill instructs the model to group them semantically and write the manifest. No TF-IDF, no scikit-learn, no threshold.
  • scan.py reports which skills are new (not in manifest) vs already tracked.
  • manifest.json is 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.py defaults --skills-dir to ~/.claude/skills/ — always pass it explicitly. Running uv run sync.py with no --skills-dir materializes 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 were rm'd back to the intended 6. For per-cluster edits (add a leaf, set disable-model-invocation: true, set a routing hint), edit manifest.json directly 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/*.md instead of skills/<name>/SKILL.md, and a fabricated user-invocable: true field that isn't real. Fetch https://code.claude.com/docs/llms.txt for 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 (NOT daniel@users...)
  • Branch protection enabled on main — no force pushes
  • Never put internal names (agent names, private infrastructure) in public commits, PRs, or branches

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.