Skip to content
Skills Library
Personal productivity · Automation

wiki-cross-linker

/wiki-cross-linker

Scan wiki/ for unlinked mentions of existing pages and convert to [[wikilinks]]. Run after each wiki-ingest batch to catch newly-mintable links. Do NOT use to author new pages (use wiki-ingest). Obsidian wiki リンク補強・連結補強・圖譜增強。

Author
kouko ↗
Licence
MIT
Last repository change
10.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 10.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Scan wiki/ for unlinked mentions of existing pages and convert to [[wikilinks]]. Run after each wiki-ingest batch to catch newly-mintable links. Do NOT use to author new pages (use wiki-ingest). Obsidian wiki リンク補強・連結補強・圖譜增強。

Original author description

Scan wiki/ for unlinked mentions of existing pages and convert to [[wikilinks]]. Run after each wiki-ingest batch to catch newly-mintable links. Do NOT use to author new pages (use wiki-ingest). Obsidian wiki リンク補強・連結補強・圖譜增強。

How it works

  1. Pre-flight
  2. STEP 1 — Build the link inventory
  3. STEP 2 — Scan all wiki pages
  4. STEP 3 — Apply matching policy
  5. STEP 4 — Apply edits
  6. STEP 5 — Update connections section
  7. STEP 6 — Log and report
  8. Boundaries (what wiki-cross-linker does NOT do)
Original SKILL.md headings · 128 lines, 841 words
SKILL.md preview
---
name: wiki-cross-linker
description: Scan wiki/ for unlinked mentions of existing pages and convert to [[wikilinks]]. Run after each wiki-ingest batch to catch newly-mintable links. Do NOT use to author new pages (use wiki-ingest). Obsidian wiki リンク補強・連結補強・圖譜增強。
---

# Wiki Cross-Linker — Strengthen the Knowledge Graph

After `wiki-ingest`, recently-created pages may be mentioned as plain text in older pages. This skill scans the wiki, finds plain-text mentions of existing page titles, and converts them to `[[wikilinks]]`.

## Pre-flight

1. Read `.obsidian-wiki.config` for `OBSIDIAN_WIKI_VAULT_PATH` (defaults `wiki/`). If only legacy `.env` exists, instruct user to run `/wiki-setup` to migrate.
2. If `wiki/` doesn't exist or contains no `.md` files under the type subdirectories (`wiki/{entities,concepts,references,skills,synthesis,journal}/*.md` directory scan returns empty), exit and tell user to run `/wiki-setup` then `/wiki-ingest`.

## STEP 1 — Build the link inventory

