properties

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Obsidian Properties Management

Obsidian属性管理

When to Use This Skill

何时使用此技能

Use this skill when...Use the alternative instead when...
Reading, setting, or removing a single YAML property on a live note via the running CLIDoing offline bulk frontmatter rewrites across many files — use
vault-frontmatter
Updating
status:
,
tags:
, or
aliases:
on a note Obsidian currently has open
Editing note body content rather than frontmatter — use
vault-files
Confirming a property change is reflected in Obsidian's metadata cacheRepairing broken wikilinks after a rename — use
vault-wikilinks
Read, set, and remove YAML frontmatter properties on Obsidian notes using the official CLI.
适用场景替代方案适用场景
通过运行中的CLI读取、设置或删除实时笔记中的单个YAML属性对多个文件进行离线批量frontmatter重写——使用
vault-frontmatter
更新Obsidian当前打开笔记的
status:
tags:
aliases:
编辑笔记正文内容而非frontmatter——使用
vault-files
确认属性变更已同步到Obsidian的元数据缓存重命名后修复损坏的维基链接——使用
vault-wikilinks
通过官方CLI读取、设置和删除Obsidian笔记的YAML frontmatter属性。

Prerequisites

前提条件

  • Obsidian desktop v1.12.4+ with CLI enabled
  • Obsidian must be running
  • 已启用CLI的Obsidian桌面版v1.12.4+
  • Obsidian必须处于运行状态

When to Use

适用场景

Use this skill automatically when:
  • User wants to read or inspect note metadata/frontmatter
  • User needs to set, update, or add properties to notes
  • User wants to remove properties from notes
  • User asks about note status, tags, dates, or custom fields
  • User needs to manage aliases on notes
当出现以下情况时自动使用此技能:
  • 用户想要读取或查看笔记元数据/frontmatter
  • 用户需要为笔记设置、更新或添加属性
  • 用户想要删除笔记中的属性
  • 用户询问笔记状态、标签、日期或自定义字段
  • 用户需要管理笔记的别名

Core Operations

核心操作

Read Properties

读取属性

bash
undefined
bash
undefined

Read all properties from a note

读取某条笔记的所有属性

obsidian properties file="Project Spec"
obsidian properties file="Project Spec"

JSON output for parsing

输出JSON格式以便解析

obsidian properties file="Project Spec" format=json
undefined
obsidian properties file="Project Spec" format=json
undefined

Set Properties

设置属性

bash
undefined
bash
undefined

Set a text property

设置文本属性

obsidian properties:set file="Note" status=active
obsidian properties:set file="Note" status=active

Set a date property

设置日期属性

obsidian properties:set file="Note" due=2026-03-15 type=date
obsidian properties:set file="Note" due=2026-03-15 type=date

Set multiple properties

设置多个属性

obsidian properties:set file="Note" status=draft priority=high
obsidian properties:set file="Note" status=draft priority=high

Set tags property

设置标签属性

obsidian properties:set file="Note" tags="blog,publish" type=tags
undefined
obsidian properties:set file="Note" tags="blog,publish" type=tags
undefined

Remove Properties

删除属性

bash
undefined
bash
undefined

Remove a single property

删除单个属性

obsidian properties:remove file="Note" key=draft
obsidian properties:remove file="Note" key=draft

Remove multiple properties

删除多个属性

obsidian properties:remove file="Note" key=old_field
undefined
obsidian properties:remove file="Note" key=old_field
undefined

Property Types

属性类型

TypeExampleNotes
Text
status=active
Default type
Date
due=2026-03-15 type=date
ISO 8601 format
Tags
tags="a,b" type=tags
Comma-separated
Number
priority=1
Numeric values
Boolean
published=true
true/false
List
aliases="Name1,Name2" type=tags
Comma-separated
类型示例说明
文本
status=active
默认类型
日期
due=2026-03-15 type=date
ISO 8601格式
标签
tags="a,b" type=tags
逗号分隔
数字
priority=1
数值型
布尔值
published=true
true/false
列表
aliases="Name1,Name2" type=tags
逗号分隔

Common Patterns

常见模式

Status Workflow

状态工作流

bash
undefined
bash
undefined

Set draft status

设置草稿状态

obsidian properties:set file="Post" status=draft
obsidian properties:set file="Post" status=draft

Move to review

转为审核状态

obsidian properties:set file="Post" status=review
obsidian properties:set file="Post" status=review

Mark published

标记为已发布

obsidian properties:set file="Post" status=published published=true
undefined
obsidian properties:set file="Post" status=published published=true
undefined

Alias Management

别名管理

bash
undefined
bash
undefined

Add aliases for wikilink resolution

添加别名以支持维基链接解析

obsidian properties:set file="JavaScript" aliases="JS,js,ECMAScript" type=tags
undefined
obsidian properties:set file="JavaScript" aliases="JS,js,ECMAScript" type=tags
undefined

Agentic Optimizations

智能优化

ContextCommand
Read properties (structured)
obsidian properties file="X" format=json
Set property
obsidian properties:set file="X" key=value
Remove property
obsidian properties:remove file="X" key=field
Typed property
obsidian properties:set file="X" field=val type=date
场景命令
读取属性(结构化格式)
obsidian properties file="X" format=json
设置属性
obsidian properties:set file="X" key=value
删除属性
obsidian properties:remove file="X" key=field
带类型的属性设置
obsidian properties:set file="X" field=val type=date

Related Skills

相关技能

  • vault-files — Read and create notes
  • search-discovery — Search by property values with
    [key:value]
    syntax
  • vault-files — 读取和创建笔记
  • search-discovery — 使用
    [key:value]
    语法按属性值搜索