Community生产力与协作github.com

tderoussel/vault-doctor

审计并修复 Obsidian 仓库的结构健康问题 —— 断链 [[wikilinks]]、重复文件名、缺失或格式错误的 frontmatter、过时状态标记以及状态节已冷却的中心笔记。当用户询问仓库健康、断链、仓库清理、死链、孤立笔记、标签一致性,或感觉仓库凌乱或过时时使用。触发短语包括“仓库健康”、“断链”、“清理仓库”、“审计仓库”、“仓库是否最新”。默认只读;每项修复在实施前都会先提出建议。

vault-doctor 是什么?

Vault Doctor 是一个专门为 Obsidian 仓库设计的审计与修复技能,旨在解决常见的结构性健康问题,如断链、重复文件名、格式错误的 frontmatter、过时状态标记和已冷却的中心笔记。它的核心价值在于对仓库的不可逆操作持极其谨慎的态度 —— 默认只读,每次修复前都会先提出建议并等待用户批准。该技能支持扫描所有 `.md` 文件,跳过 `node_modules`、`.git`、`.obsidian` 等目录,构建完整的链接目标集合。它将断链分为四类:跨系统引用(不应“修复”)、有意为之的断链(绝不触碰)、名称漂移(优先修复目标而非源头)以及真正缺失的笔记(报告但不自动创建)。除了链接问题,它还检查重复文件名、frontmatter 解析错误、标签一致性、状态标记过时以及中心笔记冷却情况。输出结果按分类排序,包含精确的 `文件:行号` 引用,清晰说明哪些发现是**已验证**的,哪些是基于**命名推断**的。

兼容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/tderoussel/agent-skills/tree/main/skills/vault-doctor

Installed? Explore more 生产力与协作 skills: steipete/gemini, steipete/gh-issues, steipete/skill-creator · View all 6 →

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Vault doctor

大多数 Obsidian 仓库没有 git 也没有撤销功能,许多通过 iCloud、OneDrive 或 Dropbox 实时同步。将每次写入视为不可逆操作。在触及任何内容之前确认仓库的实际备份情况,覆盖前先读取,优先进行精准编辑而非重写整个文件,绝不要执行快速写入循环 —— 在同步文件夹上会产生冲突副本。

扫描

遍历 .md 文件,跳过 node_modules、.git、.obsidian 以及仓库中积累的任何构建或临时目录。从每个文件的基础名(包括附件,不仅仅是 .md)构建链接目标集合,然后提取 [[目标]],去除 |别名、#标题 和 ^块 后缀。

记录基线 —— 笔记数量、不同断链目标数量、总断链引用数、重复的基础名 —— 以便后续运行可以显示变化,而不是重复相同的统计。

分类后再修复

原始断链数量并非缺陷列表。将每个命中分类到四个桶中之一:

1. 跨系统引用 —— 不要“修复”。 有些目标根本不是仓库笔记:代理内存 ID、工单键或来自其他工具的标识符,恰好以 wikilink 语法书写。它们永远不会解析。将其转换为纯文本是合理的;创建桩笔记来满足它们则不可取。

2. 有意为之的断链 —— 绝不触碰。 有些笔记故意引用一个断链,作为示例或练习的真实依据(“如果你的工具找不到这个,那你的工具有问题”)。编辑这些内容会破坏它们所教授的东西。在散文中引用的 wikilink 语法属于同一类别。

3. 名称漂移 —— 修复目标,而非源头。 当许多引用指向一个短名称,而笔记却存放在一个较长名称下时,优先在目标的 frontmatter 中添加 aliases: [短名称],而不是编辑每个引用文件。 一次编辑,原生 Obsidian 机制,没有破坏周围上下文的风险。

4. 真正缺失的笔记。 目标从未存在过。报告它;不要自动创建。空的桩笔记比断链更糟糕,因为它看起来像是已回答了。

禁止查找并替换

切勿使用无范围的查找并替换来修复链接。 在仓库中盲目替换会破坏恰好包含搜索字符串的文件夹名称、URL、代码块和标签词汇 —— 而且因为没有撤销功能,损害是永久的。逐个文件修复,先读取周围行。

