validate-md

Validate Markdown YAML frontmatter against JSON Schema definitions.

Updated Oct 22, 2025
One-click install
npx skills add https://github.com/luebken/claude-plugins --skill validate-md
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: validate-md
Source: https://github.com/luebken/claude-plugins/tree/main/plugins/validate-md/skills/validate-md
Command: npx skills add https://github.com/luebken/claude-plugins --skill validate-md

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pyyaml, jsonschema.

What problem does it solve?

This Skill automates the validation of Markdown files by ensuring their YAML frontmatter matches a defined JSON Schema, preventing data quality issues and streamlining content governance.

Core Features & Use Cases

  • Frontmatter Validation: Check every Markdown file's metadata against the schema.yaml to catch missing or invalid fields.
  • Schema-Driven Quality: Enforces consistent structure across large documentation repositories.
  • Use Case: Maintain consistent metadata for a blog or docs site, ensuring all posts include required fields like date, author, and tags.

Quick Start

Run the validator against a directory that contains a schema.yaml and Markdown files, for example: python validate-md.py docs/pages

Frequently Asked Questions about validate-md

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

FAQPage Schema
How do I validate markdown files with YAML frontmatter against a schema?

Validate markdown files by running the validator against a directory containing schema.yaml and .md files. It extracts YAML frontmatter from each file, parses it, and checks conformance against your JSON Schema definition using the Draft202012Validator, reporting per-file success or errors.

What is YAML frontmatter and why validate it in markdown?

YAML frontmatter is structured metadata at the top of markdown files, typically containing fields like date, author, and tags. Validating it ensures consistent metadata across documentation repositories and prevents missing or invalid fields that break content governance.

Can I use JSON Schema to enforce markdown metadata structure?

Yes. Define constraints in a JSON Schema file (schema.yaml), then validate all markdown files in a directory against it. This enforces consistent structure across posts, docs, blog entries, and CRM content without manual checks.

What file formats and structure does this validator require?

The validator requires a directory with schema.yaml (defining your JSON Schema) and markdown files (.md) containing YAML frontmatter. It processes the frontmatter block and reports validation results for each file individually.

How can I maintain data quality across a large documentation repository?

Automate validation by running this tool against your docs directory. It catches missing or invalid frontmatter fields before content is published, ensuring all files meet schema requirements and preventing downstream quality issues.

Does this work for content beyond blogs, like CRM entities or other frontmatter-driven files?

Yes. The validator applies to any directory structure with schema.yaml and markdown files, including CRM entities (contacts, opportunities, activities), knowledge bases, and other frontmatter-driven content requiring schema conformance.