Organize Obsidian vaults with MOCs, wikilinks, frontmatter/properties, dashboards, orphan-note checks, and cleanup workflows. Use ONLY when the user explicitly
复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-obsidian-vault-d720ccc891bc ,按照其中的说明把「obsidian-vault」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
Help the user organize and maintain an Obsidian vault: build navigation with MOCs and wikilinks, normalize metadata, generate dashboards, find and fix orphans, organize folders, deduplicate/rename, and prepare the vault for AI use.
Obsidian-specific facts that shape every rule here:
[[Note title]].
Renaming a note auto-updates links inside Obsidian, but moving files outside
Obsidian breaks them — always rename via Obsidian when possible.Before acting, confirm the vault's root folder and whether the user has the Dataview plugin installed (Bases is built in since Obsidian 1.9). When a request is ambiguous (organize vs. clean up vs. dashboard), ask which task.
[[Three laws of motion]] — resolves by filename, no extension/path.[[atomic-habits|James Clear — Atomic Habits]].[[Note#Section]]. Block link: [[Note#^block-id]].![[Note]], ![[Note#Section]], ![[image.png]].aliases property so the note resolves under other names.# | ^ : % and [ ] in filenames — they have special meaning in links.When adding links, also surface unlinked mentions: if a note's title appears as plain text in other notes, convert those to wikilinks.
A MOC is a note that links the related notes on a topic — the vault's navigation layer (more flexible than folders or tags, and needs no institutional knowledge).
Conventions:
tags: [moc] (or a type: moc property) so
every MOC is itself discoverable.MOC template:
---
type: moc
tags: [moc]
updated: 2026-06-18
---
# Auth — Map of Content
Notes on authentication, sessions, and access control.
## Core
- [[auth-flow]]
- [[session-tokens]]
## Related MOCs
- [[security-moc]]
Add a consistent property block to every note. Recommended baseline:
---
title: Session tokens
aliases: [tokens, session token]
tags: [auth, security]
type: note # note | moc | dashboard | template | person | project
created: 2026-06-18
updated: 2026-06-18
status: evergreen # seedling | growing | evergreen
related: ["[[auth-flow]]"]
---
Rules:
auth/tokens) are fine. Don't let tags sprawl.tags use no # in frontmatter. Dates in ISO YYYY-MM-DD.created, not created/date/Created) and migrate the rest.Pick the engine based on the user's setup:
Bases (native, editable, fast — best for operational boards):
.base file or a base code block; it builds table/board views from
properties. Each cell edits the underlying note's frontmatter.Dataview (plugin, read-only, most flexible — best for reports/auto-MOCs):
TABLE status, updated, tags
FROM #auth
WHERE type = "note"
SORT updated DESC
Auto-MOC of everything in a topic:
LIST FROM #auth WHERE type != "moc" SORT file.name ASC
Recently updated:
TABLE updated FROM "" WHERE updated >= date(today) - dur(7 days) SORT updated DESC
Note: large vaults can lag with heavy Dataview queries — prefer Bases there.
An orphan is a note with no inbound or outbound links. To find and fix:
start_search
the vault for [[ ]] links to each note's title — zero hits means no inbound
links (an unlinked note); to confirm a true orphan (no inbound and no
outbound), also scan the note's own body for [[...]]. The same searches
surface unlinked mentions (the title as plain text, not wrapped in [[ ]])
and broken links (a [[target]] whose file is missing).LIST WHERE length(file.inlinks) = 0 AND length(file.outlinks) = 0
edit_block to insert the
wikilink), tag it #needs-link for a batch pass, or archive if obsolete.edit_block; resolve the rest from Obsidian's right sidebar.00-inbox/ # unsorted captures
10-notes/ # atomic notes
20-mocs/ # maps of content
30-projects/
90-assets/ # images/attachments
99-archive/
templates/
90-assets/.move_file for these, it breaks every [[link]]. From Desktop
Commander, only edit content (edit_block / write_file); leave moving and
renaming to the user in the app.start_search titles/aliases to find near-identical notes;
merge into one, keep the most-linked filename, copy unique content with
edit_block, then start_search for inbound [[links]] to the discarded note
and repoint them before deleting it.F2) so backlinks update —
not via move_file. Keep an aliases entry for the old name if it was widely
referenced.summary/description property per note for quick scanning.[[ ]].write_file topic MOCs → edit_block notes to link them
in → refresh the Home MOC → convert unlinked mentions.read_multiple_files to audit properties → pick
canonical names → edit_block each note → add missing baseline properties.start_search for orphans, broken links, and unlinked
mentions → dedupe → report what changed (renames stay in Obsidian).write_file the view from properties/tags.updated bumped on changed notes.