Community生產力與協作github.com

tderoussel/vault-doctor

審計並修復 Obsidian 筆記庫的結構健康狀況——錯誤的 [[wikilink]]、重複的模糊檔名、缺失或格式錯誤的 frontmatter、過時的狀態標記,以及樞紐筆記(hub notes)中已冷卻的狀態區塊。當使用者詢問筆記庫健康、斷鏈、筆記庫清理、孤立筆記、標籤一致性,或表示筆記庫感覺雜亂或過期時使用。觸發短語包括「筆記庫健康」、「斷鏈」、「清理筆記庫」、「審計筆記庫」、「筆記庫是否最新」。預設為唯讀;每次修復都會先提案再執行。

vault-doctor 是什麼?

Vault doctor 是一個 AI 代理技能,用於審計和修復 Obsidian 筆記庫的結構健康。它掃描 `.md` 檔案(跳過 `node_modules`、`.git`、`.obsidian` 等目錄),建立所有連結目標的清單,並提取 `[[wikilinks]]`,同時處理別名、標題和區塊後綴。技能將斷鏈分為四類:跨系統引用(不修復)、故意文獻記錄(不觸碰)、名稱漂移(透過在目標 frontmatter 增加 `aliases` 來修復)以及真正遺失的筆記(僅報告,不自動建立)。它也檢查重複的檔名、frontmatter 是否有效(使用真正的 YAML 解析器)、標籤一致性、過時的狀態標記以及冷卻的樞紐筆記。所有修復都需經使用者核准;預設為唯讀模式,以防止在沒有版本控制的同步筆記庫中造成不可逆的損壞。此技能支援 Claude Code、Cline 和 Roo Code 等平台。

相容平台~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. 斷鏈的文件記錄——永遠不要觸碰。 有些筆記故意引用一個斷鏈,作為範例或練習的真實情況(「如果你的工具找不到這個,那你的工具就錯了」)。編輯這些內容會破壞它們所教授的東西。以 prose 形式引用的 wikilink 語法也屬於同一類別。

3. 名稱漂移——修復目標,而非來源。 當許多引用指向一個短名稱,而筆記存檔在一個較長的名稱下時,優先考慮在目標的 frontmatter 中增加 aliases: [短名稱],而不是編輯每個引用檔案。 一次編輯,一個原生 Obsidian 機制,沒有破壞周圍上下文的風險。

**4. 真正遺失的筆記。**目標從未存在過。報告它;不要自動建立。空的暫存筆記比斷鏈更糟糕,因為它看起來像是已回答了。

禁止尋找與取代

絕對不要使用無範圍的尋找與取代來修復連結。 在整個筆記庫中進行盲目取代,會破壞恰好包含搜尋字串的資料夾名稱、URL、程式碼區塊和標籤詞彙——而且由於沒有復原機制,損壞是永久的。逐檔修復,先讀取周圍的行。

其他檢查

  • 重複的基本名稱會使連結在整個筆記庫中變得模糊,因為 Obsidian 會根據整個筆記庫的檔案名稱解析 [[連結]]。常見的罪魁禍首是存在於筆記庫中的程式碼專案或依賴樹,貢獻了數千個幽靈 .md 檔案。標記它;解決方法是將專案移出筆記庫或增加排除規則。未經詢問,不要刪除任何內容。

  • Frontmatter 必須實際解析。 使用真正的 YAML 解析器處理每個區塊——不要用肉眼檢查。主要的失敗是未引用的純量包含 : (冒號空格),這會在那個字元處失敗,並將它下面的每個鍵都一起帶走,使整個區塊對 Obsidian 的屬性面板和 Dataview 都不可見。第二個常見的失敗:以 | 或 > 開頭的未引用值會開啟一個 YAML 區塊純量。

    修復意味著引用值,這在一個承載大量內容的筆記上可能會觸及數百個鍵——先提案,絕不擅自執行,而且要先備份檔案。在修復完成之前,請符合現有(已損壞)的慣例,而不是引入第二種風格;一個無效區塊中的孤立有效鍵毫無用處。

  • 標籤應屬於 YAML 中的清單,而不是行內的主題標籤——根據筆記庫實際的詞彙進行檢查,而不是理想化的詞彙。報告漂移;不要單方面重新標籤。

  • 過時的狀態——帶有 PAUSED/STALLED/TODO 標記的筆記,但其專案已經繼續推進。報告它們;不要自行解決。

  • 冷卻的樞紐筆記——如果一個樞紐筆記最新的狀態區塊早於其專案的最新活動,則表示已過時。報告這個差距。

輸出

一份報告,按類別排序,包含計數和精確的 file:line 引用。提案修復;只執行使用者批准的修復。

清楚說明哪些發現是已驗證的,哪些是根據命名推斷的——一個看起來像漂移的目標,可能是使用者打算要寫的筆記。

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.

相關技能