vault-frontmatter
Installation
SKILL.md
Vault Frontmatter Maintenance
Offline, file-level repair of YAML frontmatter. Complements the properties skill (which uses the Obsidian CLI) by operating on .md files directly β safe for bulk mechanical passes.
When to Use
- Stripping the legacy
id:field from a batch of notes - Removing unrendered Templater markers (
<% tp.file.cursor() %>,{{title}}) - Cleaning up
nullentries insidetags:lists - Adding missing frontmatter blocks to notes that lack one
- Ensuring FVH notes carry
context: fvh - Normalizing tag case / pluralization drift
Canonical Frontmatter Shape
---
tags:
- π οΈ/neovim # emoji-prefixed category tag
- π/notes # note-type tag
context: fvh # FVH notes only
---
Rules:
- No
id:field β removed from all current templates. - 2β3 tags per note; every tag either
emoji/subcategoryor a bare note-type likeπ/moc. - No bare emoji placeholders (
π,π±,π/π±) β they indicate the tag was never specified. - No
nulltag values β YAML must be valid. - FVH/* notes carry
context: fvh; personal notes omit the field.
Detection Patterns
| Issue | Grep pattern | Notes |
|---|---|---|
Legacy id: |
^id: inside frontmatter block |
Strip entire line |
| Bare placeholder tag | YAML tag value exactly π, π±, or π/π± |
Remove if note has other useful tags; else leave |
| Null tag | YAML tag value literally null |
Remove list entry |
| Templater leak | <% tp\. or \{\{title\}\} or \{\{date\}\} |
Replace {{title}} with filename stem; strip <% tp.* %> |
| Corrupt emoji | Tag contains Unicode replacement char \ufffd |
Flag for manual fix β don't guess |
| Missing FVH context | File under FVH/ without context: fvh |
Add the line |
Edit Recipes
Strip legacy id
Before:
---
id: 20240118235900
tags: [π οΈ/neovim]
---
After:
---
tags: [π οΈ/neovim]
---
Remove bare placeholder (keeping useful tags)
Before:
tags:
- π
- π οΈ/ansible
After:
tags:
- π οΈ/ansible
Legacy MOC tag β current
Before:
tags:
- πΊοΈ
After:
tags:
- π/moc
Edit Pattern
Use Edit with small targeted old_string / new_string replacements that preserve exact indentation. Never rewrite whole files when a line edit suffices β it minimizes the commit diff and makes reviews easy.
For bulk fixes across many files, drive from a script that emits one Edit call per file rather than running sed in Bash. The commit-per-category pattern (fix(tags): strip bare π from 639 notes) relies on keeping all edits in one logical batch.
Safety
- Never write to
.obsidian/,.claude/,.git/,Files/. The safety hook enforces this. - Never add frontmatter to daily notes in
Notes/orFVH/notes/without verifying β they often don't need any. - When in doubt about what a placeholder tag meant, leave the note unchanged and report it rather than guess.
Related Skills
- properties β runtime property ops via Obsidian CLI (requires running Obsidian)
- vault-tags β tag taxonomy consolidation rules
- vault-templates β Templater convention reference
Weekly Installs
3
Repository
laurigates/clauβ¦-pluginsGitHub Stars
28
First Seen
7 days ago
Security Audits