Skill v1.0.0
currentAutomated scan100/100version: "1.0.0" name: cortex-audit description: Vault health in one ritual — find and fix orphans, dead links, stale, duplicate or misplaced files and privacy leaks; score gives the read-only four-layer score, graph rebuilds the navigator. Triggers — "cortex audit", "fix dead links", "score my vault", "rebuild the graph", "what needs a MOC". effort: high metadata: capability: strong
/cortex-audit — dispatch the auditor, then fix
One command for a complete health pass. It delegates the scan to the cortex-auditor custom subagent (agents/cortex-auditor.md), which runs read-only in its own context so the heavy globbing/link-mapping never bloats this conversation — then you apply the fixes here.
Three modes, one ritual
| Asked for | Mode | Do | |
|---|---|---|---|
| a health score, "is my brain healthy", "score my setup" | /cortex-audit score | read SCORE.md and follow it. It scores content and writes nothing but an optional saved report | |
| rebuild the graph, "what needs a MOC", "tidy the vault" | /cortex-audit graph | read GRAPH.md and follow it | |
| anything else: orphans, dead links, misplaced files, a full check | /cortex-audit | the steps below. They find and fix structure |
/audit and /reindex were separate rituals until 2.42.0. Someone who types either name wants score or graph.
What to do
- Dispatch the auditor. Launch the
cortex-auditorsubagent (via the Agent/Task tool,
subagent_type: cortex-auditor) with the vault root as its target. It returns one ranked findings report: structural categories (orphans, dead links, stale, duplicate, misplaced, integrity/privacy, skill-wiring drift) + a four-layer content-health signal. Each finding is tagged [safe] or [judgment]. If the subagent is unavailable, read `agents/cortex-auditor.md` and run its scan inline — it holds the categories, the method and the output shape, so the report comes out the same either way. Only the isolation is lost.
- Show the report to the user — findings by category, plus the graph's node/link/dead-link
counts.
- Lead with the employer firewall. Per the vault's
AGENTS.md(templates/vault-AGENTS.md), day-job content in ahomevault is a
critical finding, not a style nit — report it above the structural findings and the health signal, naming file and line. The fix is to move the file into a gitignored archives/<name>-YYYY-MM-DD/ folder and confirm with git check-ignore -v that it landed there ignored. Treat it as [judgment]: show it, don't sanitize-and-file, and don't act until the user decides. If the report is clean on this, say so in one line and move on.
- Apply the `[safe]` fixes (these are mechanical + reversible):
- resolve dead links; wire orphans in (add
[[links]]fromhome.md/a MOC/related notes); - add missing frontmatter; move misplaced files to the right PARA folder;
- mirror unwired skills into
.claude/skills/and add missingAGENTS.md/README.mdentries; - archive truly-dead files (
movetoarchives/, never delete).
- Surface the `[judgment]` calls — redundant merges, "stale or just quiet?", anything ambiguous.
Don't guess; let the user decide, then execute their call.
- Re-run `bash tools/cortex.sh` to confirm the graph improved (fewer orphans,
0 dead), and
report: findings by category, what you fixed, and what's left for the user to decide.
Don't
- Never delete — move to
archives/. Deletion is the user's call only. - Keep committed files data-free — never write personal/business facts into a shared file.
- The subagent is read-only by design; all writes happen here, only after the report is shown.
Autonomy
Default: auto-apply [safe] fixes, pause for the user on every [judgment] call. If the user asks to approve each edit, switch to proposing all fixes first.
After a cleanup, the graph mode regenerates the views. Targets this vault — /optimize-context is the same instinct pointed at another repo.
When the floor is not met
The scan itself is mechanical — globbing, link maps, git check-ignore. What needs the floor is ranking the findings and calling [safe] versus [judgment], and mistaking a judgment call for a safe one means an automatic fix to something that needed a human.
Below the floor: run it with every finding treated as `[judgment]` — report all of them and apply none automatically. The scan is still worth having; only the autonomy is withdrawn. The subagent fallback in step 1 is a separate concern: that is about the harness having subagents at all, not about model strength.