# Memorb Lint

> 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 有沒有要更新的.

- Skill: `iamjosuho/memorb-lint` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add iamjosuho/memorb-lint`
- Raw SKILL.md: https://api.skillmd.com/api/skills/iamjosuho/memorb-lint/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: iamjosuho (https://skillmd.com/u/iamjosuho)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/iamjosuho/memorb-lint

---


# 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`:

```bash
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

1. Resolve `$VAULT`, then run the deterministic link helper before manually inspecting the vault. Record every `BROKEN_WIKILINK`, `AMBIGUOUS_WIKILINK`, and `BARE_INTERNAL_PATH` result.
2. 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.**
3. 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.
4. Re-run the helper. Completion requires zero link-helper errors for the selected scope; report remaining errors or warnings explicitly.
5. 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.
6. 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 |

7. **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.
8. 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`)

