audit-vault
Skill0 starsChanged 9 days agoMITView on GitHub
Read-only audit of the Obsidian vault for broken wikilinks, invalid tags, frontmatter schema, orphan notes, file naming, and empty files. Use when user says 'audit vault', 'vault health', 'check my notes', or periodically for hygiene.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- audit-pathsSkill
- clean-cachesSkill
- git-statusSkill
- health-checkSkill
- ocrSkill
- update-dependenciesSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 16
full: every check below except relevance - Very specific: line 35
Run audit_all.sh relevance.
- Very specific: line 37
Add its findings to the table as Warning, category RELEVANCE.
- Very specific: line 41
Every finding line starts with its severity: [CRITICAL], [WARNING], or [COSMETIC].
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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
Audit Vault
Read-only: never edit, rename, or delete vault files. Report only. Fix issues only if the user asks afterwards.
Modes
Parse the argument; no argument means full.
full: every check below exceptrelevancetags: frontmatter tags (valid = the backticked tags on the- **Tags:**line of the vault'sCLAUDE.md, plusjournalandindex) and inline#tagsin note bodiesfrontmatter: schema of30_knowledge/notes and articles, and tags on00_inbox/noteslinks: broken wikilinks and duplicate basenamesorphans: orphan notes (no inbound link and no topic tag), near-empty files, snake_case file names, loose notes at the top of30_knowledge/. Date-named notes (YYYY-MM-DD.md) are records, so they are not orphan-checked. The read-only10_journal/is skipped for orphans and near-empty files.relevance: opt-in tag relevance review (see below)
Execution
bash ~/.claude/skills/audit-vault/scripts/audit_all.sh <mode>The wrapper runs audit_vault.py, which uses only the Python standard library. The vault path comes from VAULT (default ~/Documents/obsidian). Run Python only as python3 -B -I so no __pycache__ lands in the skills repo.
Tag Relevance Review (opt-in)
The script validates tags structurally. It cannot judge whether a tag fits a note, so full and tags skip that. Run it only for relevance:
- Run
audit_all.sh relevance. It prints one line per30_knowledge/note:path | tags | description | first H1(about 40 KB in total). - Do not read the notes yourself. Pass the whole list to one subagent. Ask it to flag only clear mismatches (a robotics paper tagged
finance) and clearly missing valid tags (an AI paper withoutai), judging from the line alone. It should returnpath | tag | reason, and skip anything uncertain. - Add its findings to the table as Warning, category
RELEVANCE.
Presenting Results
Every finding line starts with its severity: [CRITICAL], [WARNING], or [COSMETIC]. Present them as a table grouped by severity:
| Severity | Category | Issue | File |
- Critical:
BROKENwikilinks in note bodies (outside10_journal/), notes with no frontmatter,INVALIDfrontmatter tags - Warning:
MISSINGor empty required fields. Notes in30_knowledge/needtags,description. Articles (have bothsource:andauthor:) needtitle,source,author,published,created,description,tags. Fields are required, not optional.MALFORMEDtags (an unclosed[list, or items starting with#, which YAML reads as comments)BROKENlinks in frontmatter, such as an author link with no noteBODYTAGin notes that are not clipped articlesORPHAN,NAMING,TOPLEVEL,DUPLICATEbasenames,MISSING-DIR
- Cosmetic:
EMPTYfiles,QUOTEDtags,BODYTAGin clipped articles or60_archive/, invalid or malformed tags in60_archive/, a long note withoutsummary,BROKENlinks in10_journal/(read-only: restore the target or leave the link)
For each finding, suggest a specific fix (for example "Fill published: from the source page", "Create the target note or remove the link", "Move the note into a topic folder"). If nothing is found, confirm the vault is healthy.
A line starting [ERROR] <check>: means that check crashed, and [ERROR] load: <file> means a file could not be read. The other checks still ran. Report either as a tooling failure, not a vault issue.
Troubleshooting
- "Vault not found" (exit 2):
~/Documents/obsidiandoes not exist at that path. SetVAULT=/actual/pathand rerun. MISSING-DIRwarning:30_knowledge/or00_inbox/is missing, so that check was skipped. Confirm the vault path.NO-TAG-LISTcritical: the vault'sCLAUDE.mdhas no- **Tags:**line with backticked tags, so tag and orphan results are not meaningful. Restore that line — it is the vault's only tag vocabulary.- A
BROKENlink you believe is fine: links are matched case-insensitively by name, and path links ([[folder/note]]) by path suffix. Dot-folders (.obsidian,.trash) are not indexed, and a note moved out of the linked path counts as broken. Open the link in Obsidian to confirm. Code spans and fenced blocks are ignored. [ERROR] load:or[ERROR] <check>:: one file is unreadable or one check failed. Rerun just that mode to isolate it. Do not "fix" the vault in response.
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.

