obsidian-link-audit

obsidian-link-audit is a skill for Claude Code from ryanzhao1011/workframe. It costs 58 tokens per session (1,256 once invoked), scanned A, original, MIT.

A read-only checker for links in Obsidian notes, including incoming links, outgoing links, unresolved links, broken links, and documents with no connections. If the Obsidian command-line tool is unavailable, it uses text search as a fallback.

In plain words
What is it for?
Use it to audit backlinks, find broken or unresolved links, detect isolated notes, and check references before or after changing documentation.
Why use it?
It shows what may be affected before a document is renamed or changed and helps find links that no longer work. It does not edit documents or publish them.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Part of the core plugin — 37 skills, 4 agents, 11 hooks shipped together

Good fit Use it to audit backlinks, find broken or unresolved links, detect isolated notes, and check references before or after changing documentation.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/ryanzhao1011/workframe/obsidian-link-audit
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.

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

Made for: Claude Code.

Or install core, the plugin that ships this one along with the rest of its 37 skills, 4 agents, 11 hooks.

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 obsidian-link-audit

README.md
[![agentmods](https://agentmods.dev/badge/skills/ryanzhao1011/workframe/obsidian-link-audit/github.svg)](https://agentmods.dev/skills/ryanzhao1011/workframe/obsidian-link-audit)
Your own site
<a href="https://agentmods.dev/skills/ryanzhao1011/workframe/obsidian-link-audit"><img src="https://agentmods.dev/badge/skills/ryanzhao1011/workframe/obsidian-link-audit/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for obsidian-link-audit

Your own site · 80×15
<a href="https://agentmods.dev/skills/ryanzhao1011/workframe/obsidian-link-audit"><img src="https://agentmods.dev/badge/skills/ryanzhao1011/workframe/obsidian-link-audit.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,256 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found 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.1 $0.00058 $0.01256
Opus 5 $0.00029 $0.00628
Sonnet 5 $0.00012 $0.00251
Haiku 4.5 $0.00006 $0.00126

Measured 8d ago against content hash a6f8afc009f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

obsidian-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 8d 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.

plugins/core/skills/obsidian-link-audit/SKILL.md · 102 lines

How it starts

The opening of the file, as written. The whole thing — 102 lines — stays where its author put it; the contents beside it link to each section on GitHub.

定位

本 skill 是 Obsidian CLI 增强层,只做链接语义审计,不写文件。

主链路仍是本地 Markdown + rg / Read。当 Obsidian CLI 可用时,用官方 CLI 获取 Obsidian 视角下的 backlinks、outgoing links、unresolved、orphans、deadends;CLI 不可用时回退到 rg 近似查询。

触发场景

  • 修改正式 spec / plan / decision 前后,需要确认影响面。
  • 发布到外部平台前检查坏链(由项目配备的 <platform>-publish 发布器调用)。
  • 单文件 rename / move 前后检查引用是否更新。
  • 用户问“哪些文档引用了它”“有没有坏链”“有没有孤岛文档”。

何时不用

  • 只读单篇正文:直接 Read
  • 简单关键词全文检索:直接 rg 更快。
  • 写正文、改 frontmatter:不用本 skill,交给业务 skill / obsidian-safe-write
  • 外部平台发布:本 skill 不负责发布,只做发布前校验。

CLI Probe

优先读取 .claude/workframe-state/obsidian-cli-status.json(schema 权威定义见 skill: obsidian-doc-structure §status.json schema):

  • do_not_probe: true永不重新 probe(不设 TTL、不做过期自判),直接按 cli_available 决定走 CLI 还是 fallback;重新启用 CLI 的唯一入口 = 用户手动删除该文件
  • 缓存缺失 → 执行非执行检测(全程不运行任何 obsidian 命令):定位命令(Get-Command obsidian / command -v obsidian)→ 判定是否 GUI 启动器(所在目录存在 Obsidian.exe / resources.pak 特征文件)→ 不可用则写入 status.json(cli_available: falsedo_not_probe: truereason)并 fallback
  • 仅当非执行检测确认存在独立 CLI shim 时,才允许执行 obsidian version / obsidian vault info=path 验证并写入 commands_verified

⚠️ 未通过非执行检测时禁止执行任何 obsidian 命令——在「装了 GUI 但未启用 CLI」的机器上会误启动 Obsidian 窗口。

若不可用,记录 fallback 原因并改用 rg / Read

调用前检查

执行任一 Obsidian CLI 命令前,必须依序确认:

  • status.json 存在且 do_not_probe: truecli_available: false → 直接 fallback,不做任何 probe。
  • 命令在 commands_verified 数组中 → 可以使用 CLI。
  • 命令不在数组中 → 直接 fallback,不尝试执行。
  • status.json 不存在或 schema 不匹配 → 按「CLI Probe」的非执行检测流程重新检测(禁止直接执行 obsidian 命令)。

官方 CLI 命令

以本机 obsidian help <command> 输出为准,常用命令:

obsidian backlinks path="<file>" format=json
obsidian links path="<file>" format=json
obsidian unresolved verbose format=json
obsidian orphans format=json
obsidian deadends format=json

若本机参数名是 file= 而不是 path=,按 obsidian help backlinks / obsidian help links 调整。

Fallback

rg '\[\[[^\]]*<目标文件名>[^\]]*\]\]' projects docs
rg '\[\[' "<当前文件>"
rg "\]\([^)]*\.md\)" projects docs

Read the full file on GitHub · 102 lines

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. 8d ago First seen · 102 lines · 58 tokens per session scan A a6f8afc009f7

Subscribe to this mod's changes

obsidian-link-audit is a skill published in the GitHub repository ryanzhao1011/workframe (4 stars, last pushed 21d ago), licensed MIT. It adds 58 tokens to every session and 1,256 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

latex-setup

Use when the user wants to set up or troubleshoot a LaTeX environment, choose between biber and bibtex, install packages for a specific venue template, or configure compilation. Triggers on phrases like "setup latex", "biber vs bibtex", "latex compilation error", "install latex packages", "venue template", or "texlive…

fcakyon/phd-skills · 76 tokens

knowledge-structures

A system for organizing notes into navigation pages, synthesis notes, and small standalone notes. A map of content is a note that links together related notes around one topic.

jtprogru/bear-skills · 84 tokens

html-prototype

A method for creating single-file HTML mockups that open in a browser and follow a project's design tokens, such as its fonts, colours, spacing, corners, and shadows.

mayuemarsha-del/pm-skills · 97 tokens

feature-acceptance

A browser-based acceptance testing process that compares an online implementation with a product requirements document and, when available, an HTML prototype. It records what is complete, partial, missing, or inconsistent, with screenshots and prioritized blockers.

mayuemarsha-del/pm-skills · 192 tokens

prd

A skill for writing and reviewing product requirements documents, or PRDs: documents that describe what a product or feature should do. It covers structure, fields, rules, edge cases, metrics, page layouts, and related system or algorithm flows.

mayuemarsha-del/pm-skills · 202 tokens

gbg

Convert any plan, PRD, feature idea, or brief into a sequenced goal-by-goal execution document with reviewer-gated commits — for everyday feature development, MVPs, migrations, refactors, and hardening alike. Generates a project brief, per-goal scope/tasks/acceptance criteria, an LLM-reviewer prompt (Codex/etc.), a…

cielebak/goal-by-goal · 150 tokens