YAML Frontmatter Parser

Parse and validate YAML frontmatter from Markdown files for Claude Code skills.

24|4|Updated Nov 19, 2025
One-click install
npx skills add https://github.com/drewipson/claude-code-config --skill yaml-frontmatter-parser
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: YAML Frontmatter Parser
Source: https://github.com/drewipson/claude-code-config/tree/main/.claude/skills/yaml-frontmatter-parser
Command: npx skills add https://github.com/drewipson/claude-code-config --skill yaml-frontmatter-parser

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides reliable parsing and validation of YAML frontmatter from Markdown files, ensuring skill and agent metadata is correct before loading.

Core Features & Use Cases

  • Frontmatter Extraction: Retrieve metadata blocks from Markdown.
  • Type Validation: Enforce required fields such as name and description for skills and agents.
  • Usage Scenarios: Ensure you can safely read and update metadata without breaking content.

Quick Start

Extract frontmatter from 'skill.md' and log the name and version.

Frequently Asked Questions about YAML Frontmatter Parser

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

FAQPage Schema
How do I parse YAML frontmatter from Markdown files?

YAML frontmatter parsing extracts metadata blocks delimited by --- from the top of Markdown files. This Skill retrieves key-value pairs, arrays, booleans, and numbers from frontmatter, returning a typed object with validated fields like name, description, version, and author for safe metadata consumption downstream.

What validation does frontmatter parsing apply to Markdown metadata?

Frontmatter validation enforces required fields such as name and description, checks type correctness for skill and agent metadata, and surfaces identifiers, versions, authors, and tags. Invalid or missing fields are caught before metadata is loaded into tooling, preventing configuration errors.

Can I use frontmatter parsing to extract skill and agent metadata across repositories?

Yes. This Skill applies frontmatter parsing across multiple repositories to extract, validate, and surface identifiers, descriptions, versions, authors, tags, and dependencies in a consistent, typed format suitable for downstream tooling and metadata indexing.

How do I handle quotes, comments, and arrays in YAML frontmatter?

YAML frontmatter parsing handles quoted strings, inline comments, and array syntax natively. The lightweight parser processes simple key-value pairs, booleans, numbers, and lists, returning structured data without breaking on common YAML formatting patterns.

What happens when frontmatter is malformed or missing required fields?

The parser returns null when frontmatter is absent or structurally invalid, and validation fails when required fields like name or description are missing. This prevents broken metadata from propagating and signals configuration issues early.

Does frontmatter parsing work with tool restrictions and dependency lists in skill metadata?

Yes. The parser extracts and validates all metadata fields including dependencies and tool restrictions from skill and agent frontmatter, ensuring complete metadata objects are available for downstream systems that enforce access control and dependency management.