| name | wikilinks |
| description | Verifies wikilink integrity (broken `[[targets]]`), then optionally suggests plain-text-to-wikilink conversions across the workspace. The conversion sweep is a workspace-wide bulk edit, so review suggestions before accepting. For a broader workspace audit (orphans, stale status, manifest drift), use `/memex:lint`.
|
| disable-model-invocation | true |
Memex - Wikilinks
Wikilink rule: When referencing any file in any markdown content you write or edit, always use [[filename]] wikilink format. Never use plain text filenames.
Two modes: verify broken links, then suggest plain-text โ [[wikilink]] conversions.
Step 1: Find workspace root
Run WORKSPACE_ROOT=$(pwd) && echo "$WORKSPACE_ROOT" via Bash.
Step 2: Verify wikilink integrity
Run the script at ${CLAUDE_SKILL_DIR}/scripts/verify-wikilinks.py:
python3 "${CLAUDE_SKILL_DIR}/scripts/verify-wikilinks.py" "$WORKSPACE_ROOT" --skip .claude .obsidian .git
If the script can't be found, report: "Wikilink script not found - skipping." Do not silently pass.
Report:
Broken links: 0
or:
BROKEN WIKILINKS ([count] found):
[file]: [[broken-link]]
Offer fixes:
- Target renamed โ update the link
- Target deleted โ remove the link or replace with plain text
- Target never existed โ flag for the user to decide
Step 3: Suggest wikilink conversions
Re-run the script with --suggest:
python3 "${CLAUDE_SKILL_DIR}/scripts/verify-wikilinks.py" "$WORKSPACE_ROOT" --suggest --skip .claude .obsidian .git
Scans markdown for plain-text mentions of existing filenames that aren't already [[wrapped]]. Handles exact and hyphenated-to-space matches. Skips code blocks, URLs, and frontmatter.
Step 4: Present conversion suggestions
WIKILINK CONVERSIONS ([count] suggested):
marketing-plan.md:
Line 12: "see the budget spreadsheet" -> "see the [[budget]] spreadsheet"
Line 34: "based on the roadmap" -> "based on the [[roadmap]]"
meeting-notes.md:
Line 5: "discussed pitch deck" -> "discussed [[pitch-deck]]"
Apply all [count] conversions? (or review one by one)
If the user confirms, apply the conversions. If they want to review, go through each one and ask.
Step 5: Report summary
Wikilinks report:
Broken links: [count fixed or 0]
Conversions applied: [count]
Total wikilinks in workspace: [count]
Files scanned: [count]
Obsidian graph: [count] nodes, [count] edges
Gotchas
- Script missing โ hard stop, not silent pass. If
${CLAUDE_SKILL_DIR}/scripts/verify-wikilinks.py can't be found, surface "Wikilink script not found - skipping." Reporting "0 broken" without a script run is a lie.
- Short-filename false positives in
--suggest. Filenames โค3 chars match common words (e.g., api.md matches every "API" in prose). Always review one-by-one before bulk-applying.
- Inline code (single backticks) is not stripped. Triple-fenced code blocks and URLs are excluded, but a backticked filename like "filename.md" in running prose can produce phantom suggestions.
- Skip list is not exhaustive. Default skips:
.claude/, .obsidian/, .git/. Vendored deps, build outputs, or node_modules/ need extra --skip flags or you'll get noise.
- Verify โ orphan check. This skill confirms
[[link]] targets resolve. It does NOT detect files-on-disk-but-not-in-any-hub. That's /memex:lint.