gray-matter
Installation
SKILL.md
Gray Matter
Parse YAML/JSON/TOML/CSON/CoffeeScript front-matter from strings or files. Use whenever working with markdown files that have front-matter (YAML/JSON/TOML headers), extracting metadata from documents with ---- delimited headers, stringifying data back to front-matter format, or any task involving front-matter parsing/stringification.
Triggers
"front matter", "frontmatter", "gray-matter", "YAML header","parse markdown metadata", "extract front matter", "add front matter", "stringify front matter".
Quick Start
Use scripts/parse.js for all front-matter operations:
# Parse front-matter from a file (outputs JSON)
node scripts/parse.js path/to/file.md
# Parse from piped stdin
type file.md | node scripts/parse.js --stdin