/memex:lint [--fix]from memex
Audits workspace structural health: stale status, orphan files/folders, unannotated decision supersessions, manifest drift. Read-only; --fix applies safe annotations. Use when the user asks for a health check or after unclean-close warnings.
Ships in memex. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Wikilink rule: Use [[filename]] for every file reference in markdown.
Audit drift and structural integrity, read-only by default. Nine checks, one report.
Run WORKSPACE_ROOT=$(pwd) && echo "$WORKSPACE_ROOT" via Bash, then check for _MANIFEST.md: missing -- "Memex is not initialized. Run /memex:init first." Stop. Present (with or without <!-- memex-managed marker) -- continue.
Parse _MANIFEST.md: Tier 1 table (always-loaded files), Tier 2 sections (domain hub references), Tier 3 table (archived files), Hub Map (domain-to-hub mapping).
Resolve paths via: config table (if present) > convention (memory/) > search.
Run checks in order, collecting WARN (actionable) or INFO (observational) findings.
Read status.md's 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
Flag each match whose referenced older entry isn't annotated with ~~strikethrough~~.
Only flag explicit override relationships -- don't infer contradictions from topical similarity.
For each domain in the Hub Map:
<hub-folder>/_CLOSETS.md's ## [[stem]] headings as registered members.[domain]-index.md): registered = union of the file table's [[wikilinks]] and closets entries..md files on disk in that domain's folder, excluding the hub index (if any), _CLOSETS.md, and _CLOSETS-archive.md.Skip memory/, scratch/ -- Tier 1, managed by manifest, not hubs.
For each workspace-root subdirectory, skip: known infrastructure paths (.git, .claude, .obsidian, .memex, memex, node_modules, __pycache__, .venv, venv, dist, build); known Memex folders (memory, scratch); existing hub folders (any Hub Map row's wikilink resolves into it); folders with zero .md files. Whatever's left is an orphan folder.
Read status.md's ## Blocked (or ## What's Blocked) section; for each item, count sessions in session-log.md (all entries) mentioning the blocker text or close paraphrases, unresolved.
Blocked is empty / says "None".For each [[*-index]] row in the Hub Map, check whether <hub-folder>/_CLOSETS.md exists; also check memory/_CLOSETS.md.
_CLOSETS.md.memory/_CLOSETS.md is missing on a memex-managed:2.1.x or newer workspace.Skip without a <!-- memex-managed marker (compatible mode predates v2); also skip the memory/ check pre-2.1 (Tier 1 closets shipped in 2.1.0).
Run ${CLAUDE_SKILL_DIR}/scripts/extract-graph.py --check; it exits 1 with a 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.Skip without a <!-- memex-managed marker (compatible mode).
Verify each Hub Map, Tier 1, and Tier 3 row's 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).
Include only lines whose 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 nine checks and emit an updated report. If fixes weren't requested, stop after Step 5 -- do not prompt.
--fix arrives via $ARGUMENTS; without it lint never writes (see Step 6).extract-graph.py passes the graph check silently (typed edges are opt-in) -- don't read PASS as proof the graph is healthy unless the script ran.session-log.md -- missing/empty log means blockers can't be aged; passes by default -- not "no stale blockers".<!-- memex-managed marker means pre-v2; skipping avoids nagging about conventions it never adopted./memex:reindex, /memex:resummarize, or /memex:consolidate.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub skyfox-io/memex --plugin memex17 skills in this plugin
/add-domainAdds a new domain folder with a hub index and wires it into `_MANIFEST.md` -- for a new topic area, or splitting an existing domain into its own folder.
/archiveMoves a file from active (Tier 2) to archived (Tier 3) so Memex stops loading it automatically -- for a wrapped project, a stale reference, or a superseded file. The file stays on disk; only its manifest tier and hub status change.
/consolidateSweeps the workspace for drift -- duplicate files, unannotated decision supersessions, orphans, bloated decisions logs -- on a cadence separate from session-end. Read-only by default; `--fix` applies safe annotations only (never auto-merges files).
Other plugins' skills for the same job