跳到正文
Skillpedia
技术文档16k · #10814

wiki-lint

它能做什么

这个技能扫描你的 Obsidian wiki,并报告诸如失效链接和没有任何页面指向的页面等问题。适合希望保持大型知识库整洁的人。

适用场景

  • ✓当你想检查 wiki 中是否存在失效链接,或没有任何链接指向的页面时。
  • ✓当你想审核笔记中的前置元数据或来源追踪情况时。
  • ✓当你想在自己动手修复之前,了解哪些索引页面已经过时时。

技能链接

https://github.com/AgriciDaniel/claude-obsidian/blob/main/skills/wiki-lint/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/AgriciDaniel/claude-obsidian/blob/main/skills/wiki-lint/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“请检查我的 Obsidian wiki 中是否有失效链接和孤立页面,并给我看一份报告。”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会运行一个固定的检查工具,读取知识库并列出每项发现。它不会创建报告、仪表板或修复,由你决定要修改什么。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Lint the wiki

Use the portable lint engine as the source of truth. Lint observes vault state; it does not create reports, dashboards, canvases, stubs, or fixes.

Resolve the installed product root from this skill's own location, not from the vault or current working directory:

PRODUCT_ROOT=/absolute/path/to/installed/claude-obsidian
CORE="$PRODUCT_ROOT/scripts/claude-obsidian.py"
test -f "$CORE"

Every ../wiki/references/ link in this file resolves the same way, relative to this skill's own directory under $PRODUCT_ROOT, never relative to the selected vault's wiki/ directory.

Run

Resolve the user vault, then run one of:

python3 "$CORE" lint --vault "$VAULT"
python3 "$CORE" lint --vault "$VAULT" --format markdown
python3 "$CORE" lint --vault "$VAULT" --exclude "wiki/scratchpad/*"

The repeatable --exclude GLOB flag scopes a path (for example a scratchpad folder) out of page, link-resolution, orphan, frontmatter, empty-section, and stale-index scanning.

Use --strict only when a nonzero exit for findings is useful in automation. The command remains read-only either way.

The deterministic parser understands Obsidian wikilinks and embeds, Markdown links, aliases, heading and block fragments, escaped aliases, and code fences. It skips dot-prefixed directories by default, mirroring Obsidian's own indexer. Link resolution honors .gitignore files inside the vault (no git subprocess): when a link is ambiguous between a page and a gitignored file such as a build artifact, the gitignored candidate is dropped. It reports such categories as dead or ambiguous links, orphan pages, required frontmatter gaps (including title), empty sections, stale index entries, and source/claim ledger contract violations. Report only the checks and counts present in its output; do not claim that it performed semantic, stylistic, or prose-level contradiction analysis when it did not.

Explain findings

  1. Preserve the engine's paths, line numbers, targets, categories, and counts.
  2. Group findings by likely impact: broken navigation, ambiguous resolution, metadata quality, then maintainability.
  3. Explain that an orphan may be intentional and an ambiguous basename needs a path-qualified link; do not infer intent from the finding alone.
  4. Treat allowlisted findings as policy, not as proof that the target exists.
  5. Separate deterministic facts from suggested remediation.

Do not write the Markdown rendering into the vault. Return it in chat or stdout.

Repair is a separate operation

Never auto-fix a lint result. After the user chooses specific findings to repair:

  1. Re-read each target and record its expected SHA-256.
  2. Draft only the selected changes; do not delete or merge pages without explicit consent.
  3. Build one repair bundle with a new operation ID.
  4. Inspect the bundle and show exact changed paths.
  5. Apply only after that separate review.
  6. Re-run lint read-only and compare the relevant findings.

Follow the operation transaction contract. Lint itself never applies that transaction and never commits Git.

Checkpoint

Observe the deterministic report, think about root causes rather than finding count, verify proposed repairs against current hashes, and grow by improving the workflow that produced repeated findings.

常见问题

它会修复失效链接吗?

不会。检查只报告发现的问题,修复工作由你或其他技能完成。

我可以跳过某些文件夹吗?

可以。你可以在扫描中排除某个文件夹,例如临时区域。

它能发现哪些问题?

它会报告链接问题、孤立页面、前置元数据缺口、空白章节以及过时的索引条目。

详情

作者的原始描述

Run a deterministic, read-only health check on an Obsidian wiki. Use for lint, vault health check, audit wiki health, find orphans, find dead links, frontmatter audit, provenance audit, or wiki audit. Reports graph, link, frontmatter, provenance-ledger, empty-section, and stale-index findings; it does not reason broadly or repair files.

repo: AgriciDaniel/claude-obsidian

热度

GitHub 星标
16k
排名
#10814
许可证
MIT
更新时间
2026/10/25

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能