agentleFS
LuciowayLucioway/way-stack/skills/vault-index/SKILL.md

vault-index

Skill0 starsChanged 2 months agoMITView on GitHub

Use when an agent must navigate a vault, or when the user says 'index the vault', 'refresh indexes', 'add index.md everywhere'. Writes an auto-generated index block into an index.md at every folder level; hand-written text outside the markers is preserved.

2 other projects use a version of this.

Adopted by

Most recently taken up by

The file

Files
SKILL.md

vault-index — an index.md at every folder level

When to use

Agents navigate a vault by reading, not by grepping blind. One index.md per folder (a short list of subfolders + notes with a one-line title each) lets an agent walk top-down and open only what it needs — Chase-style progressive disclosure. Run it after bulk imports, or weekly.

Run

S="${CLAUDE_PLUGIN_ROOT:-$HOME/.claude/plugins/way-stack}/skills/vault-index/scripts/vault_index.py"
python3 "$S" --vault ~/Workspace --dry     # preview: lists CREATE / UPDATE lines
python3 "$S" --vault ~/Workspace           # apply
  • Vault path: --vault PATH or env WAY_VAULT. Neither → the script errors with usage.
  • --follow-symlink NAME (repeatable): descend into that symlinked folder. Default none: symlinked folders are only listed.
  • Output ends with changes=N written=M notes_total=K. A second run must report changes=0 (idempotent).

Rules the script follows

  • Writes ONLY between <!-- auto-index:start --> and <!-- auto-index:end -->. Text you wrote outside the markers is preserved. An existing index.md without markers gets the block appended.
  • Missing index.md → created with a # <folder> header.
  • A pre-existing index.md is copied to index.md.bak before its first rewrite.
  • Skips .obsidian .git node_modules .trash graphify-out and dotfiles.
  • A subfolder that is a git repo (contains .git) is listed as "repo, not indexed" and never entered.
  • A folder with more than 300 notes is summarized by month instead of listed.

Schedule weekly (optional)

# cron: Sunday 07:00
(crontab -l 2>/dev/null; echo '0 7 * * 0 WAY_VAULT=$HOME/Workspace python3 $HOME/.claude/plugins/way-stack/skills/vault-index/scripts/vault_index.py >> $HOME/.claude/vault-index.log 2>&1') | crontab -

On macOS prefer launchd if cron lacks disk access to your vault folder.

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.