obsidian
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseObsidian Vault
Obsidian Vault
Use this skill for filesystem-first Obsidian vault work: reading notes, listing notes, searching note files, creating notes, appending content, and adding wikilinks.
使用此技能进行以文件系统优先的Obsidian库操作:读取笔记、列出笔记、搜索笔记文件、创建笔记、追加内容以及添加维基链接。
Vault path
库路径
Use a known or resolved vault path before calling file tools.
The documented vault-path convention is the environment variable, for example from . If it is unset, use .
OBSIDIAN_VAULT_PATH~/.hermes/.env~/Documents/Obsidian VaultFile tools do not expand shell variables. Do not pass paths containing to , , , or ; resolve the vault path first and pass a concrete absolute path. Vault paths may contain spaces, which is another reason to prefer file tools over shell commands.
$OBSIDIAN_VAULT_PATHread_filewrite_filepatchsearch_filesIf the vault path is unknown, is acceptable for resolving or checking whether the fallback path exists. Once the path is known, switch back to file tools.
terminalOBSIDIAN_VAULT_PATH在调用文件工具之前,请使用已知或已解析的库路径。
文档化的库路径约定是环境变量,例如来自。如果未设置该变量,则使用。
OBSIDIAN_VAULT_PATH~/.hermes/.env~/Documents/Obsidian Vault文件工具不会展开shell变量。请勿将包含的路径传递给、、或;请先解析库路径,再传递具体的绝对路径。库路径可能包含空格,这也是优先使用文件工具而非shell命令的另一个原因。
$OBSIDIAN_VAULT_PATHread_filewrite_filepatchsearch_files如果库路径未知,可以使用来解析或检查备用路径是否存在。一旦路径已知,请切换回文件工具。
terminalOBSIDIAN_VAULT_PATHRead a note
读取笔记
Use with the resolved absolute path to the note. Prefer this over because it provides line numbers and pagination.
read_filecat使用并传入笔记的已解析绝对路径。优先选择此方式而非,因为它会提供行号和分页功能。
read_filecatList notes
列出笔记
Use with and the resolved vault path. Prefer this over or .
search_filestarget: "files"findls- To list all markdown notes, use under the vault path.
pattern: "*.md" - To list a subfolder, search under that subfolder's absolute path.
使用并设置以及已解析的库路径。优先选择此方式而非或。
search_filestarget: "files"findls- 要列出所有Markdown笔记,请在库路径下使用。
pattern: "*.md" - 要列出子文件夹,请在该子文件夹的绝对路径下进行搜索。
Search
搜索
Use for both filename and content searches. Prefer this over , , or .
search_filesgrepfindls- For filenames, use with
search_filesand a filenametarget: "files".pattern - For note contents, use with
search_files, the content regex astarget: "content", andpatternwhen you want to restrict matches to markdown notes.file_glob: "*.md"
使用进行文件名和内容搜索。优先选择此方式而非、或。
search_filesgrepfindls- 搜索文件名时,使用并设置
search_files以及文件名target: "files"。pattern - 搜索笔记内容时,使用并设置
search_files,将内容正则表达式作为target: "content",当需要将匹配限制在Markdown笔记时,设置pattern。file_glob: "*.md"
Create a note
创建笔记
Use with the resolved absolute path and the full markdown content. Prefer this over shell heredocs or because it avoids shell quoting issues and returns structured results.
write_fileecho使用并传入已解析的绝对路径和完整的Markdown内容。优先选择此方式而非shell heredocs或,因为它可以避免shell引用问题并返回结构化结果。
write_fileechoAppend to a note
追加内容到笔记
Prefer a native file-tool workflow when it is not awkward:
- Read the target note with .
read_file - Use for an anchored append when there is stable context, such as adding a section after an existing heading or appending before a known trailing block.
patch - Use when rewriting the whole note is clearer than constructing a fragile patch.
write_file
For an anchored append with , replace the anchor with the anchor plus the new content.
patchFor a simple append with no stable context, is acceptable if it is the clearest safe option.
terminal当操作不繁琐时,优先使用原生文件工具流程:
- 使用读取目标笔记。
read_file - 当存在稳定上下文时,使用进行锚定追加,例如在现有标题后添加章节或在已知末尾块之前追加内容。
patch - 当重写整个笔记比构建脆弱的补丁更清晰时,使用。
write_file
使用进行锚定追加时,将锚点替换为锚点加新内容。
patch对于没有稳定上下文的简单追加,如果是最清晰的安全选项,则可以使用它。
terminalTargeted edits
定向编辑
Use for focused note changes when the current content gives you stable context. Prefer this over shell text rewriting.
patch当当前内容提供稳定上下文时,使用进行针对性的笔记修改。优先选择此方式而非shell文本重写。
patchWikilinks
维基链接
Obsidian links notes with syntax. When creating notes, use these to link related content.
[[Note Name]]Obsidian使用语法来链接笔记。创建笔记时,请使用此语法链接相关内容。
[[Note Name]]