agentleFS
pengqianhanpengqianhan/open-paper-skills/skills/filetree-simple/SKILL.md

filetree-simple

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

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

    Run commands from the target repository root, or pass --repo before the subcommand.

    line 13
  2. Very specific:

    If validation fails, fix every reported entrypoint and rerun generate.

    line 24
  3. Very specific:

    Run lint after generation.

    line 25
  4. Distinctive:

    Run the standard-library test suite after changing the skill:

    line 72

≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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.

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

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

  1. Run:

    python scripts/filetree.py generate
  2. If validation fails, fix every reported entrypoint and rerun generate.
  3. Run lint after generation.

Completion criterion: FILETREE.md contains the complete two-section map and lint exits 0.

Lint

Run:

python scripts/filetree.py lint

lint 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 Files and Main Areas sections.
  • 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 to SKILL.md.
  • An index.md entrypoint starts with an English H1 followed by one plain English sentence of at most 20 words. That sentence becomes the map summary.
  • A SKILL.md entrypoint supplies single-line name and description frontmatter; description follows 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.md or skill SKILL.md entrypoints.
  • 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 -v

Credits

Inspired by nekocode/filetree-skill, an MIT-licensed Claude Code plugin.

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.