editing-post-frontmatter

Validate and correct MDX blog post frontmatter for metadata completeness.

Updated Aug 12, 2025
One-click install
npx skills add https://github.com/OptionalRule/optionalrule-nextjs.github.io --skill editing-post-frontmatter
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: editing-post-frontmatter
Source: https://github.com/OptionalRule/optionalrule-nextjs.github.io/tree/main/.claude/skills/editing-post-frontmatter
Command: npx skills add https://github.com/OptionalRule/optionalrule-nextjs.github.io --skill editing-post-frontmatter

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ensures blog post frontmatter is complete, consistent, and optimized so social previews, search snippets, tag pages, and site metadata render correctly and do not show placeholder values.

Core Features & Use Cases

  • Frontmatter validation: Check required fields (slug, title, date, excerpt, tags, featured_image, draft) and ensure formats match site expectations.
  • Excerpt and SEO guidance: Enforce concise excerpts under ~160 characters suitable for OG descriptions and search previews.
  • Tag consistency: Recommend existing Title Case tags and discourage creating inconsistent or placeholder tags; provide a grep command to list canonical tags.
  • Pre-publish checklist: Verify slug matches filename, featured_image exists in public images, draft flag is correct, and no placeholder text remains.

Quick Start

Audit and correct the post frontmatter so slug, title, ISO date, excerpt under 160 characters, Title Case tags matching the existing tag list, featured_image path, and draft status are valid and consistent.

Frequently Asked Questions about editing-post-frontmatter

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

FAQPage Schema
How do I validate MDX blog post frontmatter before publishing?

To validate MDX blog post frontmatter, check required fields like slug, title, date, excerpt, tags, and featured_image to ensure formats match site expectations. This prevents placeholder values from rendering in social previews and search snippets.

What is the ideal excerpt length for SEO and Open Graph previews?

The ideal excerpt length for SEO and Open Graph previews is under 160 characters. Concise excerpts ensure metadata renders correctly across social previews and search snippets without truncation.

How do I enforce Title Case tags in MDX frontmatter?

To enforce Title Case tags in MDX frontmatter, match new tags against the repository's canonical tag list. You can use a grep command to list existing tags and discourage creating inconsistent or placeholder tags.

Why do my blog post featured images show broken links in social previews?

Broken featured image links in social previews often occur when the frontmatter path is incorrect. Validate that the featured_image path points to a valid file inside the /public/images/ directory during pre-publish checks.

Can I use automated frontmatter checks during draft review?

Yes, you can use automated frontmatter checks during draft review or pre-publish checks. Validate that the slug matches the filename, the date uses ISO YYYY-MM-DD format, and the draft flag is set correctly.

What format should blog post dates use in frontmatter?

Blog post dates in frontmatter should use the ISO YYYY-MM-DD date format. Enforcing this standard during frontmatter validation ensures site metadata and chronological sorting render correctly.