filetree-simple
Skill2 starsChanged 5 months agoMITView on GitHub
Generate or lint a compact top-level FILETREE.md navigation map. Use when repository structure changes or FILETREE.md needs creation, regeneration, or validation.
In this repository20 other files it gives its agents.
- codex-paper-figure-skillSkill
- discover-academic-skillsSkill
- drawio-paperSkill
- explain-anything-htmlSkill
- explain-paper-htmlSkill
- human-cognition-cacheSkill
- karpathy-coding-rulesSkill
- map-then-territorySkill
- okf-repo-organizerSkill
- paper-searchSkill
- paper-wiki-managerSkill
- project-dispatchSkill
- research-bibleSkill
- research-project-managerSkill
- sell-research-honestlySkill
- session-handoffSkill
- skill-organizerSkill
- task-file-builderSkill
- uv-envSkill
- writing-great-promptSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are 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.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
Run commands from the target repository root, or pass --repo before the subcommand.
- Very specific: line 24
If validation fails, fix every reported entrypoint and rerun generate.
- Very specific: line 25
Run lint after generation.
- Distinctive: line 72
Run the standard-library test suite after changing the skill:
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill 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
Filetree
Generate FILETREE.md as a deterministic cold-start map: core repository files
plus public top-level areas. Each area owns its meaning in index.md; the map
links to that entrypoint and stops there.
Run commands from the target repository root, or pass --repo before the
subcommand. The helper is scripts/filetree.py.
Generate
Run:
python scripts/filetree.py generate- If validation fails, fix every reported entrypoint and rerun
generate. - Run
lintafter generation.
Completion criterion: FILETREE.md contains the complete two-section map and
lint exits 0.
Lint
Run:
python scripts/filetree.py lintlint builds the expected map in memory and compares it with FILETREE.md.
It never writes files. Exit 0 means current; exit 1 means invalid inputs or
drift that generate must resolve.
Contract
- Output is English Markdown with
Core FilesandMain Areassections. - Core files use the script's stable ordered descriptions and appear when present as regular files.
- A public area is a non-hidden direct child directory outside the conventional temporary-directory exclusions in the script.
- A public area uses
index.md. Only a skill directory may fall back toSKILL.md. - An
index.mdentrypoint starts with an English H1 followed by one plain English sentence of at most 20 words. That sentence becomes the map summary. - A
SKILL.mdentrypoint supplies single-linenameanddescriptionfrontmatter;descriptionfollows the same summary rules. - Top-level directory symlinks are rejected. The generator does not traverse nested directories.
- Generation validates the complete map before atomically replacing
FILETREE.md; a failed run leaves the existing file unchanged.
Scope, Inputs, Outputs, and Limitations
- Scope: compact top-level navigation, not an exhaustive file inventory or content-integrity manifest.
- Inputs: the target root, conventional core files, and top-level
index.mdor skillSKILL.mdentrypoints. - Output: one generated
FILETREE.md; no sidecar manifest or hashes. - Runtime: Python 3.9+ standard library; Git and third-party packages are not required.
- Limitations: full OKF conformance, nested bundle navigation, file history, and content integrity remain separate concerns.
Run the standard-library test suite after changing the skill:
python -m unittest discover -s tests -vCredits
Inspired by nekocode/filetree-skill, an MIT-licensed Claude Code plugin.
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.

