Agent skill

update_vault_index

Keep vault_index.md synchronized with current vault structure

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/update-vault-index

SKILL.md

📇 Update Vault Index Skill

Automatically sync .claude/vault_index.md with your actual MOCs/, Projects/, and Reading/ directories.


PURPOSE

The vault index is the entry point to your research graph (per CLAUDE.md rules). It must stay current to reflect:

  • All MOCs (research areas)
  • All projects categorized by status (Seed/Idea/Active/Writing/Finished)
  • Quick access to recent papers

WORKFLOW

0. Read last-run timestamp

Read .claude/vault_maintanance.md and note the update_vault_index: timestamp.

Default: incremental scan — only process files modified after the update_vault_index: timestamp. Use find Projects/ MOCs/ -newer <reference_file> to identify changed files. To use a reference file: touch -t YYYYMMDDHHMI /tmp/vault_index_ref && find ... -newer /tmp/vault_index_ref

  • If no files were modified: skip the scan and report "Index already up to date."
  • Only run a full rescan if the user explicitly requests it or no timestamp exists yet.
  • Always do a full scan of Projects/ for status categorization even in incremental mode (status may have changed without file modification time changing).

1. Scan vault structure

Scan directories:

  • MOCs/ → extract all MOC file names
  • Projects/ → extract all project file names + status field
  • Reading/ → optional: list recent papers (last 5-10)

Extract metadata:

  • For each project: read YAML frontmatter to get status field
  • For each MOC: extract 1-line description if present

2. Categorize projects

Group projects by status (maintain this order):

  • Seed: status = seed (early-stage ideas generated by Claude)
  • Idea: status = idea (refined projects approved by human)
  • Active: status = active (actively working on it)
  • Writing: status = writing (writing paper and finishing project)
  • Finished: status = finished (completed)

Sort alphabetically within each group.

3. Build index sections

Structure (preserve exactly):

# Vault Index

## Research Areas (MOCs)
- [[MOC Name]] - brief description (1 line)
- ...

## Seed Projects
- [[Project Name]] - brief description (1 line)
- ...

## Idea Projects
- [[Project Name]] - brief description (1 line)
- ...

## Active Projects
- [[Project Name]] - brief description (1 line)
- ...

## Writing Projects
- [[Project Name]] - brief description (1 line)
- ...

## Finished Projects
- [[Project Name]] - brief description (1 line)
- ...

Get descriptions from:

  • MOC files: first non-heading paragraph or subtitle
  • Project files: "Seed Idea" or "Current Working Idea" field
  • Keep descriptions to 1 line max

4. Generate minimal descriptions

Rules:

  • Extract from actual file content (don't invent)
  • Max 1 line (70 chars)
  • Use present tense
  • Keep factual, avoid marketing language

Example:

- [[Persona Fingerprinting to Prevent Emergent Misalignment]] -
  Preserve identity fingerprint during finetuning to prevent misalignment

5. Update vault_index.md

  • Replace entire file (sections only, no other changes)
  • Preserve markdown formatting
  • Verify all wiki links use exact file names
  • Verify no broken links

6. Update vault_maintanance.md

After writing vault_index.md:

  • Run date via Bash to get the current system time
  • Read .claude/vault_maintanance.md
  • Update update_vault_index: line to current date and time in format DD-MM-YYYY HH:MM
  • Reset papers_since_vault_index: to 0
  • Reset projects_since_vault_index: to 0
  • Write the updated file

Example update:

update_vault_index: 10-02-2026 14:35

7. Verify output

✅ All MOCs present with descriptions ✅ All seed projects listed (status: seed) ✅ All idea projects listed (status: idea) ✅ All active projects listed (status: active) ✅ All writing projects listed (status: writing) ✅ All finished projects listed (status: finished) ✅ Projects in correct order (Seed → Idea → Active → Writing → Finished) ✅ Alphabetical within each section ✅ Wiki links match exact file names in [[brackets]] ✅ No orphan files referenced


TOKEN EFFICIENCY

Optimizations:

  • Read only YAML frontmatter + 1-2 lines per file
  • Use grep to extract status field: status:\s*
  • Single pass through each directory
  • No deep content analysis
  • Use file listing instead of reading metadata separately

Fast execution:

  • ~50-100 tokens for full vault with 20+ projects

OUTPUT RULES

  • Minimal, structural updates only
  • One-line descriptions max
  • Bullet format only
  • No prose explanation needed in output
  • Example: "Index updated: 4 MOCs, 5 seed, 0 idea, 1 active, 0 writing, 0 finished"

SELF-CHECK

✅ Did I read all MOCs, projects from actual directories? ✅ Did I extract status field from each project file? ✅ Did I categorize correctly (Seed/Idea/Active/Writing/Finished)? ✅ Did I maintain correct section order (Seed → Idea → Active → Writing → Finished)? ✅ Did I use exact file names in [[wiki links]]? ✅ Did I get descriptions from actual file content? ✅ Did I keep descriptions to 1 line max? ✅ Did I verify no broken links in output? ✅ Did I preserve vault_index.md structure exactly? ✅ Did I update vault_maintanance.md with current timestamp?

Expand your agent's capabilities with these related and highly-rated skills.

Didn't find tool you were looking for?

Be as detailed as possible for better results