Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

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.

  • Score 90
  • 34k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

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-guard

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install frontmatter-guard in Claude Code

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

A

No 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 →

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.

frontmatter-guard Install

Add to stack

Loading.