obsidian-vault-ops
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseObsidian Vault Operations Skill
Obsidian Vault 操作技能
Core operations for reading, writing, and managing files in an Obsidian vault.
用于在Obsidian Vault中读取、写入和管理文件的核心操作。
Vault Structure
Vault 结构
vault-root/
├── CLAUDE.md # Main context (always read first)
├── Daily Notes/ # YYYY-MM-DD.md format
├── Goals/ # Goal cascade files
├── Projects/ # Project folders with CLAUDE.md
├── Templates/ # Reusable note structures
└── Archives/ # Completed/inactive contentvault-root/
├── CLAUDE.md # 主上下文文件(始终优先读取)
├── Daily Notes/ # 格式为YYYY-MM-DD.md的文件
├── Goals/ # 目标层级文件
├── Projects/ # 包含CLAUDE.md的项目文件夹
├── Templates/ # 可复用的笔记结构模板
└── Archives/ # 已完成/停用的内容File Operations
文件操作
Reading Notes
读取笔记
- Use Glob to find files: ,
*.mdDaily Notes/*.md - Read CLAUDE.md first for vault context
- Check for wiki-links to related notes
- 使用Glob匹配文件:,
*.mdDaily Notes/*.md - 优先读取CLAUDE.md获取Vault上下文
- 检查指向相关笔记的wiki链接
Creating Notes
创建笔记
- Check if note already exists
- Use appropriate template if available
- Add YAML frontmatter with date and tags
- Insert wiki-links to related notes
- 检查笔记是否已存在
- 如有可用模板则使用对应模板
- 添加包含日期和标签的YAML前置元数据
- 插入指向相关笔记的wiki链接
Editing Notes
编辑笔记
- Preserve YAML frontmatter structure
- Maintain existing wiki-links
- Use consistent heading hierarchy
- Apply standard tag format
- 保留YAML前置元数据结构
- 维护现有wiki链接
- 使用统一的标题层级
- 应用标准标签格式
Wiki-Link Format
Wiki链接格式
markdown
[[Note Name]] # Simple link
[[Note Name|Display Text]] # Link with alias
[[Note Name#Section]] # Link to sectionmarkdown
[[Note Name]] # 简单链接
[[Note Name|Display Text]] # 带别名的链接
[[Note Name#Section]] # 指向章节的链接YAML Frontmatter
YAML前置元数据
Standard frontmatter structure:
yaml
---
date: 2024-01-15
tags: [tag1, tag2]
status: active
---标准前置元数据结构:
yaml
---
date: 2024-01-15
tags: [tag1, tag2]
status: active
---Template Variables
模板变量
When processing templates, replace:
- - Today's date (YYYY-MM-DD)
{{date}} - - Formatted date
{{date:format}} - - Yesterday
{{date-1}} - - Tomorrow
{{date+1}} - - Current time
{{time}}
处理模板时,替换以下变量:
- - 今日日期(YYYY-MM-DD格式)
{{date}} - - 格式化后的日期
{{date:format}} - - 昨日日期
{{date-1}} - - 明日日期
{{date+1}} - - 当前时间
{{time}}
Common Patterns
常见操作模式
Daily Note Creation
每日笔记创建
- Calculate today's date in YYYY-MM-DD format
- Check if exists
Daily Notes/{date}.md - If not, read
Templates/Daily Template.md - Replace template variables
- Write to
Daily Notes/{date}.md
- 计算今日日期(YYYY-MM-DD格式)
- 检查是否存在
Daily Notes/{date}.md - 若不存在,读取
Templates/Daily Template.md - 替换模板变量
- 写入至
Daily Notes/{date}.md
Finding Related Notes
查找相关笔记
- Extract key terms from current note
- Search vault for matching content
- Suggest wiki-links to related notes
- 从当前笔记中提取关键词
- 在Vault中搜索匹配内容
- 建议添加指向相关笔记的wiki链接
Tag Operations
标签操作
- Priority: ,
#priority/high,#priority/medium#priority/low - Status: ,
#active,#waiting,#completed#archived - Context: ,
#work,#personal,#health#learning
- 优先级:,
#priority/high,#priority/medium#priority/low - 状态:,
#active,#waiting,#completed#archived - 上下文:,
#work,#personal,#health#learning
Best Practices
最佳实践
- Always check CLAUDE.md for vault-specific conventions
- Preserve existing structure when editing
- Use relative paths for internal links
- Add frontmatter to new notes
- Link to relevant goals when creating tasks
- 始终先查看CLAUDE.md了解Vault的特定约定
- 编辑时保留现有结构
- 内部链接使用相对路径
- 为新笔记添加前置元数据
- 创建任务时关联相关目标