agentleFS
81895626sun-rgb81895626sun-rgb/claude-obsidian-wiki/skills/wiki-lint/SKILL.md

wiki-lint

Skill0 starsChanged 7 months agoMITView on GitHub

对 Obsidian 风格 wiki 知识库做健康检查。当用户说"检查知识库"、"wiki 健康检查"、"/wiki-lint"时触发。也可在 wiki-add 批量模式结束后手动调用。

44 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use wiki-capture, wiki-status and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • jehrhardtSkill

    wiki-capture

    Quickly capture raw thoughts, links, images, or notes to today's Obsidian daily note from anywhere in Pi. Use when the user wants to jot something down for later wiki processing.

    Also in 6 projects that use this

  • nexuschainsSkill

    wiki-status

    Reports the current state of the wiki vault — page counts, category breakdown, hub pages, orphans, stale entries, and a delta showing what has changed since the last ingest. Use this skill when the operator asks "what's the status", "wiki dashboard", "how many pages", "what's stale", "what's been ingested", "show me the delta", or "wiki health overview". Also surfaces structural insights (top hubs, fragmented clusters, bridge pages) when the operator asks "wiki insights", "what's central", or "show me the hubs". Read-only: this skill reports and recommends; it does not modify any files.

    Also in 5 projects that use this

  • nexuschainsSkill

    cross-linker

    Scans the wiki vault and adds missing [[wikilinks]] between pages that are related but not yet connected. Use this skill when the operator says "link my pages", "find missing links", "cross-reference the wiki", "connect my wiki", "add wikilinks", or after any large ingest to weave new pages into the existing knowledge graph. Also trigger when orphaned pages need connecting or when wiki-lint reports fragmented tag clusters. This is a write-heavy skill — it modifies page files to insert links, unlike wiki-lint which only reports.

    Also in 4 projects that use this

  • Ivy-Chen1999Skill

    wiki-synthesize

    Systematically discover synthesis opportunities across the Obsidian wiki — pairs or clusters of concepts that co-occur frequently across pages but have no synthesis page connecting them. Creates new synthesis/ pages that draw explicit cross-cutting conclusions. Use when the user says "synthesize my wiki", "find connections", "what concepts keep coming up together", "/wiki-synthesize", or after a large ingest when the vault has grown significantly.

    Also in 4 projects that use this

  • Ivy-Chen1999Skill

    wiki-setup

    Initialize a new Obsidian wiki vault with the correct structure, special files, and configuration. Use this skill when the user wants to set up a new wiki from scratch, initialize the vault structure, create the .env file, or says things like "set up my wiki", "initialize obsidian", "create a new vault", "get started with the wiki". Also use when the user needs to reconfigure their existing vault or fix a broken setup.

    Also in 5 projects that use this

  • bozhouDevSkill

    wiki-init

    Use when bootstrapping a new personal wiki for any knowledge domain — research, codebase documentation, reading notes, competitive analysis, or any long-term knowledge accumulation project.

    Also in 7 projects that use this

  • +1 more from nexuschains
  • +4 more from Ivy-Chen1999

The file

Files
SKILL.md

Wiki Lint

对 wiki 知识库做系统性健康检查,发现问题并可选自动修复。

默认配置约定

本插件默认面向一个结构化的 Obsidian wiki knowledge base,公开版不再写死个人路径。

默认约定如下:

  • VAULT_ROOT:你的知识库根目录
  • INDEX_FILE:_Index.md
  • KNOWLEDGE_MAP_FILE:知识地图.md
  • WIKI_DIR:wiki/
  • LOG_FILE:log.md
  • 根目录固定链接名:[[_Index]]、[[知识地图]]
  • 页面必须包含 frontmatter 字段:title、tags、category、created
  • 页面必须包含章节:## 一句话定义、## 关联笔记

如果你的知识库命名或模板不同,请先修改本 skill 的默认约定。

执行流程

第一步:收集数据

并行读取以下内容:

  1. <VAULT_ROOT>/<INDEX_FILE> — 获取所有已索引条目
  2. <VAULT_ROOT>/<KNOWLEDGE_MAP_FILE> — 获取知识地图中的所有条目
  3. 用 Glob 列出 <VAULT_ROOT>/<WIKI_DIR>/*.md 所有文件
  4. 用 Grep 扫描所有 wiki 页面中的 [[...]] 链接

第二步:执行检查

按以下 6 项逐一检查:

检查 1:索引一致性

  • <WIKI_DIR>/ 下的文件是否都在 <INDEX_FILE> 中有对应条目?
  • <INDEX_FILE> 中的条目是否都有对应的 <WIKI_DIR>/*.md 文件?
  • <KNOWLEDGE_MAP_FILE> 中的条目是否与 <INDEX_FILE> 一致?

检查 2:孤儿页

  • <WIKI_DIR>/ 下的页面,是否存在没有被任何其他 wiki 页面链接的孤儿?
  • 排除 <INDEX_FILE> 和 <KNOWLEDGE_MAP_FILE> 的链接,只看 wiki 页面之间的互链

检查 3:断链

  • wiki 页面中的 [[xxx]] 链接,是否指向不存在的页面?
  • 排除 [[_Index]] 和 [[知识地图]](默认它们在根目录存在)

检查 4:缺失交叉引用

  • 读取每篇 wiki 页面的 category frontmatter
  • 同分类下的页面,关联笔记中是否互相引用了?
  • 主题高度相关但不在同一分类的页面,是否有交叉引用?(通过 tags 和标题关键词判断)

检查 5:过时内容

  • created 日期超过 180 天的页面,标记为"可能需要复查"
  • 如果原始资料源有更新版本(通过 source URL 判断),标记为"可能过时"

检查 6:格式规范

  • 每篇 wiki 页面是否包含必要的 frontmatter 字段(title, tags, category, created)?
  • 是否包含 ## 一句话定义 和 ## 关联笔记 章节?
  • 关联笔记中是否包含 [[_Index]] 和 [[知识地图]]?

第三步:输出报告

用以下格式输出:

Wiki 健康检查报告
==================

检查时间:YYYY-MM-DD

✅ 索引一致性:通过(N 篇文件,N 条索引)
⚠️ 孤儿页:2 个
   - PageA — 没有被其他 wiki 页面链接
   - PageB — 没有被其他 wiki 页面链接
❌ 断链:1 个
   - PageC 中的 [[不存在的页面]]
✅ 交叉引用:通过
⚠️ 过时内容:1 篇可能需要复查
   - PageD(创建于 2025-08-01,已超过 180 天)
✅ 格式规范:通过

总计:6 项检查,N 通过,N 警告,N 错误

第四步:询问修复

如果有可自动修复的问题,列出并询问用户:

可自动修复的问题类型:

  • 索引不一致 → 补充缺失的索引条目
  • 断链 → 移除或修正链接
  • 缺失 [[_Index]] 或 [[知识地图]] → 自动补上
  • 缺失交叉引用 → 在关联笔记中补充链接

不自动修复,只提醒:

  • 孤儿页(可能是正常的独立主题)
  • 过时内容(需要人工判断)

询问格式:

发现 N 个可自动修复的问题,是否修复?
1. 补充 _Index.md 缺失条目:PageX, PageY
2. 为 PageZ 添加 [[_Index]] 链接

用户确认后执行修复,并在 <VAULT_ROOT>/<LOG_FILE> 追加一条 lint 记录。

第五步:记录日志

在 <VAULT_ROOT>/<LOG_FILE> 追加:

## [YYYY-MM-DD] lint
- 检查项:6
- 通过:N | 警告:N | 错误:N
- 自动修复:N 项(简述)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.