<< All versions

Skill v1.0.0

currentAutomated scan100/100
marinvch/cortex/cortex-audit
──Details
PublishedOctober 25, 2026 at 09:09 AM
Content Hashsha256:805b7edf9d7aad97...
Git SHA2f7d81ed24a5
──Files
Files (1 file, 4.6 KB)
SKILL.md4.6 KBactive
SKILL.md · 71 lines · 4.6 KB

version: "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 forModeDo
a health score, "is my brain healthy", "score my setup"/cortex-audit scoreread 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 graphread GRAPH.md and follow it
anything else: orphans, dead links, misplaced files, a full check/cortex-auditthe 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

  1. Dispatch the auditor. Launch the cortex-auditor subagent (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.

  1. Show the report to the user — findings by category, plus the graph's node/link/dead-link

counts.

  1. Lead with the employer firewall. Per the vault's AGENTS.md (templates/vault-AGENTS.md), day-job content in a home vault 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.

  1. Apply the `[safe]` fixes (these are mechanical + reversible):
  • resolve dead links; wire orphans in (add [[links]] from home.md/a MOC/related notes);
  • add missing frontmatter; move misplaced files to the right PARA folder;
  • mirror unwired skills into .claude/skills/ and add missing AGENTS.md/README.md entries;
  • archive truly-dead files (move to archives/, never delete).
  1. Surface the `[judgment]` calls — redundant merges, "stale or just quiet?", anything ambiguous.

Don't guess; let the user decide, then execute their call.

  1. 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.

All versions