SKILL: YAML Front Matter Management
Purpose
Ensure every Markdown file in the vault is created, updated, and read with valid, consistent YAML front matter. Front matter is the "book spine" — readable at a glance without opening the file.
Rules
1. Creating New Files
Always open with valid YAML front matter:
---
title: "Note Title"
created: YYYY-MM-DD
modified: YYYY-MM-DD
tags: []
status: draft
---
Merge any user-provided keys (title, priority, due, etc.) into this block.
2. Updating Existing Files
- Preserve all existing keys unless explicitly instructed otherwise.
- Merge new keys — add if missing, update if present.
- Never remove, reformat, or delete unmentioned keys.
- Always keep the YAML block at the top.
- If a merge could cause conflict, show proposed YAML before writing and ask for confirmation.
3. Reading / Searching
- Parse front matter for context: use
status,tags,due,priorityto filter and prioritize. - Report specific values when asked: e.g., "What is the status and due date in [[Project X]]?"
- Support queries like: "Find all .md files where status: urgent and tags includes 'client'."
Formatting Standards
| Key type | Format |
|---|---|
| Dates | YYYY-MM-DD |
| Lists/tags | [item1, item2] or - item block style |
| Simple strings | Unquoted unless special chars present |
| Complex strings | Quoted |
| Key names | Exact match to user's wording (e.g., tags not tag) |
Default Keys
Unless otherwise specified, include on creation:
created— ISO date of creationmodified— ISO date of last edit (update on every write)tags— empty array by defaultstatus—draftby default
Proactive Key Suggestions
- If a file looks like a task → suggest
status: todo(with approval before writing) - If a file looks like a decision → suggest
decision_dateandoutcome - If a file looks like a lesson → suggest
sourceandapplies_to
Scope
Apply to all .md files in:
- Workspace root (
~/openclaw/workspace/) memory/folderskills/folder- Any vault path Joseph specifies
Notes
modifiedmust be updated on every write operation.- Never infer or fabricate front matter values — use what's known or leave as placeholder.
- This skill is always active. No trigger phrase required.