Skip to content
Agentmart
Submit a tool

WikiLink

Add [[wikilinks]] to a markdown document by matching terms against existing vault notes — body links and frontmatter keywords/related enrichment.

Skill by N4M3Z

IndexedEUPL-1.2★ 2
Write a review

Install

Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.

npx agentmarket install skill/n4m3z-wikilink

Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.

Get the weekly diff

The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.

We use your email only for this newsletter. Privacy

About

Add [[wikilinks]] to a markdown document by matching terms against existing vault notes — body links and frontmatter keywords/related enrichment. USE WHEN a document needs wikilinks, terms should link to vault notes, knowledge graph needs enrichment, or enrich keywords.

Use cases: documents, productivity

No reviews yet. Installed it? Reviews come from verified installers only. How reviews work

Permissions

What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.

Tools
No tools found
Secrets
None asked for
Install scripts
None found

Network hosts it talks to 1

  • codeload.github.com · found in install command

Files it touches

  • ~/.claude/skills/wikilink

What's inside

Skill name
WikiLink
Description
Add [[wikilinks]] to a markdown document by matching terms against existing vault notes — body links and frontmatter keywords/related enrichment. USE WHEN a document needs wikilinks, terms should link to vault notes, knowledge graph needs enrichment, or enrich keywords.
License
EUPL-1.2
Instructions
146 lines in SKILL.md · view on GitHub

Agent Skills spec issues

  • name: only lowercase letters, digits and single hyphens allowed

Files (3)

  • SKILL.md
  • SKILL.yaml
  • sample.md

SKILL.md (first lines)

# WikiLink

Add `[[wikilinks]]` to a markdown document by matching terms against existing note titles in the Obsidian vault. Links the first occurrence of each matching term in the body and enriches frontmatter `keywords:` and `related:` fields.

## Instructions

### Resolve vault root and read the target file

The vault root is the session cwd when working inside the vault; otherwise target the vault explicitly with `vault=<name>` on every `obsidian` call.

If an argument was provided, use it as the file path. Otherwise, ask which file to enrich.

Check TLP before reading — GREEN/CLEAR: proceed; AMBER: ask first; RED: refuse. Then read through Obsidian:

```bash
obsidian read path=<exact/path.md>
```

The Read tool is the fallback only when the CLI is unavailable (app not running).

### Build the note title index

Through the CLI (see the ObsidianCLI skill for full reference):

```bash
obsidian files ext=md format=paths
```

Fallback when the CLI is unavailable (run from the vault root):
```bash
rg --files --glob '*.md' --glob '!.obsidian/**' --glob '!.trash/**' | sed 's|.*/||; s|\.md$//' | sort -u
```

Obsidian resolves wikilinks by filename, not directory path — index by stem only.

### Filter the index

**3a: Exclude RED paths**

Read the vault `.tlp` file. Remove stems from RED directories — their existence is protected information.

**3b: Remove stopwords**

Remove common short terms that create noise if linked:

Single-character stems, and words like: Data, Home, Table, View, List, Type, Item, Note, Page, Link, Text, File, Name, Date, Time, Tags, Status, All, New, Index, About, Help

Also exclude the document's own filename (no self-links).

**3c: Sort by length**

Longest first. "Forge Framework" matches before "Forge". "Claude Code" before "Claude".

### Identify protected zones

Zones that MUST NOT receive wikilinks:

| Zone | Action |
|------|--------|
| Fenced code blocks | Skip |
| Inline code | Skip |
| Existing wikilinks `[[...]]` | Skip — already linked |
| Markdown links `[text](url)` | Skip |
| URLs `https://...` | Skip |
| Obsidian embeds `![[...]]` | Skip |
| HTML blocks | Skip |

YAML frontmatter IS processed — but only the `keywords:` and `related:` fields (Step 6).

Track which terms are already linked in the document (including pre-existing wikilinks) to enforce first-occurrence-only linking.

### Match and link terms in the body

For each note title in the index (longest first):

1. Search for the term in unprotected text spans
2. Match case-insensitively at word boundaries
3. On first unlinked occurrence:
   - Exact case match: `[[Term]]`
   - Different case: `[[NoteTitle|matched text]]`
4. Mark the term as linked — skip subsequent occurrences
5. Mark the matched span as protected (prevent shorter terms from matching within it)

**Word boundaries**

A match must be at a word boundary on both sides: start/end of line, space, or punctuation (except `[`, `]`, `|`). This prevents matching "Forge" inside "ForgeCore" or "rust" inside "frustrated".

**Multi-word terms**

Multi-word note titles ("Forge Framework", "Claude Code") match as complete phrases. Never split into individual words.

### Enrich frontmatter keywords and related

Scan the document body for topic-relevant terms that match vault notes. Classify each into:

**`keywords:`** — abstract Topics only. Test: "Could this be a Space that groups many Resources?"
- Examples: `[[Security]]`, `[[Project Management]]`, `[[Rust]]`, `[[Automation]]`

**`related:`** — concrete entities (tools, organizations, projects, people, specific notes)
- Examples: `[[forge-tlp]]`, `[[Claude Code]]`, `[[Obsidian]]`, `[[Proton AG]]`

Rules:
- **Append only** — never remove or overwrite existing entries in either field
- Format as `- "[[Term]]"` (quoted wikilink in YAML list)
- Skip terms already present in either field
- If Obsidian CLI is available, prefer `obsidian property:set` for frontmatter updates (atomic — avoids Obsidian Linter race conditions)

### Review and confirm

Present proposed changes:

**Body links** — total count, each with surrounding context (5-10 words)
**Frontmatter** — new `keywords:` and `related:` entries

Group by confidence:
- High: exact case match, unambiguous multi-word term
- Lower: case-insensitive, short terms, potentially ambiguous

Options:

From N4M3Z/forge-obsidian, EUPL-1.2.

More from N4M3Z/forge-obsidian

Signals

Stars
2
Forks
0
Open issues
1
Last commit (this folder)
Jun 17, 2026 (4 months ago)

From GitHub (fetched Oct 24, 2026).

Details

License
EUPL-1.2
First seen
Oct 24, 2026
Last checked
Oct 24, 2026

More from N4M3Z

Cite this page

WikiLink skill. Agent Mart. https://agentmart.dev/skills/n4m3z-wikilink (last updated 2026-10-24)