跳到主要内容
知仓学习社ZHICANG

wiki-lint

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,…

不碰外部(只输出文字)无严重或高危命中AgriciDaniel/claude-obsidian

它会碰到什么

扫了多少1 个文本文件,4 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

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.

  1. Explain that an orphan may be intentional and an ambiguous basename needs a

path-qualified link; do not infer intent from the finding alone.

  1. Treat allowlisted findings as policy, not as proof that the target exists.
  2. 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.

  1. Build one repair bundle with a new operation ID.
  2. Inspect the bundle and show exact changed paths.
  3. Apply only after that separate review.
  4. Re-run lint read-only and compare the relevant findings.

Follow the [operation transaction contract](../wiki/references/operation-transactions.md).

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.

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。

它属于哪个仓库

星标★ 14,998
本站分层T1
该仓技能数15
原文件路径skills/wiki-lint/SKILL.md

同一个仓库里的其他技能

看这个仓库的全部 15 个技能