obsidian-vault-ops

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Obsidian 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 content
vault-root/
├── CLAUDE.md           # 主上下文文件(始终优先读取)
├── Daily Notes/        # 格式为YYYY-MM-DD.md的文件
├── Goals/              # 目标层级文件
├── Projects/           # 包含CLAUDE.md的项目文件夹
├── Templates/          # 可复用的笔记结构模板
└── Archives/           # 已完成/停用的内容

File Operations

文件操作

Reading Notes

读取笔记

  • Use Glob to find files:
    *.md
    ,
    Daily Notes/*.md
  • Read CLAUDE.md first for vault context
  • Check for wiki-links to related notes
  • 使用Glob匹配文件:
    *.md
    ,
    Daily Notes/*.md
  • 优先读取CLAUDE.md获取Vault上下文
  • 检查指向相关笔记的wiki链接

Creating Notes

创建笔记

  1. Check if note already exists
  2. Use appropriate template if available
  3. Add YAML frontmatter with date and tags
  4. Insert wiki-links to related notes
  1. 检查笔记是否已存在
  2. 如有可用模板则使用对应模板
  3. 添加包含日期和标签的YAML前置元数据
  4. 插入指向相关笔记的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 section
markdown
[[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:
  • {{date}}
    - Today's date (YYYY-MM-DD)
  • {{date:format}}
    - Formatted date
  • {{date-1}}
    - Yesterday
  • {{date+1}}
    - Tomorrow
  • {{time}}
    - Current time
处理模板时,替换以下变量:
  • {{date}}
    - 今日日期(YYYY-MM-DD格式)
  • {{date:format}}
    - 格式化后的日期
  • {{date-1}}
    - 昨日日期
  • {{date+1}}
    - 明日日期
  • {{time}}
    - 当前时间

Common Patterns

常见操作模式

Daily Note Creation

每日笔记创建

  1. Calculate today's date in YYYY-MM-DD format
  2. Check if
    Daily Notes/{date}.md
    exists
  3. If not, read
    Templates/Daily Template.md
  4. Replace template variables
  5. Write to
    Daily Notes/{date}.md
  1. 计算今日日期(YYYY-MM-DD格式)
  2. 检查
    Daily Notes/{date}.md
    是否存在
  3. 若不存在,读取
    Templates/Daily Template.md
  4. 替换模板变量
  5. 写入至
    Daily Notes/{date}.md

Finding Related Notes

查找相关笔记

  1. Extract key terms from current note
  2. Search vault for matching content
  3. Suggest wiki-links to related notes
  1. 从当前笔记中提取关键词
  2. 在Vault中搜索匹配内容
  3. 建议添加指向相关笔记的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

最佳实践

  1. Always check CLAUDE.md for vault-specific conventions
  2. Preserve existing structure when editing
  3. Use relative paths for internal links
  4. Add frontmatter to new notes
  5. Link to relevant goals when creating tasks
  1. 始终先查看CLAUDE.md了解Vault的特定约定
  2. 编辑时保留现有结构
  3. 内部链接使用相对路径
  4. 为新笔记添加前置元数据
  5. 创建任务时关联相关目标