Memorb Lint Skill
Deterministic Obsidian Link Protection
This skill uses the shipped read-only helper at scripts/lint-vault-links.js beside this SKILL.md. It parses active Markdown notes under memorbs/ (excluding uninstantiated Templates/), validates Obsidian wikilinks, and rejects bare internal note paths such as memorbs/Long-Term/People/Alex.md. A bare path looks readable but creates no Obsidian graph edge and will not reliably update when a note moves.
When the user has moved, renamed, reorganized, or manually edited vault notes, first locate this skill's directory and run the helper through terminal:
node "{memorb-lint skill directory}/scripts/lint-vault-links.js" "$VAULT"
The helper is read-only. It reports BROKEN_WIKILINK, AMBIGUOUS_WIKILINK, and BARE_INTERNAL_PATH with file paths and line numbers; it never rewrites user files.
Bundle Orb Awareness
When scanning directories under memorbs/Long-Term/ or memorbs/HQ/Core/, memorbs/HQ/Belief/:
- A folder whose name matches an existing
{name}/{name}.md is a valid bundle orb — treat the inner .md as the orb page. Do not flag the folder as an orphan or structural error.
- A folder that contains no same-name
.md file (e.g. memorbs/Long-Term/People/Acme/ with no Acme.md inside) is a genuine orphan — flag it for review.
- A plain
.md file at {base}/{name}.md is a plain orb — check normally.
Apply this check whenever scanning for orphan pages, broken links, or unregistered entries.
Order of operations
- Resolve
$VAULT, then run the deterministic link helper before manually inspecting the vault. Record every BROKEN_WIKILINK, AMBIGUOUS_WIKILINK, and BARE_INTERNAL_PATH result.
- Present the link report to the user grouped by affected note. Explain the proposed conversion for each bare path (
memorbs/... → [[memorbs/...]]) and the intended target for each broken link. Do not rewrite links, move files, or guess ambiguous targets before the user confirms the proposed repair set.
- After the user confirms, repair only the approved notes. Prefer canonical outgoing links: an event orb links to its People, Projects, Orgs, or Island; Obsidian derives the backlink. Do not add duplicated reciprocal links solely to satisfy a manual two-way rule.
- Re-run the helper. Completion requires zero link-helper errors for the selected scope; report remaining errors or warnings explicitly.
- List every file under
memorbs/Long-Term/, memorbs/HQ/Core, and memorbs/HQ/Belief, then pick 3-5 pages at random and read them closely.
- Go down the checklist below, judging each item against the MUSTY retirement criteria:
| Check |
MUSTY letter |
What it means |
| Contradictory / misleading |
M - Misleading |
Two source pages tell different stories about the same person or project; use log.md only to locate the linked pages, never as the factual authority |
| Broken / malformed |
U - Ugly |
Formatting has fallen apart, links are all dead, or the page is an orphan (nothing anywhere in the vault points a [[link]] at it) |
| Superseded / finished |
S - Superseded |
The entity behind the whole page is gone (project shipped and closed, person left with no further contact) ➔ report it and hand it to memorb-forgetter to archive |
| Too little value / cold memory |
T - Trivial |
recall_count is very low (say <2) and last_recalled is very old ➔ report it and hand it to memorb-forgetter to archive |
| Stranded attachment |
U - Ugly |
A bundle folder holds attachments but no same-named {name}.md body ➔ the attachments have lost the orb they belonged to; report for handling |
| Media file in the vault |
Y - Your collection doesn't need |
Audio or video has appeared under memorbs/ (.m4a / .mp3 / .wav / .mp4 …) ➔ only documents belong in the vault; report it, move it out, and record its location in the orb body |
| Out of scope |
Y - Your collection doesn't need |
The content is not something the memory vault is here to hold; report it for a human decision |
| Unregistered alias (Authority) |
authority control |
A linked source page uses an entity term that appears in no page's aliases list ➔ report it as a potential split note |
| Missing page / missing canonical link |
structural integrity |
Source pages repeatedly refer to an entity with no page of its own, or a processed event has no outgoing link to any relevant People, Projects, Orgs, or Island page. Never require an entity page to hand-maintain a list of every event that links to it; Obsidian derives those backlinks. |
| Broken journal |
structural integrity |
A meaningful entry lacks timestamp, type, linked source pages, or a short operational note; do not require daily entries or signal lines |
- Bring the user a list of proposals to confirm:
- Link repairs ➔ show the exact planned wikilink replacement or target before editing; repair only the notes the user approves.
- Page fixes and expansions ➔ repair directly only after the link-protection report is clean for the selected scope.
- Page retirement and archiving ➔ get the user's confirmation, then call
memorb-forgetter to perform the move into memorbs/Dump/ and rewrite the wiki links automatically.
- Do not append lint-only fixes to
memorbs/log.md. If a lint finding leads to a meaningful archive or other memory event, that executor records the corresponding journal entry.
Side checks (optional)
- Whether
memorbs/HQ/persona.md plus memorbs/HQ/identity.md exceed 100 lines combined (the Hot Cache ceiling)
- Whether the
.claude/skills/ router table matches the actual directory (see writing-memorb-skills)
1---2name: memorb-lint3description: Wiki Lint workflow: a health check over the memory vault that surfaces contradictions, stale pages, orphans, missing pages, broken wikilinks, and bare internal paths. Offer to run it before dream-studio or after manual moves/renames. Triggers: tidy up memory, check the second brain, health check, fix links, moved folder, renamed note, does memory need updating, 整理 memory, 檢查第二大腦, 健檢, 修復連結, 資料夾搬移, 筆記改名, memory 有沒有要更新的.4---56# Memorb Lint Skill78## Deterministic Obsidian Link Protection910This skill uses the shipped read-only helper at `scripts/lint-vault-links.js` beside this `SKILL.md`. It parses active Markdown notes under `memorbs/` (excluding uninstantiated `Templates/`), validates Obsidian wikilinks, and rejects bare internal note paths such as `memorbs/Long-Term/People/Alex.md`. A bare path looks readable but creates no Obsidian graph edge and will not reliably update when a note moves.1112When the user has moved, renamed, reorganized, or manually edited vault notes, first locate this skill's directory and run the helper through `terminal`:1314```bash15node "{memorb-lint skill directory}/scripts/lint-vault-links.js" "$VAULT"16```1718The helper is **read-only**. It reports `BROKEN_WIKILINK`, `AMBIGUOUS_WIKILINK`, and `BARE_INTERNAL_PATH` with file paths and line numbers; it never rewrites user files.1920## Bundle Orb Awareness2122When scanning directories under `memorbs/Long-Term/` or `memorbs/HQ/Core/`, `memorbs/HQ/Belief/`:23- A **folder** whose name matches an existing `{name}/{name}.md` is a **valid bundle orb** — treat the inner `.md` as the orb page. Do not flag the folder as an orphan or structural error.24- A **folder** that contains no same-name `.md` file (e.g. `memorbs/Long-Term/People/Acme/` with no `Acme.md` inside) is a **genuine orphan** — flag it for review.25- A **plain `.md` file** at `{base}/{name}.md` is a plain orb — check normally.2627Apply this check whenever scanning for orphan pages, broken links, or unregistered entries.2829## Order of operations30311. Resolve `$VAULT`, then run the deterministic link helper before manually inspecting the vault. Record every `BROKEN_WIKILINK`, `AMBIGUOUS_WIKILINK`, and `BARE_INTERNAL_PATH` result.322. Present the link report to the user grouped by affected note. Explain the proposed conversion for each bare path (`memorbs/...` → `[[memorbs/...]]`) and the intended target for each broken link. **Do not rewrite links, move files, or guess ambiguous targets before the user confirms the proposed repair set.**333. After the user confirms, repair only the approved notes. Prefer canonical outgoing links: an event orb links to its People, Projects, Orgs, or Island; Obsidian derives the backlink. Do not add duplicated reciprocal links solely to satisfy a manual two-way rule.344. Re-run the helper. Completion requires zero link-helper errors for the selected scope; report remaining errors or warnings explicitly.355. List every file under `memorbs/Long-Term/`, `memorbs/HQ/Core`, and `memorbs/HQ/Belief`, then pick 3-5 pages at random and read them closely.366. Go down the checklist below, judging each item against the **MUSTY retirement criteria**:3738| Check | MUSTY letter | What it means |39|--------|-----------|------|40| Contradictory / misleading | **M** - Misleading | Two source pages tell different stories about the same person or project; use `log.md` only to locate the linked pages, never as the factual authority |41| Broken / malformed | **U** - Ugly | Formatting has fallen apart, links are all dead, or the page is an orphan (nothing anywhere in the vault points a `[[link]]` at it) |42| Superseded / finished | **S** - Superseded | The entity behind the whole page is gone (project shipped and closed, person left with no further contact) ➔ **report it and hand it to `memorb-forgetter` to archive** |43| Too little value / cold memory | **T** - Trivial | `recall_count` is very low (say <2) and `last_recalled` is very old ➔ **report it and hand it to `memorb-forgetter` to archive** |44| Stranded attachment | **U** - Ugly | A bundle folder holds attachments but no same-named `{name}.md` body ➔ the attachments have lost the orb they belonged to; report for handling |45| Media file in the vault | **Y** - Your collection doesn't need | Audio or video has appeared under `memorbs/` (`.m4a` / `.mp3` / `.wav` / `.mp4` …) ➔ only documents belong in the vault; report it, move it out, and record its location in the orb body |46| Out of scope | **Y** - Your collection doesn't need | The content is not something the memory vault is here to hold; report it for a human decision |47| Unregistered alias (Authority) | authority control | A linked source page uses an entity term that appears in no page's `aliases` list ➔ report it as a potential split note |48| Missing page / missing canonical link | structural integrity | Source pages repeatedly refer to an entity with no page of its own, or a processed event has no outgoing link to any relevant `People`, `Projects`, `Orgs`, or Island page. Never require an entity page to hand-maintain a list of every event that links to it; Obsidian derives those backlinks. |49| Broken journal | structural integrity | A meaningful entry lacks timestamp, type, linked source pages, or a short operational note; do not require daily entries or signal lines |50517. **Bring the user a list of proposals to confirm**:52 - Link repairs ➔ show the exact planned wikilink replacement or target before editing; repair only the notes the user approves.53 - Page fixes and expansions ➔ repair directly only after the link-protection report is clean for the selected scope.54 - Page retirement and archiving ➔ get the user's confirmation, then call `memorb-forgetter` to perform the move into `memorbs/Dump/` and rewrite the wiki links automatically.558. Do **not** append lint-only fixes to `memorbs/log.md`. If a lint finding leads to a meaningful archive or other memory event, that executor records the corresponding journal entry.5657## Side checks (optional)5859- Whether `memorbs/HQ/persona.md` plus `memorbs/HQ/identity.md` exceed 100 lines combined (the Hot Cache ceiling)60- Whether the `.claude/skills/` router table matches the actual directory (see `writing-memorb-skills`)