markdown-post-frontmatter-validation

Validate Markdown post YAML frontmatter for required fields and schema rules.

1|Updated May 6, 2026
One-click install
npx skills add https://github.com/jacob-balslev/skill-graph --skill markdown-post-frontmatter-validation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: markdown-post-frontmatter-validation
Source: https://github.com/jacob-balslev/skill-graph/tree/main/examples/projects/markdown-static-site/skills/markdown-post-frontmatter-validation
Command: npx skills add https://github.com/jacob-balslev/skill-graph --skill markdown-post-frontmatter-validation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill prevents broken static-site builds by validating Markdown post YAML frontmatter against your content contract so missing or inconsistent metadata is caught immediately.

Core Features & Use Cases

  • Required-field enforcement: Ensures every post declares title, date, slug, and tags and fails fast when any are missing.
  • Date, slug, and tag correctness: Rejects ambiguous dates without explicit timezone, flags slug that does not match the file path, and enforces a controlled tag vocabulary.
  • Reserved-field protection and schema evolution: Blocks underscore-prefixed author fields and re-validates posts when the schema changes so violations surface before the next build.

Quick Start

Use this skill to validate the frontmatter of a new content/posts markdown file against the repository’s frontmatter schema and tagging rules.

Frequently Asked Questions about markdown-post-frontmatter-validation

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

FAQPage Schema
How do I validate YAML frontmatter in Markdown posts to prevent static site build errors?

Validating YAML frontmatter in Markdown posts enforces required fields like title, date, slug, and tags to catch missing metadata. This prevents static site indexing, routing, and rendering regressions before builds ship.

Why does my static site build fail when Markdown frontmatter dates lack a timezone?

Markdown frontmatter dates lacking a timezone cause build failures because ISO-8601 date-with-timezone discipline is enforced. Rejecting ambiguous dates prevents temporal sorting and rendering regressions across environments.

How do I enforce slug-to-path consistency for Markdown content files?

Enforce slug-to-path consistency by validating that the declared slug matches the file path under content/posts/**/*.md. Flagging mismatches immediately prevents broken routing and indexing regressions.

What is a controlled vocabulary for Markdown frontmatter tags and how is it enforced?

A controlled vocabulary for Markdown frontmatter tags restricts tags to a predefined schema. It is enforced by validating tags against repository rules, ensuring metadata uniformity and preventing invalid taxonomy entries.

Can I use underscore-prefixed keys in Markdown post frontmatter?

You cannot use underscore-prefixed keys in Markdown post frontmatter. Reserved-field protection blocks underscore-prefixed author fields to prevent schema conflicts and ensure clean metadata parsing during generation.

What's the best way to re-validate Markdown posts when the frontmatter schema changes?

The best way to re-validate Markdown posts when the frontmatter schema changes is to trigger validation against the new schema implementation. This surfaces metadata violations before the next static site build runs.