frontmatter-guard
Skill by garrytan
Validates and repairs YAML frontmatter on gbrain brain pages. It is for agents and users who write or audit brain pages and need malformed pages caught before they enter the brain.
Install frontmatter-guard
Built from the published package, never by AI.
git clone --depth 1 https://github.com/garrytan/gbrain /tmp/gbrain && mkdir -p ~/.claude/skills && cp -r /tmp/gbrain/skills/frontmatter-guard ~/.claude/skills/frontmatter-guardRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/garrytan/gbrain /tmp/gbrain && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/gbrain/skills/frontmatter-guard ~/.gemini/antigravity-cli/skills/frontmatter-guardAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
frontmatter-guard is an agent skill that checks YAML frontmatter on brain pages. It wraps the gbrain frontmatter CLI and checks eight validation classes, including missing closing lines, nested quotes, slug mismatches, null bytes, empty frontmatter and YAML parse failures. It reports results per source, and the validation logic is shared with the gbrain doctor frontmatter_integrity check.
The skill also explains files that sync holds instead of importing. It guides the user through a previewed gbrain repair frontmatter fix, with backups for mechanical repairs and hash-bound applies. It is meant for agent-driven workflows on gbrain brains, and it asks the user before rewriting files.
Written from the project's SKILL.md and checked against it.
What it can do
- AuditRuns a read-only scan across all registered sources and groups issues by error code.
- Validate one pathChecks a single file or directory without requiring source registration.
- FixBacks up modified files, quotes YAML values gbrain reads, and re-validates the result.
- Explain held filesReads hold records from sync output and says what each hold means and what to do.
- Preview repairsRuns gbrain repair frontmatter in passes so the user can review each change before applying.
- Pre-commit hookInstalls a git hook that validates staged Markdown files before they are committed.
- Safe writing guidanceAdvises building frontmatter with a YAML serializer and checking generated content before writing.
What you need
- gbrain CLI
- git, for the optional pre-commit hook in brain repositories
Try asking
- Validate the frontmatter on my brain pages and summarize the issues.
- Check why sync is holding a file and show the fix.
- Preview a frontmatter repair for my source before applying anything.
Good to know
- Fixes that rewrite files need the user's approval first.
- Fixing in place is refused on a managed brain; the repair command must be used instead.
- Ambiguous interpretations such as folding lines or keeping duplicates need the user to confirm.
- MISSING_OPEN and EMPTY_FRONTMATTER are never auto-fixed.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/frontmatter-guard/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md16 KB -
routing-eval.jsonl673 B
Alternatives to frontmatter-guard
All alternatives →Set up and diagnose a local agentmemory installation. It covers MCP connections, environment variables, ports, auth and feature flags, and is for users getting started or checking a connection.
Analyzes a Karpathy-pattern LLM wiki and builds an interactive knowledge graph with entities, implicit links and topic clusters. Built for people who maintain LLM-generated markdown wikis.
Saves and loads timestamped reports for AI assistants, with keyword routing for fast lookup. It also runs an Actionability Gate that checks report links before delivery. Intended for morning briefings, meeting digests and research reports.
Removes a personal fact, preference, relationship detail, topic or past event from Muse's active memory. It also stops existing copies and automations from bringing it back.
Git Context Controller (GCC) is a skill that stores agent memory as a versioned file system under .GCC/. It suits multi-step projects that need milestone tracking, branching and context recovery across sessions.
Guides an evidence-first reading of a book, article, PDF or document set. Built for readers who want claims, evidence and recall rather than a short summary.
Compare with agentmemory-config, understand-knowledge or reports
frontmatter-guard: common questions
What frontmatter errors does frontmatter-guard catch?
It checks eight classes, including MISSING_CLOSE, YAML_PARSE, SLUG_MISMATCH, NULL_BYTES, NESTED_QUOTES, NON_STRING_FIELD and EMPTY_FRONTMATTER. Some are auto-fixable and some need a human.
What happens to a file that sync holds?
The rest of the source still syncs. A new file has no page yet, and an existing page keeps its last good revision until the file is repaired.
Does the skill change files without asking?
No. The skill says to ask the user before any apply, because repairs rewrite the user's files.
How do I install frontmatter-guard?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is frontmatter-guard free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is frontmatter-guard safe to use?
It scores 90 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to frontmatter-guard?
Similar skills: agentmemory-config, understand-knowledge, reports, forget.
