frontmatter-guard

Validate and auto-repair YAML frontmatter in brain markdown pages.

5|1|Updated Apr 15, 2026
One-click install
npx skills add https://github.com/GYF0311/lorekit --skill frontmatter-guard-gyf0311
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: frontmatter-guard
Source: https://github.com/GYF0311/lorekit/tree/main/brain/skills/frontmatter-guard
Command: npx skills add https://github.com/GYF0311/lorekit --skill frontmatter-guard-gyf0311

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Prevents malformed YAML frontmatter in brain pages from silently breaking later wiki builds by validating and auto-repairing structural issues before they propagate.

Core Features & Use Cases

  • Frontmatter validation with seven canonical checks: catches missing delimiters, YAML parse failures, null bytes, slug mismatches, nested-quote title issues, and empty frontmatter (when applicable).
  • Audit, validate, and fix workflows: run a repository-wide JSON audit, validate a specific path, and optionally apply safe fixes with .bak backups.
  • Safety-oriented guardrails: avoids auto-fixing ambiguous cases like missing open markers or empty frontmatter without explicit user input, and surfaces per-source results to prevent auditing the wrong root.

Quick Start

Ask your agent to run a frontmatter audit and return the JSON summary for the current brain sources.

Frequently Asked Questions about frontmatter-guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate YAML frontmatter in markdown files to prevent broken wiki builds?

Validating YAML frontmatter in markdown pages involves checking for missing delimiters, YAML parse failures, null bytes, slug mismatches, and nested quotes to prevent corrupted wiki artifacts and broken downstream tooling.

How do I batch audit frontmatter issues across an entire markdown wiki repository?

Batch auditing frontmatter issues involves running a repository-wide audit that returns a JSON summary envelope, catching structural problems like empty frontmatter and slug mismatches before they propagate to later wiki builds.

Can I automatically fix malformed YAML frontmatter without losing original data?

You can automatically fix malformed YAML frontmatter safely by applying mutations that create .bak backup files, ensuring original data is preserved while resolving structural issues like YAML parse failures and nested-quote title problems.

What causes YAML frontmatter validation to fail when parsing markdown wiki pages?

YAML frontmatter validation fails when encountering missing delimiters, null bytes, slug mismatches, nested-quote title issues, and empty frontmatter blocks, all of which silently break later wiki builds and downstream tooling.

Why does the frontmatter auto-fix process skip certain ambiguous YAML errors?

The frontmatter auto-fix process skips ambiguous YAML errors like missing open markers or empty frontmatter to enforce safety-oriented guardrails, requiring explicit user input before attempting to resolve uncertain structural issues.