Loading...
Loading...
Automatically add [[wikilinks]] to all mentions of existing entities within a file or entire world. Scans for entity names, aliases, and partial matches, then wraps them in wikilink syntax. Use when user wants to "linkify", "auto-link", "add links to existing entities", or "wikilink this file".
npx skill4agent add hopeoverture/worldbuilding-system linkify[[wikilink]]# Linkify a specific entity
/linkify "Aldersgate"
# Preview changes without modifying
/linkify "Aldersgate" --dry-run
# Linkify by file path
/linkify Worlds/Eldermyr/Settlements/Aldersgate.md
# BULK: Linkify all entities in a world
/linkify --world Eldermyr
# BULK: Linkify only Characters in a world
/linkify --world Eldermyr --category Characters
# BULK: Preview bulk changes
/linkify --world Eldermyr --dry-run| Flag | Purpose | Default |
|---|---|---|
| Show what would be linked without making changes | false |
| Search all worlds for entities, not just the source entity's world | false |
| Require exact case matching | false |
| BULK MODE: Process all entities in the specified world | - |
| With | all |
/.mdWorlds/[World Name]/...Worlds/name:Worlds/[World Name]/--all-worldsname:aliases:{
"Lord Varic Valdren": { path: "Characters/Lord Varic Valdren.md", canonical: "Lord Varic Valdren" },
"Varic": { path: "Characters/Lord Varic Valdren.md", canonical: "Lord Varic Valdren" },
"The Merchant Lord": { path: "Characters/Lord Varic Valdren.md", canonical: "Lord Varic Valdren" },
...
}---[[...]]>**Prompt:**[[Lord Varic Valdren|Lord Varic]]=== LINKIFY ANALYSIS: [Entity Name] ===
World: [World Name]
Source: [path/to/entity.md]
Entities Indexed: X
---
MATCHES FOUND: Y
| # | Text Found | Line | Links To | Context |
|---|------------|------|----------|---------|
| 1 | Lady Serana Valdren | 121 | [[Lady Serana Valdren]] | "...wife, manages court..." |
| 2 | High Confessor Maren | 136 | [[High Confessor Maren]] | "...supporters, seeking..." |
| 3 | Sister Elspeth | 204 | [[Sister Elspeth]] | "...Abbess of the..." |
| 4 | Lord Varic | 117 | [[Lord Varic Valdren|Lord Varic]] | "...ensuring Varic holds..." |
---
PARTIAL MATCHES (display text needed):
| # | Text Found | Line | Suggested Link |
|---|------------|------|----------------|
| 1 | "the Owl" | 123 | [[The Owl|the Owl]] |
| 2 | "young Edric" | 117, 177 | [[Edric Valdren|young Edric]] |
---
AMBIGUOUS (multiple possible matches):
| # | Text Found | Line | Could Match |
|---|------------|------|-------------|
| 1 | "Edric" | 177 | [[Edric Valdren]] or [[Prince Edric the Liberator]] |
---
SUMMARY:
- Exact matches: X
- Partial matches: X
- Ambiguous: X
- Total changes: X
Options:
1. Apply all exact matches
2. Apply exact + partial matches
3. Review each individually
4. Dry run complete (--dry-run flag)--dry-runEntityName[[EntityName]]PartialName[[FullEntityName|PartialName]]=== LINKIFY COMPLETE: [Entity Name] ===
Changes Applied: X
Links Added:
- [[Lady Serana Valdren]] (line 121)
- [[High Confessor Maren]] (line 136)
- [[Sister Elspeth]] (lines 204, 252)
- [[Lord Varic Valdren|Lord Varic]] (line 117)
Skipped (ambiguous):
- "Edric" (line 177) - multiple matches possible
---
File Updated: [path/to/entity.md]
Suggested Next Steps:
- Review ambiguous matches manually
- Run /audit-world to check bidirectional links
- Use /link-entities to add reciprocal connections| Text | Entity | Match? | Reason |
|---|---|---|---|
| "spoke to Lord Varic Valdren about" | Lord Varic Valdren | Yes | Complete phrase |
| "the Valdren family" | House Valdren | No | "Valdren" alone, different entity |
| "visited Aldersgate" | Aldersgate | Yes | Complete word |
| "Aldersgates" | Aldersgate | No | Different word |
| "[[Lord Varic Valdren]]" | Lord Varic Valdren | No | Already linked |
| Text | Entity | Link Format |
|---|---|---|
| "Lord Varic said" | Lord Varic Valdren | `[[Lord Varic Valdren |
| "the Owl knows" | The Owl | `[[The Owl |
| "young Edric" | Edric Valdren | `[[Edric Valdren |
--case-sensitive[[wikilinks]]# Name--world.mdWorlds/[World Name]/--categoryCharacters/World Overview.md--include-overview=== BULK LINKIFY COMPLETE: [World Name] ===
Files Processed: X
Files Modified: Y
Files Unchanged: Z
Total Links Added: N
By Category:
- Characters: X files, Y links
- Settlements: X files, Y links
- Organizations: X files, Y links
...
Skipped (ambiguous): N references across M files
Performance: X.X seconds total# Process entire world
/linkify --world Eldermyr
# Process only one category
/linkify --world Eldermyr --category Settlements
# Dry run to preview bulk changes
/linkify --world Eldermyr --dry-run
# Process multiple categories
/linkify --world Eldermyr --category Characters --category Organizationsscripts/linkify_world.py# Basic linkify
/linkify "Aldersgate"
# Preview what would be linked
/linkify "Aldersgate" --dry-run
# Linkify checking all worlds for entities
/linkify "Aldersgate" --all-worlds
# Linkify by path
/linkify Worlds/Eldermyr/Settlements/Aldersgate.md
# Case-sensitive matching
/linkify "Lord Varic Valdren" --case-sensitive/create-entity/linkify/audit-world/linkify/link-entities/linkify/link-entities/populate-entity/linkify/populate-entity --links-only/populate-entity/linkifyError: Could not find entity "[name]"
Similar entities in Worlds/:
- [similar1]
- [similar2]
Please specify the full path or exact name.=== LINKIFY: [Entity Name] ===
No unlinked entity references found.
This file either:
- Already has all entities properly linked
- Contains no references to other known entities
- References entities that don't exist yet (use /populate-entity to create them)Error: Could not write to [path]
The dry-run showed X matches. Please check file permissions.