Frontmatter Guard Skill
Convention: see
skills/conventions/quality.mdfor citation rules; this skill is structural validation, not citation auditing.
Contract
This skill guarantees:
- Every brain page is scanned against the eight canonical frontmatter validation classes
- Mechanical errors (nested quotes, missing closing
---, null bytes, slug mismatch) are auto-repairable on demand with.bakbackups - Validation logic is shared with
gbrain doctor'sfrontmatter_integritysubcheck — single source of truth - Reports per source (gbrain is multi-source since v0.18.0); never silently audits the wrong root
Why This Exists
Brain pages pile up over months. Agents write them with malformed frontmatter:
- Missing closing
---(entity detector bugs) - Unstructured YAML in meeting pages (ingestion bugs)
- Slug mismatches (path renames not propagated)
- Null bytes (binary corruption from copy-paste accidents)
- Nested double quotes in titles (
title: "Alice "Ace" Example")
Without a guard, these accumulate silently until gbrain sync chokes or search returns garbage. The guard makes the failure visible at audit time and trivially fixable.
Validation classes
…