Skip to content
Back to skills

Link

ASecurity

Analyze the vault and create [[]] links between notes. Trigger this skill when the user says "/link", "do the linking", "link my notes" or "vault link".

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 7, 2026
businessgobash

Works with

  • claude code

Security analysis

A100/100

Scanned November 7, 2026

npx -y skills add Zoomma1/get-your-life-together --skill link --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Link?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Link
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/zoomma1-link/badge)](https://www.skillsdirectory.com/skills/zoomma1-link)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: link
description: Analyze the vault and create [[]] links between notes. Trigger this skill when the user says "/link", "do the linking", "link my notes" or "vault link".
---
# Skill: Vault Link

This skill analyzes the vault and proposes Obsidian `[[]]` links between notes that discuss the same topics. It never modifies a note without explicit validation from {USER_NAME}.

**Single exception: links from the `auto-link` mod.** This mod (dev-mods → `~/.claude/mods/auto-link`) writes `[[]]` links on its own after a model `Edit`/`Write`, and logs them in `99 - Claude Code/auto-link-history.jsonl`. These links are already written: validation happens **after the fact**, at Step 0, where {USER_NAME} keeps or cancels each one. Everything else in this skill keeps the rule "validation before writing".

Anchoring philosophy: the role is to make the graph traversable, not to generate understanding. Claude connects. {USER_NAME} thinks. A well-traversed graph lets other commands such as `/emerge`, `/trace` or `/connect` work properly — that is the real stake of linking.

## Triggers

- the user says "/link", "do the linking", "link my notes"
- {USER_NAME} specifies a folder: "/link my Warhammer notes"
- the user says "/link review" → **Step 0 only** (review of the links written by `auto-link`), then stop
- Without specification → Step 0 if the log has entries to review, then analyze the whole vault

## Learned heuristics — {USER_NAME}'s rejections

These rules apply from the moment suggestions are generated, not afterwards.

### Prefer the specific over the general
Do not link to an aggregate/tracking note when a note specific to the topic exists. Example: a note about Drukhari should point to `[[Drukhari - Schema couleurs Squidmar]]`, not to `[[suivi-armees]]` (too generic).

### Do not link two distinct projects that share a common topic
[Hobby-project] and [Work-project] may share a topic but are independent projects in the vault. Do not create cross-links between them — a shared topic is not enough; the notes must complement each other functionally.

### Do not link a project's organization with personal notes from another domain
A note from [Organization-project] should not link to personal collection notes. The two contexts are separate even if the topic overlaps.

### Check that the link does not already exist before proposing it
Read the full content of the source note (body text, "Voir aussi" sections, "Connexions" sections, inline links `→ [[...]]`) before suggesting a link. Never propose a link that is already present, whatever its form in the note.

> ⚠️ **"Already linked" must be tested on both forms, not only on the short slug** (captured 2026-08-03, 3 false positives caught just in time before writing, over a session of 24 candidates). A `grep -F "[[target"` does **not** match `[[04 - Projects/…/target]]` — the note is linked, the filter does not see it, and the link is proposed then written twice. The basename normalization described below (Step 2a) is the safeguard, and it must apply **here too**, at proposal time, not only at orphan detection time.

### Check "already present" by wikilink, never by substring
A `grep -F "target"` also matches mentions **in plain text** — `├── LE PROBLEME.md` in an ASCII tree, `` `memory/phase0-log.md` `` in inline code, `→ Show HN post` in bare text, `- ADR-023 — …` in a "Voir aussi" section. Concluding "link already present" from these matches is a **false positive that makes us miss exactly the links to create**: the relationship is written but the graph does not see it. Always test the wikilink form (`grep -F "[[target"`), and treat a plain-text mention as a **priority candidate** — the relationship has already been validated by {USER_NAME} when he wrote it, only its materialization remains. Captured 2026-07-27: 44 of the 50 links of the session came from this pattern ("Voir aussi" sections of transverse ADRs).

### Do not link a project's technical resource to its vision/ecosystem hub
A note that documents a tool for a specific project (e.g. UX analytics for [project-name]) should point to the project directly, not to the note that aggregates the vision or ecosystem. The resource is operational — the hub is strategic. A shared topic is not enough: there must be a functional complementarity between the two notes.

### Broken-link detection — exclude 2 artifacts
Ignore the `[[ ... ]]` bash syntax found in code blocks (e.g. `[[ $EUID -ne 0 ]]`), and do not cut a link at `|` when it is `\|` (an escaped pipe in an Obsidian table = valid link with alias, not a malformed link). Verify with a real `grep '\]]'` that a corruption actually exists before proposing a "cleanup" — a destructive edit on a false positive breaks the rendering of tables.

### Never write into a Kanban board
Before adding a link (or a `## Voir aussi` section) to a note, check its frontmatter: if it contains `kanban-plugin: board`, **do not touch it** — any content outside the columns breaks the rendering of the Obsidian plugin. This typically targets project `Project management.md` files, which look like hubs but are boards. Look for another home (README, the folder's INDEX.md) or give up the link and say so. Captured 2026-07-27: the link `[example-project]/Project management` → `m3-done-criteria` was abandoned for this reason. Corollary: if the only remaining home is an outdated document or a single-note folder, **leaving the note orphaned is a valid answer** — do not fabricate a single-file INDEX nor place a link in a dead document just to lower a counter.

### Do not fabricate an INDEX where another index already does the job
A `Tickets/` folder is indexed by its `Project management.md` — an INDEX there would duplicate the board and rot behind it. A project folder that carries a **hub note** (`ProjectA/ProjectA.md`, `ProjectB/ProjectB.md`) does not need one either. Same for `claude-code/` folders (agent context, not a knowledge collection) and `Skills/*` (a single `SKILL.md`). **Check that a hub or a kanban exists before counting a missing INDEX** — a raw `[ ! -f INDEX.md ]` massively over-detects. Captured 2026-08-17: Step 6 raised **25 "INDEX missing" folders, 22 of which should not have one** — 6 `Tickets/` folders, 5 `claude-code/`, 4 `Skills/*`, 7 single-note folders. Extends the corollary of the Kanban heuristic above: there it was "do not fabricate an INDEX of a single file", here it is "do not fabricate one when a kanban or a hub already does it".

### Isolation produced by a generator → fix the generator, not the notes
When the inventory (Step 2) concentrates isolation in a folder whose notes are **written by a skill or a hook** (`Sessions/`, `proposals-*`, exports), do not propose links note by note: the deadend is a property of the generator (paths in backticks, no wikilink), and every new note will be born isolated again. The right move: **exclude the folder from the session**, name the cause, and open a ticket on the generator. Captured 2026-09-14: out of 1,094 notes, the **179 in complete isolation were all in `Sessions/`** (168 recaps citing their files in backticks + 131 `proposals-*`, an ADR queue with no vocation to be linked) — session excluded, ticket `recapsession-wikilinks-fichiers-vault` created. Extends the CLAUDE.md rule "exceptional situation → address the cause, do not tool the symptom".

### If {USER_NAME} rejects the entire result
Do not re-run a similar session without an explicit signal. Note the context of the rejection (type of notes, scope, theme) to improve future detection.

## Step 0 — Review of links written by `auto-link`

Read `99 - Claude Code/auto-link-history.jsonl`. If it does not exist or has no entry with `status` `written` or `proposed` → move to Step 1 without saying so. The `{"type":"link-run",…}` lines are markers: ignore them for sorting, and append one at the end of the review.

An entry = `{id, ts, note, target, ctxBefore, ctxAfter, status}`. The link is located in the note by `ctxBefore` + `[[target]]` + `ctxAfter`.

**Present the table, grouped by note, with the resolved target (path) of each link — without it {USER_NAME} cannot arbitrate:**

```
### Links written since the last pass

| # | Note | Passage (linked word) | Target | Status |
|---|------|-------------------|-------|--------|
| 1 | 03 - Knowledge/Ideas/x.md | …Voir [[ProjectA]] et… | Projects/ProjectA/README.md | written |
| 2 | 02 - Hobbies/y.md | …le Hobby Kanban du… | 02 - Hobbies/Hobby Kanban.md | proposed (dry-run) |
```

**Wait for {USER_NAME}'s decision — he keeps, cancels, or answers "all" / "none":**
- `written` kept → `status: "kept"`.
- `written` cancelled → replace with `Edit` the passage `ctxBefore[[target]]ctxAfter` by `ctxBefore` + `target` + `ctxAfter`, then `status: "reverted"`. If the passage has changed or is not unique: **do not guess**, say so ("not found") and let {USER_NAME} decide by hand.
- `proposed` accepted → place the link with `Edit` at the same location, `status: "kept"`; rejected → `status: "reverted"`. Same rule if the passage is not found.
- Never write into a `kanban-plugin: board` note. The mod excludes them, but check the frontmatter before any `Edit`.

**Update the log**: rewrite the line of each processed entry (`status` field), then append `{"type":"link-run","ts":"<ISO>"}`. A `reverted` entry is **never** re-proposed by the mod: a refusal is final.

**Announce the rate** (kept / processed): this measure decides whether to keep writing ON (default setting of the mod) or to switch back to a simple log (`/autolink write off`). Cancellations feed Step 7.

---

## Step 1 — Scope and minimal validation

If {USER_NAME} specifies a folder or a note → limit to that scope. Without specification → scan all folders except `00 - Daily notes/` (too much volume, ephemeral links), while mandatorily including `99 - Claude Code/Sessions/`.

List the folders that will be analyzed and wait for {USER_NAME}'s confirmation.

**Minimal validation before continuing:**
- If scope < 5 notes: propose widening ("Scope insufficient — analyze [folder] as well?")
- If scope > 200 notes: propose subdivision ("Scope too large — prioritize [folder] first?")
  - **If {USER_NAME} explicitly authorizes the volume override** (he asks to exceed the limit and process the whole scope, e.g. "everything except inbox/tickets") → do not process flat. Prioritize in this strict order: **1) complete isolation (orphan AND deadend), 2) orphans only, 3) deadends only** — keep quality despite the volume. The safeguard yields, the prioritization strategy stays. The scoring of Step 4 still applies; pulling isolated notes out of the graph takes precedence over exhaustive coverage.

