agentleFS
thoreinsteinthoreinstein/obsidian-rag/skills/cross-linker/SKILL.md

cross-linker

Skill2 starsChanged 8 months agoMITView on GitHub

Use when the user wants to find and insert missing wikilinks across vault notes. Triggers on "cross-link", "find missing links", "weave links", "unlinked mentions", "add wikilinks", or "link notes together".

2 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions2 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 2

    1. Ivy-Chen1999/llm-wiki-kit★ 21same name
    2. chobizzy/llm-wiki★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository13 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

6 rules. About 0 are common, 1 is distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 5

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Call obsidian_list_notes on the target scope (default: Engineering/).

    line 17
  2. Very specific:

    Call obsidian_read_note to get the full body text.

    line 29
  3. Distinctive:

    Only link the first unlinked mention of each target per source note.

    line 78
  4. Very specific:

    Run on a narrow scope first (Engineering/Patterns/) to calibrate before going vault-wide

    line 87
  5. Very specific:

    If a note has many false positives, it may need aliases: in frontmatter to disambiguate

    line 88
  6. Very specific:

    After running, consider /link-audit to verify no broken links were introduced

    line 90

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Cross-Linker

Discover unlinked mentions of vault concepts and insert [[wikilinks]]. Complements link-audit (which finds broken/orphan links) by finding links that should exist but don't.

Workflow

Phase 1 — Build Page Registry

  1. Call obsidian_list_notes on the target scope (default: Engineering/).
  2. For each note, call obsidian_read_note and extract from frontmatter:
    • Title (from # heading or filename)
    • Aliases (from aliases: frontmatter field, if present)
    • Type (pattern, trap, decision, concept)
  3. Build a registry: { title, aliases[], path, type } for each note.

For large scopes (>50 notes), batch reads and process incrementally.

Phase 2 — Scan for Unlinked Mentions

For each note in scope:

  1. Call obsidian_read_note to get the full body text.
  2. For each other page in the registry, check if the page's title or any alias appears in the body text without being wrapped in [[...]].
  3. Skip matches inside:
    • Existing wikilinks [[...]]
    • Code blocks (fenced or inline)
    • Frontmatter
    • The note's own title/heading
  4. Record each match: { source_note, target_note, matched_text, line_context, confidence }

Phase 3 — Score and Rank

Assign confidence to each proposed link:

  • High — exact title match (case-insensitive), target is a Pattern/Trap/Decision note
  • Medium — alias match, or title match in a less structured note
  • Low — partial match or only semantically related (use obsidian_rag_query to verify)

Sort findings: high confidence first, grouped by source note.

Phase 4 — Present Findings

Show the user a report:

## Cross-Link Report for: Engineering/

### High Confidence (auto-apply)
- Engineering/Patterns/table-driven-tests.md
  Line 12: "table driven tests" → [[Table-Driven Tests]]

### Medium Confidence (confirm each)
- Engineering/Traps/mock-drift.md
  Line 8: "interface injection" → [[Interface Injection]]

### Low Confidence (review)
- working/appiary/knowledge/auth.md
  Line 23: "token" → possibly [[Token Rotation]] ?

### Summary
- X high-confidence links ready to apply
- Y medium-confidence links for review
- Z low-confidence suggestions

Phase 5 — Apply Links

  • High confidence: Apply automatically using obsidian_replace_in_note, replacing the first unlinked mention with [[Target Title]] or [[path/to/note|display text]].
  • Medium confidence: Apply one at a time, asking user to confirm each.
  • Low confidence: List for reference only — don't auto-apply.

Only link the first unlinked mention of each target per source note. Repeated mentions stay as plain text (standard wiki convention).

Arguments

  • Optional scope: /cross-linker Engineering/Patterns/ (default: Engineering/)
  • Optional depth: /cross-linker --deep to include working/ and reference/ scopes

Tips

  • Run on a narrow scope first (Engineering/Patterns/) to calibrate before going vault-wide
  • If a note has many false positives, it may need aliases: in frontmatter to disambiguate
  • Short titles (1-2 words like "Testing" or "Auth") generate noise — prefer linking specific concept names
  • After running, consider /link-audit to verify no broken links were introduced

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.