其他检查

  • 重复的基础名 会使链接在整个仓库范围内变得模糊,因为 Obsidian 通过文件名在整个仓库中解析 [[链接]]。常见的罪魁祸首是仓库中的代码项目或依赖树,贡献了数千个虚假的 .md 文件。标记它;修复方法是将项目移出仓库或添加排除项。未经询问不要删除任何内容。

  • Frontmatter 必须实际可解析。 对每个块运行真正的 YAML 解析器 —— 不要靠目测。主要的失败原因是未加引号的纯标量包含 : (冒号-空格),它在该字符处失败,并将其下面的每个键都一同拖垮,使整个块对 Obsidian 的 Properties 面板和 Dataview 都不可见。第二个常见失败原因:以 | 或 > 开头的未加引号的值会打开 YAML 块标量。

    修复意味着引用值,对于一个负载巨大的笔记,可能涉及数百个键 —— 先提出建议,绝不要擅自执行,并首先备份文件。在修复完成之前,遵循现有的(损坏的)约定,而不是引入第二种风格;无效块中的孤立有效键毫无用处。

  • 标签 应以 YAML 列表形式存在,而非内联标签 —— 对照仓库的实际词汇表进行检查,而非理想化的词汇表。报告漂移;不要单方面重新打标签。

  • 过时状态 —— 带有 PAUSED/STALLED/TODO 标记但其项目后续已有进展的笔记。报告它们;不要自行解决。

  • 冷却中心笔记 —— 中心笔记的最新状态节早于其项目最近活动,说明已过时。报告差距。

输出

一份按分类排序的报告,包含计数和精确的 文件:行号 引用。提出修复建议;只执行用户批准的那些修复。

清晰说明哪些发现是已验证的,哪些是基于命名推断的 —— 看起来像漂移的目标可能是用户打算撰写的笔记。

Individual skills in this repo

This repo contains 8 individual skills — each has its own dedicated page.

tderoussel/codebase-audit

Runs a ranked, evidence-backed audit of a product, codebase, or subsystem, ending in a verify list that separates proven findings from inferred ones. Use when the user asks for an audit, a gap analysis, a deep read, a bug hunt, a readiness check, a re-audit, a state reconciliation, or asks what they are not seeing. Trigger phrases include "audit", "gap analysis", "what am I missing", "deep audit", "readiness", "bug hunt", "review the whole thing". Produces findings and a verify list; does not fix.

tderoussel/competitive-teardown

Researches a competing product against your own and produces a ranked build-or-ignore verdict, plus optional comparison-page copy. Use when the user names a competitor or asks how their product stacks up against one. Trigger phrases include "vs us", "competitor", "what does X have", "should we copy", "competitive gap", "teardown", "are we behind". Produces a ranked verdict with effort estimates and an explicit not-worth-copying list.

tderoussel/decision-council

Run a structured multi-perspective review of a decision instead of getting one agreeable answer. Use when the user says run a council, get me perspectives on this, should I do X, stress-test this decision, or is this a good idea.

tderoussel/fleet-brief

Authors a workstream brief for dispatching multiple parallel build agents across one codebase, with per-lane file ownership, shared-ground warnings, and a derived DO-NOT list. Use whenever work is about to be split across concurrent agents, workers, lanes, or waves — even if the user does not say "write a brief". Trigger phrases include "fan out", "parallel agents", "orchestrate this", "split into lanes", "workstreams", "run these in parallel", "review-gated build". Produces the brief; does not dispatch.

tderoussel/inbox-triage

Triage an email inbox — sort what needs a reply, draft the replies, flag what needs a decision, and surface what can be ignored or unsubscribed. Use when the user says triage my inbox, do my email, what's in my inbox, or clean up my email.

tderoussel/overnight-build

Composes an autonomous unattended Claude Code build prompt that survives usage-limit resets via BUILD_LOG.md checkpointing, plus the launcher that restarts it. Use when the user asks for an overnight build, an autonomous build, a build to run while they sleep, an unattended or unsupervised session, or any long build they will not be monitoring. Trigger phrases include "overnight build", "run overnight", "build while I sleep", "autonomous build", "let it run", "unattended". Produces a single copyable prompt; does not run the build.

tderoussel/session-log

Write a durable record of a work session — what was built, root-caused, or shipped — into the project's notes. Use when the user says log this session, write a session log, record this, or when a substantial piece of work has just finished and needs to be handed off to a future session.

tderoussel/ship-gate

Verification gate for a Next.js-on-Vercel + Supabase + GitHub Actions stack, to run before claiming anything is shipped, deployed, live, merged, passing, or done. Use before saying a change is in production, before merging a PR, before reporting CI green, and before writing any status into a document — even if the user does not ask for verification. Trigger phrases include "is it live", "did it deploy", "ship it", "merge it", "is CI green", "confirm prod", "did that work". Encodes traps where the obvious check returns a false pass.

相关技能