From memex
Audits workspace structural health including stale status, unannotated superseded decisions, orphan files, manifest drift, and more. Useful before milestones or when workspace feels out of sync.
How this skill is triggered — by the user, by Claude, or both
Slash command
/memex:lint [--fix][--fix]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
**Wikilink rule:** When referencing any file in any markdown content you write or edit, always use `[[filename]]` wikilink format. Never use plain text filenames.
Wikilink rule: When referencing any file in any markdown content you write or edit, always use [[filename]] wikilink format. Never use plain text filenames.
Audit semantic drift and structural integrity. Read-only by default. Eight checks, one report.
Run WORKSPACE_ROOT=$(pwd) && echo "$WORKSPACE_ROOT" via Bash.
Check if _MANIFEST.md exists at the workspace root.
/memex:init first." Stop.<!-- memex-managed marker): Continue.Read _MANIFEST.md. Parse:
Resolve paths via: Config table (if present) > convention (memory/) > search.
Execute each check in order. Collect findings as WARN (actionable) or INFO (observational).
Read status.md. Parse the Last updated: YYYY-MM-DD line.
Last updated line at all.Read decisions.md in full. Scan newer entries for override language referencing earlier entries:
supersedes, replaces, dropped, no longer, instead of, reverses, overrides
For each match, check whether the older entry being referenced is annotated with ~~strikethrough~~.
Do not infer contradictions from topical similarity. Only flag entries where the override relationship is explicit.
For each domain in the Hub Map:
<hub-folder>/_CLOSETS.md. Parse ## [[stem]] headings; those are the registered members.[domain]-index.md): parse the hub's file table for [[wikilinks]]. Treat the union of table entries and closets entries as registered..md files on disk in that domain's folder, excluding the hub index (if any), _CLOSETS.md, and _CLOSETS-archive.md.Skip memory/ and scratch/ -- Tier 1, managed by manifest, not hubs.
Scan workspace-root subdirectories. For each subdirectory:
.git, .claude, .obsidian, .memex, memex, node_modules, __pycache__, .venv, venv, dist, build.memory, scratch..md files.Whatever's left is an orphan folder.
/memex:add-domain <name> to wire it up."Read status.md's ## Blocked (or ## What's Blocked) section. For each item:
session-log.md (all entries).Blocked is empty / says "None".For each [[*-index]] row in the Hub Map, check whether <hub-folder>/_CLOSETS.md exists. Also check whether memory/_CLOSETS.md exists.
_CLOSETS.md. Suggest: "run /memex:reindex to backfill."memory/_CLOSETS.md is missing on a memex-managed:2.1.x or newer workspace. Suggest: "run /memex:reindex --hub memory."Skip if the workspace has no <!-- memex-managed marker (compatible mode predates v2). For pre-2.1 workspaces, skip the memory/ check (Tier 1 closets shipped in 2.1.0).
Run ${CLAUDE_SKILL_DIR}/scripts/extract-graph.py with --check against the workspace. Exits 1 with dangling-edge list if any typed-edge frontmatter (supersedes, superseded-by, blocks, blocked-by, people, projects) targets a missing file.
[[source]] <edge-type> → [[target]] (target file not found).Read <!-- summary-format-version:N --> from _MANIFEST.md.
2./memex:resummarize to upgrade summaries to v2."Skip if the workspace has no <!-- memex-managed marker (compatible mode).
For each row in the Hub Map, Tier 1 table, and Tier 3 table, verify the file exists on disk.
Exact layout:
Memex Health Report
STATUS FRESHNESS: [PASS / N issues]
[WARN] status.md is [N] days stale (last updated [date]) -- fix: run /memex:update
...
DECISION CONSISTENCY: [PASS / N issues]
[WARN] Entry "[date] - [text]" superseded by "[date] - [text]" but not annotated -- fix: add ~~strikethrough~~ and (superseded [date])
...
ORPHAN FILES: [PASS / N issues]
[WARN] [domain]/[file.md] exists on disk but not registered in _CLOSETS.md (or hub table) -- fix: add via /memex:reindex or /memex:archive
[INFO] [[file]] registered but not found on disk -- fix: remove from closets/hub
...
ORPHAN FOLDERS: [PASS / N issues]
[WARN] [folder]/ ([N] markdown files, appears to be about [topic]) -- fix: /memex:add-domain [name] or move files into an existing domain
...
STALE BLOCKERS: [PASS / N issues]
[WARN] Blocker "[text]" unchanged for [N] days across [N] sessions -- fix: resolve or update in status.md
...
CLOSETS COVERAGE: [PASS / N issues]
[WARN] Hub [[hub-name]] is missing _CLOSETS.md -- fix: run /memex:reindex
...
TYPED-EDGE GRAPH: [PASS / N issues]
[WARN] [[source]] `<edge-type>` → [[target]] (target file not found) -- fix: create target file or remove frontmatter reference
...
SUMMARY FORMAT VERSION: [PASS / N issues]
[WARN] Manifest summary-format-version is v1 (or missing) -- fix: run /memex:resummarize to upgrade
...
MANIFEST CONSISTENCY: [PASS / N issues]
[WARN] Hub [[hub-name]] listed in Hub Map but file not found on disk -- fix: create hub or remove from map
[WARN] Tier 1 file [[name]] not found on disk -- fix: create file or remove from manifest
...
Summary: [N] warnings, [M] info across 9 checks
If a category has no findings, the body collapses to a single PASS line.
If all checks pass:
Memex Health Report
All checks passed. Workspace is clean.
Below the report (skip if all checks PASS), append:
Suggested next actions:
• [if SUMMARY FORMAT VERSION failed] Run /memex:resummarize to upgrade summaries.
• [if CLOSETS COVERAGE failed] Run /memex:reindex to backfill _CLOSETS.md files.
• [if SUMMARY FORMAT VERSION and CLOSETS COVERAGE both failed] Run /memex:upgrade to do both in sequence.
• [if DECISION CONSISTENCY failed] Run /memex:lint --fix to annotate superseded decisions.
• [if ORPHAN FILES has dangling registered entries (INFO)] Run /memex:lint --fix to remove dead closets/hub entries.
• [if ORPHAN FOLDERS failed] Run /memex:add-domain <name> for each orphan folder, or move its files into an existing domain.
• [if TYPED-EDGE GRAPH failed] Open the source file and fix or remove the dangling frontmatter reference. Run /memex:reindex to regenerate memory/.graph.md once edges resolve.
• [if STATUS FRESHNESS failed] Run /memex:update to refresh status.md.
• [if STALE BLOCKERS failed] Edit status.md to resolve or restate the blocker.
• [if any wikilink targets in the workspace look broken outside lint's scope] Run /memex:wikilinks to verify [[link]] integrity (lint does not check link targets).
• [if anything else looks like long-standing drift] Run /memex:consolidate for a deeper sweep (dedup, decisions contradictions, orphans, decisions compression).
Only include lines whose triggering check failed. Omit the section entirely if everything passed.
--fix or user confirms)Safe fixes -- apply without per-item confirmation:
~~strikethrough~~ and date pointers.Destructive fixes -- confirm each one individually:
After applying fixes, re-run all eight checks and emit an updated report.
If the user didn't ask for fixes, stop after Step 5. Do not prompt.
--fix (via $ARGUMENTS) or explicit user confirmation, never write a file.[[link]] targets are out of scope -- run /memex:wikilinks.[[wikilinks]] from across the workspace is still an orphan if its hub's closets file doesn't list it. Closets are the source of truth in v2.1+.morning-briefs/ directory dropped at workspace root). Both checks run on every lint.extract-graph.py missing → graph check passes silently. Typed edges are opt-in. If ${CLAUDE_SKILL_DIR}/scripts/extract-graph.py can't be found, the TYPED-EDGE GRAPH category reports PASS, not WARN. Don't read a passing graph check as proof the graph is healthy unless you've confirmed the script ran.session-log.md. If session-log is missing or empty, blockers can't be aged. The check passes by default -- don't conflate that with "no stale blockers".<!-- memex-managed marker, the workspace predates v2 conventions; nagging about _CLOSETS.md would just spam./memex:reindex, /memex:resummarize, or /memex:consolidate -- the footer points at them so the user (or another agent) can decide.npx claudepluginhub skyfox-io/memex --plugin memexSweeps workspace for drift: duplicate files, unannotated decision supersessions, orphans, and bloated decision logs. Read-only by default; --fix applies safe annotations.
Runs vault health diagnostics in 8 categories including schema compliance, orphans, links, three-space boundaries, stale notes, MOC coherence. Quick/full/three-space modes yield FAIL/WARN/PASS reports with fixes.
Audits Claude Code workspaces (walnuts) for maintenance issues like stale tasks, orphan folders, v2 remnants, and unsaved sessions. Surfaces issues one at a time with recommended fixes.