link-audit

link-audit is a skill for Claude Code, Codex from thoreinstein/obsidian-rag. It costs 60 tokens per session (410 once invoked), scanned A, a copy of link-audit, MIT.

A checker for the health of links in an Obsidian vault, including broken wikilinks, notes with no incoming links, and optional meaning-based connection suggestions.

In plain words
What is it for?
Use it to audit a whole vault or subfolder, group broken links by source note, identify orphaned notes, and suggest possible links between related notes.
Why use it?
It helps find references that no longer work and notes that are isolated, making a linked note collection easier to maintain.

Skill for Claude CodeCodex

Part of the obsidian-rag plugin — 13 skills, 2 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/thoreinstein/obsidian-rag/link-audit
Any agent
npx skills add thoreinstein/obsidian-rag --skill link-audit
Clone the repo
git clone --depth 1 https://github.com/thoreinstein/obsidian-rag

Made for: Claude Code, Codex.

Or install obsidian-rag, the plugin that ships this one along with the rest of its 13 skills, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for link-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/thoreinstein/obsidian-rag/link-audit.svg)](https://agentmods.dev/skills/thoreinstein/obsidian-rag/link-audit)
Your own site
<a href="https://agentmods.dev/skills/thoreinstein/obsidian-rag/link-audit"><img src="https://agentmods.dev/badge/skills/thoreinstein/obsidian-rag/link-audit.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 410 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 86% copy Near-identical to another mod in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00060 $0.00410
Opus 5 $0.00030 $0.00205
Sonnet 5 $0.00012 $0.00082
Haiku 4.5 $0.00006 $0.00041

Measured 5d ago against content hash 272c6b1facb0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

link-audit scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

86% identical to link-audit — 12 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/link-audit/SKILL.md · 44 lines

What it actually says

Comprehensive audit of link health: broken wikilinks, orphaned notes, and semantic suggestions.

  1. Call obsidian_get_broken_links (optionally with subfolder argument).
  2. Present broken links grouped by originating file.
  3. For each, suggest: delete the link, create a stub note, or correct the target name.
  4. Offer to fix each with obsidian_replace_in_note (wrong name → correct name).

Phase 2 — Orphaned Notes

  1. Call obsidian_list_notes to enumerate all notes in scope.
  2. For each candidate orphan, call obsidian_get_backlinks.
  3. Notes with zero backlinks AND not in Daily Notes/ are orphan candidates.
  4. Present orphan list with options: link from a relevant note, move to archive, or delete.

Phase 3 — Semantic Suggestions (Optional)

If the user asks for deeper suggestions:

  1. For each orphan, call obsidian_rag_query with the orphan title as query, limit: 5.
  2. If strong matches exist (low distance score), suggest [[wikilink]] connections.

Arguments

Optional subfolder: /link-audit Engineering/

Tips

  • For large vaults, always scope to a subfolder first (Phase 2 on full vault is slow)
  • Broken links in Daily Notes/ are usually harmless — offer to skip them
  • Never make edits without per-change user confirmation
  • Run /index first if obsidian_get_broken_links seems incomplete
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 44 lines · 60 tokens per session scan A 272c6b1facb0

Subscribe to this mod's changes

link-audit is a skill published in the GitHub repository thoreinstein/obsidian-rag (2 stars, last pushed 1mo ago), licensed MIT. It adds 60 tokens to every session and 410 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. It is 86% identical to link-audit, differing in 12 lines, and is treated as a copy.

Related

Other skills, from other repositories

tasknotes

Manage tasks in an Obsidian TaskNotes vault. Use for creating, reading, updating, or completing tasks; checking what is open or in progress; adding items to a list; marking tasks done or in progress; updating task status or priority; investigating why a task is missing from a view or board; troubleshooting TaskNotes…

vanillaflava/tasknotes-skill · 120 tokens

create-cmd-instruct

Reshape my PREVIOUS message using extra instructions, then save it as a slash command.

fayis672/slash-IT · 17 tokens

list-cmds

List all my custom slash commands with their descriptions. Use when the user wants to see, browse, or review the custom slash commands they have saved.

fayis672/slash-IT · 30 tokens

coaching-mode

Use when the user wants to coach someone — a report, peer, or mentee — through a problem rather than solve it for them. Trigger phrases include "coach me through how to talk to [report]", "I want to help [name] figure out X without telling them what to do", "let me practice a coaching conversation", "GROW conversation…

shwetank/bettersense · 0 tokens

manage-glue-workers

Use when managing engineers who naturally gravitate toward glue work (onboarding, documentation, unblocking, process improvement) and need protection from burnout, visibility for their impact, and career development that doesn't force them off the IC track. Trigger phrases include "my report does too much glue", "how…

shwetank/bettersense · 122 tokens

user-profile

Use to create or update the user's anchor profile — a single private file (/bettersense-work-reflections/profile.md) that captures who the user is, what they do, what context other skills need to know about them. Read automatically by other skills in the bundle when present, so the user doesn't re-explain themselves…

shwetank/bettersense · 131 tokens