From the-ai-brain
Health check - counts notes, finds orphans, checks consistency. Use when the user says "vault audit", "health check", "check vault", "find orphans", "vault stats", "audit", or wants to understand the state of their vault.
How this skill is triggered — by the user, by Claude, or both
Slash command
/the-ai-brain:brain-vault-auditclaude-sonnet-4-6The summary Claude sees in its skill listing — used to decide when to auto-load this skill
<objective>
Read brain.yaml to get the expected vault structure:
vault.structure.* for expected directoriespreferences.frontmatter for whether frontmatter is expectedpreferences.wikilinks for whether wikilinks are expectedpreferences.format for format type (obsidian/plain)Count total .md files in each top-level directory and subdirectory:
Human/
Daily/ -- {count} files
Projects/ -- {count} files
Archive/ -- {count} files
(other)/ -- {count} files
Machine/
Session-Logs/ -- {count} files
Memory/ -- {count} files
Rules/ -- {count} files
Templates/ -- {count} files
(other)/ -- {count} files
Total: -- {count} files
Also note any directories that exist but are not defined in brain.yaml.
If Obsidian CLI is available (run obsidian version to check), use the built-in orphan command:
obsidian orphans format=json
This returns a JSON array of file paths with zero incoming links. Parse and display grouped by directory.
If Obsidian CLI is not available, fall back to the manual approach below:
An orphaned file is one that has no incoming [[wikilinks]] from any other file in the vault.
.md files in the vault.[[link name]] references.Exceptions (not orphans):
Human/Daily/) -- these are date-indexed, not link-indexedMachine/Session-Logs/) -- these are date-indexedbrain.yaml, CLAUDE.md, etc.)Machine/Templates/)Machine/Memory/) -- these are system filesMachine/Rules/) -- these are system filesReport orphans grouped by directory.
For every .md file that should have frontmatter (per preferences.frontmatter):
---).date, tags, type.preferences.date_format.Report:
Identify files not modified in 90+ days:
.md files.Exceptions:
brain.yaml (configuration, not content)Group stale files by directory and sort by age (oldest first).
Scan all files for tags (both YAML frontmatter tags: and inline #tag format):
#proejct vs #project).Compare the actual vault directory structure against brain.yaml vault.structure:
Output a formatted report:
# Vault Health Report
**Date:** {YYYY-MM-DD}
**Vault:** {vault path from brain.yaml}
## File Census
| Directory | Files | Notes |
|-----------|-------|-------|
| Human/Daily | {N} | |
| Human/Projects | {N} | |
| ... | | |
| **Total** | **{N}** | |
## Orphaned Files ({count})
{list of orphaned files, grouped by directory}
{or "No orphans found."}
## Frontmatter Issues ({count})
- `{path}` -- {issue description}
{or "All files have valid frontmatter."}
## Stale Files ({count}, >90 days)
- `{path}` -- last modified {date} ({N} days ago)
{or "No stale files found."}
## Tag Analysis
**Total unique tags:** {N}
**Most used:** {tag} ({N}), {tag} ({N}), ...
**Low usage (<3):** {tag} ({N}), {tag} ({N}), ...
**Possible typos:** {tag} -- did you mean {similar tag}?
## Structure Validation
- Missing directories: {list or "None"}
- Extra directories: {list or "None"}
- Empty directories: {list or "None"}
## Overall Health: {Good | Fair | Needs Attention}
{1-2 sentence summary of vault health}
After presenting the report, offer actionable suggestions:
Wait for user direction before taking any action.
- This is a read-only operation. Do NOT modify any files unless the user explicitly asks. - Report findings factually without judgment -- the user decides what to fix. - Daily notes and session logs are exempt from orphan detection. - Memory and rules files are exempt from orphan detection. - Be efficient with file reads -- use glob patterns and grep rather than reading every file in full. - If the vault is very large (500+ files), warn the user that the audit may take a moment. - Save the report to `Machine/vault-audit-{YYYY-MM-DD}.md` only if the user asks.<success_criteria>
Guides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.
npx claudepluginhub cfircoo/the-ai-brain --plugin the-ai-brain