Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
esola-thomas avatar

Doc Frontmatter

  • 1 installs
  • Updated July 20, 2026
  • esola-thomas/your-docs-mcp

Add or repair YAML frontmatter on documentation files, deriving title, category, tags, and order when missing or invalid.

About

Reads doc files and adds or fixes required YAML frontmatter fields (title, category, tags, order), deriving values from H1, directory, content, and siblings. A developer uses it to bulk-fix or validate documentation frontmatter.

  • Intelligently derives each required field from file and directory context
  • Batch mode processes all markdown files in a directory

Doc Frontmatter by the numbers

  • 1 all-time installs (skills.sh)
  • Ranked #1,366 of 1,879 Documentation skills by installs in the Skillselion catalog
  • Data as of Jul 21, 2026 (Skillselion catalog sync)
npx skills add https://github.com/esola-thomas/your-docs-mcp --skill doc-frontmatter

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1
Last updatedJuly 20, 2026
Repositoryesola-thomas/your-docs-mcp

What it does

Add or repair YAML frontmatter on documentation files, deriving title, category, tags, and order when missing or invalid.

Files

SKILL.mdMarkdownGitHub ↗

Fix Documentation Frontmatter

Add or repair YAML frontmatter for documentation files.

Instructions

1. Read the target file

2. Check current frontmatter status:

  • No frontmatter: Generate complete frontmatter
  • Partial frontmatter: Add missing required fields
  • Invalid YAML: Fix syntax errors

3. Required fields (must all be present):

FieldTypeHow to determine value
titlestringFrom H1, or derive from filename
categorystringFrom parent directory name
tagsarrayFrom content keywords
orderintegerNext available in directory

4. Derive values intelligently:

Title:

  • Use explicit --title if provided
  • Otherwise extract from first H1 in document
  • Otherwise derive from filename: getting-started.md -> "Getting Started"

Category:

  • Use explicit --category if provided
  • Otherwise derive from directory:
  • docs/guides/ -> "Guides"
  • docs/api/ -> "API Reference"
  • docs/reference/ -> "Reference"
  • example/tutorials/ -> "Tutorials"

Tags:

  • Use explicit --tags if provided (comma-separated)
  • Otherwise analyze content for keywords
  • Always include category as a tag (lowercase)
  • Suggest 2-4 relevant tags

Order:

  • Check sibling files in same directory
  • Find highest existing order number
  • Set to next available (highest + 1)
  • Default to 1 if first file

5. Apply changes:

  • If no frontmatter exists, add at top of file
  • If frontmatter exists, merge new fields (don't overwrite existing valid fields)

Output Format

Show what was added/changed:

## Frontmatter Updated: docs/guides/new-doc.md

Added:
- title: "New Document"
- category: "Guides"
- tags: ["guide", "setup"]
- order: 3

Final frontmatter:
---
title: "New Document"
category: "Guides"
tags: ["guide", "setup"]
order: 3
---

Batch Mode

If path is a directory, process all .md files:

/doc-frontmatter docs/guides/

Reports summary:

Processed 5 files:
- 2 files updated
- 1 file already valid
- 2 files created frontmatter

Example Usage

/doc-frontmatter docs/new-doc.md                           # Auto-detect all
/doc-frontmatter docs/api/tool.md --category "API"         # Override category
/doc-frontmatter docs/guide.md --tags "beginner,setup"     # Specify tags
/doc-frontmatter docs/guides/                              # Batch process

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.