Glob `wiki/{entities,concepts,references,skills,synthesis,journal}/*.md` (directory scan — do NOT rely on `wiki/index.md`, which is a stale snapshot after Path 2). For each file, gather:
- Filename slug (canonical wikilink target — derived from the file's basename without `.md`)
- Frontmatter `title:` (display alias; fallback to filename slug if `title:` is missing or empty)
- Common variants (e.g., "qlib" / "Qlib" / "QLib"; capture all from page bodies)

Build an inventory: `{search_phrase → canonical_wikilink}`.

For example:
```
"Thompson Sampling" → [[Thompson-Sampling]]
"thompson sampling" → [[Thompson-Sampling]]
"qlib"              → [[qlib]]
"alpha factor"      → [[alpha-factor]]
```

## STEP 2 — Scan all wiki pages

For each page under `wiki/{entities,concepts,synthesis,skills,journal,references}/`:

1. Read full body
2. For each phrase in inventory, find plain-text mentions **not already inside a wikilink**
3. Record candidate replacements

### What to skip

Do NOT touch:
- Text already inside `[[...]]` (already linked)
- Text inside fenced code blocks ```` ``` ```` (code samples, command examples)
- Text inside inline code `` `like this` ``
- The page that owns the title being matched (don't link a page to itself)
- Frontmatter (only modify body)
- `## User Notes` section (user-owned, do not touch)
- **Inside callout headers** — `> [!note]` / `> [!warning]` / etc. on their own line (the syntax marker, not the callout body). Callout BODY content is fair game and should be linked normally.
- **Existing markdown links** — `[link text](url)` (don't transform display text into wikilink)
- **Existing wikilinks with anchors** — `[[Page#Section]]` already has a target; do not double-process
- **Headings** — text inside `## Heading` lines is structural, don't link

### Edge cases (informed decisions)

- **Callout body** — `> Some text mentioning qlib` → link the mention as usual
- **Block quotes** (without callout) — `> Text mentioning qlib` → link the mention as usual
- **Lists / tables** — link inline mentions as usual
- **Plain text in heading** is skipped, but if user wants link in heading they can hand-edit later

## STEP 3 — Apply matching policy

Use **conservative matching**:

- **First mention only** per page — if "qlib" appears 5 times in a page, link only the first occurrence
- **Whole-word match** — don't link "qlib" inside "qlibrary"
- **Case-sensitive primary, case-insensitive fallback** — prefer exact case match; fall back to case-insensitive for proper nouns
- **Skip ambiguous matches** — if a phrase could mean two pages, leave it unlinked and report

If the user's wiki has many mentions, ask before applying:

```
Found 47 candidate links across 12 pages.
Examples:
  entities/quant-investing.md:23  — "...uses qlib for backtesting" → [[qlib]]
  concepts/exploration-exploitation.md:8 — "Thompson Sampling balances..." → [[Thompson-Sampling]]

Apply all? (yes / review / specific pages only)
```

## STEP 4 — Apply edits

Use `Edit` with `replace_all: false` — apply one edit at a time, validating context.

For each accepted change:
- Append page to a touched-list

**NEVER produce backticked wikilinks**: `` `[[Page]]` `` and `` **`[[Page]]`** `` render as inline code in Obsidian, NOT as clickable links (markdown's code-span precedence eats the wikilink syntax). When converting plain-text mention `qlib` → wikilink, the output MUST be `[[qlib]]` or `**[[qlib]]**`, never `` `[[qlib]]` ``. If the plain-text mention was already inside backticks (e.g., the source had `` `qlib` `` for code-style emphasis), skip it — it's in code-span territory and was correctly excluded by STEP 2 anyway.

## STEP 5 — Update connections section

After linking is done, optionally update the `## Connections` section of pages where new outgoing links were added. Only add if the link is structurally meaningful (i.e., the linked page is closely related, not just incidentally mentioned).

Format:
```markdown
## Connections
- [[NewlyLinkedPage]] — relationship reason (one sentence)
```

If you can't articulate a one-sentence reason, the inline link is enough — don't pad `## Connections`.

## STEP 6 — Log and report

Append to `wiki/log.md`:

```markdown
| YYYY-MM-DD | cross-linker | scope=all | <N> links added across <M> pages |
```

Report to user:
```
Cross-linking complete:
  Pages scanned:  47
  Links added:    23
  Connections updated: 8

Skipped (ambiguous):
  - "factor" (could be entities/alpha-factor or concepts/factor-investing)
  - ...

Next steps:
  /wiki-lint  — verify no broken links were introduced
```

## Boundaries (what wiki-cross-linker does NOT do)

- ❌ Does not create new pages (only links to existing ones)
- ❌ Does not infer semantic relationships beyond mention-matching
- ❌ Does not modify frontmatter or `## User Notes`
- ❌ Does not link inside code blocks
- ❌ Does not update reference pages' `contributes_to:` (that's `wiki-ingest`'s domain)
Files in this package (2)
  • SKILL.md 6 KB
  • references/language-policy.md 11 KB

Versions

The database has no other skills named wiki-cross-linker.

Database snapshot: 13.11.2026 · package version 629dca1cff51 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 2 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100wiki-lint
    Run 15 health checks on wiki/ (structural, semantic, provenance). Use weekly or after wiki-ingest batches. Read-only — does not auto-fix. Do NOT use to fix issues (use wiki-ingest / wiki-cross-linker). Obsidian wiki 健全性チェック・健康檢查。
  • 100wiki-ingest
    Use when adding a new source to a wiki — a paper, article, URL, file, transcript, or any document. One ingest may touch 10-15 wiki pages.
  • 100cross-linker
    Find and add missing cross-references between wiki pages. Use when pages are disconnected or after large ingestion. This modifies pages to add links; use wiki-lint for report-oriented structural auditing.
  • 100wiki-merge
    Consolidate a confirmed near-duplicate PAIR of wiki/ pages into one canonical page (human picks the pair; skill merges + archives the other). Use when wiki-ingest/wiki-lint flags a near-duplicate. Add pages → wiki-ingest; link → wiki-cross-linker.
  • 95wiki-ingest
    Ingest new documents, raw text, folders, or URLs into the Obsidian wiki as distilled, linked knowledge. Use for general wiki ingestion when no more specific ingest skill applies, including processing _raw/ staged content.
  • 100wiki-ingest
    Compile articles, documents, or notes into a structured wiki knowledge base. Use when user says 'ingest to wiki', 'compile to knowledge base', 'update wiki', 'wiki ingest', 'add this to wiki', or invokes /wiki-ingest. Supports single or batch ingest. Triggers: wiki, ingest,…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.