Obsidian yaml frontmatter

From jykim/claude-obsidian-skills · View interactive version

Obsidian yaml frontmatter is an AI agent skill from the GitHub repository jykim/claude-obsidian-skills. Manage YAML frontmatter properties with consistent formatting, property names, and value types. Use when creating or updating frontmatter in markdown files.

How to use this skill

Skill file

YAML Frontmatter Management

Standardize YAML frontmatter properties across all vault content.

When to Use This Skill

Activate when you need to:

Note: This skill manages frontmatter PROPERTIES (keys, values, types, formatting).

For document STRUCTURE (heading hierarchy, section order, frontmatter position), use obsidian-markdown-structure skill.

Core Frontmatter Rules

1. Single YAML Block at Top

Structure:

---
property: value
---

## First Section Header

Critical Rules:

2. Standard Property Names

Use lowercase, consistent keys:

✅ CORRECT:
title: Document Title
created: 2025-10-31
tags:
  - tag1
source: https://example.com
author: Author Name

❌ INCORRECT:
Title: Document Title (capitalized)
date: 2025-10-31 (use "created" not "date")
tag: tag1 (use "tags" plural)

No Duplicate Properties:

3. Tag Formatting

CRITICAL: Plain text in YAML, NO hashtags:

✅ CORRECT:
tags:
  - journal
  - daily
  - reflection

❌ INCORRECT:
tags:
  - #journal
  - #daily

Always use list format with dashes:

✅ CORRECT (list format):
tags:
  - tag1
  - tag2

❌ INCORRECT (inline):
tags: [tag1, tag2]

4. Date Format

Use YYYY-MM-DD consistently:

✅ CORRECT:
created: 2025-10-31
updated: 2025-11-01

❌ INCORRECT:
created: 10/31/2025
created: 2025-10-31T10:30:00

5. Link Lists

Wrap wiki links in quotes:

✅ CORRECT:
sources:
  - "[[Journal/2025-10-31]]"
  - "[[Articles/2025-10-31 Title]]"

links:
  - "[[Roundup/2025-10-31]]"

attendees:
  - "[[People/John]]"
  - Jane

❌ INCORRECT:
sources:
  - [[Journal/2025-10-31]] (missing quotes)

6. Quote Values with Special Characters

Quote values containing: : # " or numeric-looking strings

Single quote wrapping (easiest for values with "):

✅ CORRECT:
title: 'He said, "Hello."'
note: 'It\'s called "PKM".'

Double quote wrapping with escaping:

✅ CORRECT:
title: "He said, \"Hello.\""
source: "https://example.com"
version: "2.0"

Literal double-quote character:

✅ CORRECT:
quote_char: '"'

Mixed quotes preference: Use double quotes, escape only " (single quotes don't need escaping):

✅ CORRECT:
note: "It's called \"PKM\"."

❌ INCORRECT:
title: AI Era: Thriving Framework (unquoted colon)
version: 2.0 (parsed as number, not string)

Multiline values (no escaping needed):

✅ CORRECT:
description: |
  He said, "Hello."
  New line preserved.

Standard Property Set

Core Properties (All Content)

---
title: Document Title
created: YYYY-MM-DD
tags:
  - category
  - type
---

Content with Sources

---
title: Article Title
created: YYYY-MM-DD
source: https://url or file path
author: Author Name
tags:
  - clipping
  - topic
---

Relational Content

---
title: Document Title
created: YYYY-MM-DD
tags:
  - category
sources:
  - "[[Source File 1]]"
  - "[[Source File 2]]"
links:
  - "[[Related Topic]]"
---

Events/Meetings

---
title: Meeting Name
created: YYYY-MM-DD
event_date: YYYY-MM-DD
attendees:
  - "[[Person 1]]"
  - Person 2
sources:
  - "[[Journal/YYYY-MM-DD#Section]]"
tags:
  - meeting
  - event
---

Workflow

Step 1: Determine Content Type

Step 2: Select Property Set

Step 3: Format Values

Step 4: Structure Check

Quality Checklist

Before completing frontmatter:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.