---

## Step 2 — Structural inventory

Before reading the content of the notes, run a structural scan to prioritize reading. Orphans and deadends are the priority candidates — they benefit the most from linking.

> ⚙️ **Harness pitfall — bash scan backgrounded too early** (captured 2026-06-01): if the structural scan goes through a bash script (faster than Glob/Grep on a large scope), the harness may switch the command to background before the process ends → file reads arrive on an incomplete result. **Validated workaround**: a **single script with an end marker** (e.g. `/tmp/linkscan.sh` which writes a sentinel on its last line), read in one block after confirming the marker — never separate bash commands + `sleep`.

### 2a. Enumerate and detect orphans / deadends

For each folder to analyze:
- Use Glob to enumerate all `.md` files (pattern: `folder/**/*.md`)
- For each file, use Grep to search for `\[\[`: 0 results → deadend (note with no outgoing link)

> ⚙️ **Two blind spots of the deadend scan** (captured 2026-08-03, `/link` session over 1073 notes):
> 1. **Relative Markdown links `[text](path.md)` are resolved by the Obsidian graph.** A note that uses only this form (seen on `TMAFR-1096`) has no `[[` and wrongly comes out as a deadend — then receives wikilinks to targets already linked. Count `\[[^]]+\]\([^)]+\.md\)` as a valid outgoing link, and do not propose a wikilink to a target already reached by this form.
> 2. **`ADR-XXX-...` slugs are PascalCase and escape the kebab-case pattern.** Any scan that filters candidates on `^[a-z0-9-]+$` makes **all ADRs invisible**. Run a **separate targeted scan** on `ADR-[0-9]{3}` in addition to the main scan, otherwise the most referenced layer of the vault is never analyzed.
- For each file X, use Grep to search for `\[\[X(\|[^\]]+)?\]\]` in the analyzed scope (replace X with the file's slug without .md, accept aliases via `|`): 0 results → orphan (note with no incoming link)

> ⚙️ **Orphan detection pitfall — normalize link targets before comparison** (captured 2026-07-07). A basename-only grep `\[\[X...` **misses 3 forms** used massively in the vault and produces **false orphans** (notes flagged as isolated when they are in fact linked):
> 1. **Full-path link** `[[04 - Projects/.../X]]` — starts with `[[04 - Projects/...`, not with `[[X`.
> 2. **Spaced alias** `[[X | alias]]` — spaces around the `|`.
> 3. **Escaped pipe** `[[X\|alias]]` — in Obsidian tables (INDEX.md especially).
>
> **Robust workaround** (validated on 04/03/06, session 2026-07-07): extract **all** targets of the corpus in one pass, **normalize them to basename**, then compare by equality. Normalization, in order:
> ```
> grep -oE '\[\[[^]]+\]\]' ALL \
>   | sed -E 's/^\[\[//; s/\]\]$//' \
>   | sed -E 's/\\\|/|/g' \    # pipe échappé \| -> | AVANT le strip alias (sinon basename\ résiduel)
>   | sed -E 's/\|.*$//' \      # strip alias
>   | sed -E 's#^.*/##' \       # strip chemin
>   | sed -E 's/^[[:space:]]+//; s/[[:space:]]+$//' \
>   | sort -u
> ```
> A file is orphan iff its basename is **absent** from this set (`grep -Fxq`). **Always** re-verify the real incoming links of a note **before** proposing a link (the "verify the link does not exist" heuristic covers this) — normalization reduces the noise, it does not remove it 100%.

Prioritize notes that are both orphans AND deadends (complete isolation).

Expected result: list of orphans, deadends, and hubs (notes with 5+ incoming references).

### 2b. Detect unresolved links

Use Grep with the pattern `\[\[([^\]]+)\]\]` on the scope to extract all links. For each link found (without the `|...` alias suffix), use Glob to verify that the file `link-target.md` exists. List the links that match no file.

**If broken links exist:** present them to {USER_NAME} with the presumed reason ("note to create" vs "malformed link"). Wait for instructions before acting.

## Step 3 — Connection analysis

Read the priority notes identified in Step 2 in this order:
1. Notes that are both orphans and deadends (complete isolation)
2. Orphans only, then deadends only
3. Notes in active folders (`03 - Knowledge/`, `04 - Projects/`, `99 - Claude Code/`) — these folders contain the most recently modified notes by default
4. Hubs (notes with 5+ references)

If the scope exceeds 30 notes, run several passes with parallel Read calls (10-12 notes per pass). For each note:
- Read its full content with Read
- Identify the key topics and concepts
- Use Grep to search these terms in the scope
- Return the candidate note pairs

Also identify the **missing bridges between clusters**: two groups of notes that gravitate around the same topic without crossing each other. Propose 1-2 bridge links per identified pair of clusters.

Limit to 30-40 suggestions max per session — quality over quantity.

### Reciprocal links rule

If a note A proposes a link to B, do not automatically propose the link B → A. Evaluate each direction separately based on the content of the source note: does A talk about B in a functional way? Does the link A → B bring value to the reader of A?

## Step 4 — Scoring and presentation of links

For each candidate link, evaluate on 2 dimensions:
- **Conceptual strength** (1-5): is the link real and non-trivial?
  - 1 = vague or tangential
  - 3 = common topic, clear but basic connection
  - 5 = deep or complementary connection
- **Structural impact** (1-5): does this link improve the traversability of the graph?
  - 1 = links two hubs already well connected
  - 3 = creates a minor bridge between two clusters
  - 5 = pulls an orphan/deadend note out of isolation or creates a key bridge

Score = Strength × Impact (max 25).

- Score > 15 → present first
- Score 5-15 → present if the quota is not reached
- Score < 5 → reject silently

**Case "no relevant link":** if no candidate link reaches score 5, tell {USER_NAME} "no link proposed for this scope — notes too isolated or already well connected" and stop (do not continue to Step 5).

**Present the retained links in a table:**

```
### Suggested links

| Source note | Link to add | Target note | Reason | Score |
|-------------|----------------|------------|--------|-------|
| vault-second-brain.md | [[{USER_NAME}]] | {USER_NAME}.md | Personal context directly related | 20 |
| NMM.md | [[Balthasar-Gold]] | Balthasar-Gold.md | Paint mentioned in the technique | 16 |
```

**Wait for {USER_NAME}'s validation before adding anything.** {USER_NAME} can reject links individually or the whole set of suggestions.

## Step 5 — Adding links and cleanup

For each link validated by {USER_NAME}, use Edit to add `[[note-name]]` at the relevant place in the source note — at the end of the note in a `## Voir aussi` section if no natural place exists.

```markdown
## Voir aussi
- [[{USER_NAME}]]
- [[vault-second-brain]]
```

**After adding all links:** continue to Step 6 — do not stop here.

## Step 6 — Updating INDEX.md files

**Scope:** take up all folders defined in Step 1 — not only those where links were validated. A folder with no added link can still lack an INDEX.md or have missing entries.

Only process folders with a real delta — ignore folders already up to date.

### 6a. Change detection

For each folder in the Step 1 scope:
- Glob `folder/*.md` → list of notes (exclude `INDEX.md` itself and subfolders)
- **If `INDEX.md` is absent** → folder candidate for creation
- **If `INDEX.md` is present** → read its content, extract the slugs already listed, compare with the Glob → note the missing entries
- **If no delta** → ignore this folder silently

> ⚙️ **The `\|` normalization of Step 2a ALSO applies here** (captured 2026-08-24). Extracting slugs from an `INDEX.md` reads **Obsidian tables**, so it encounters escaped-pipe targets `[[X\|alias]]` — without the same normalization chain as Step 2a (`s/\\\|/|/g` **before** the alias strip, then path strip), the extracted slug carries a residual `\`, never matches the Glob, and the note is counted **missing although it is already indexed**. Session of 2026-08-24: **13 false deltas** produced this way, caught by review *before* writing — but nothing in Step 6 would have stopped them. The guard has been written in Step 2a since 07/07; it had never been carried over to here, because 2a detects **orphans** and 6a compares **indexes** — two different goals, same parsing trap.

### 6b. Generating new entries

For each note absent from the index (or for all of them if creating):
- Read the frontmatter: extract `title` (or `name`) and `tags`
- If no usable frontmatter → use the first H1 line or the file slug
- Build the line: `| [[slug]] | 1-line description | #tag1 #tag2 |`
- If the note has neither title, nor H1, nor tags: leave Description and Tags empty rather than inventing them

### 6c. Presentation and validation

Display the concerned folders and the new entries:

```
### INDEX.md to update

**03 - Knowledge/** — creation
| Note | Description | Tags |
...

**02 - Hobbies/** — 2 entries added
| [[new-note]] | ... | ... |
```

**Wait for {USER_NAME}'s validation before writing.** {USER_NAME} can validate in bulk or adjust entries.

### 6d. Writing

- **Creation**: Write `INDEX.md` with header `# Index — [Folder name]` + complete table
- **Addition**: Edit `INDEX.md` — append the new lines to the existing table (do not rewrite entries already present)

**After writing all INDEX.md files:** update the tracker (`99 - Claude Code/command-tracker.md`) if the file exists — `/link` line → replace the date with today's date in `YYYY-MM-DD` format. Do not block if the tracker does not exist.

## Step 7 — Capturing refusals (optional)

Each time {USER_NAME} rejects a link (or the whole set of suggestions) with an explanation, propose capturing it: add the heuristic to the "Learned heuristics" section with the general pattern (not the specific example) so that the rule applies to future sessions.

**If {USER_NAME} rejects the entire result:** note the context (type of notes, scope, theme, reason for rejection) — do not re-run a similar session without an explicit signal.

**Links cancelled at Step 0:** the mod **learns the target by itself**: since `auto-link` v0.3.0, a target cancelled at least once (`reverted`) and never kept (`kept`) is no longer proposed anywhere, without writing anything in the code. Manual anchoring remains to be proposed when the reason goes beyond the target (hub cited everywhere, two distinct projects, whole folder to exclude): the heuristic above, **and** the constants `EXCLUDED_TARGETS` / `EXCLUDED_SOURCE_DIRS` of `auto-link/hooks/register.ts`. Without validation from {USER_NAME}, write nothing.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in business →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.