payload-schema-generator

Generate Payload CMS CollectionConfig schemas from MDX frontmatter fields.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/ComparePower/payload-cms-cloudflare-baseline --skill payload-schema-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: payload-schema-generator
Source: https://github.com/ComparePower/payload-cms-cloudflare-baseline/tree/main/.claude/skills/payload-schema-generator
Command: npx skills add https://github.com/ComparePower/payload-cms-cloudflare-baseline --skill payload-schema-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires gray-matter, glob, pnpm, and includes scripts (resource) components.

What problem does it solve?

Manually creating Payload CMS collection schemas from existing content (like MDX files with frontmatter) is time-consuming and prone to inconsistencies. This skill automates the discovery, mapping, and generation of CollectionConfig files, ensuring accurate and efficient schema creation.

Core Features & Use Cases

  • MDX Content Analysis: Scans MDX files to discover unique frontmatter fields, analyze their types, and determine requiredness.
  • Intelligent Type Mapping: Automatically maps discovered field types to appropriate Payload field configurations (e.g., string to text, array<object> to array with nested groups).
  • Use Case: You have a large repository of blog posts in MDX format, each with unique frontmatter. Use this skill to generate a complete BlogPosts collection schema for Payload CMS, including SEO fields and publishing dates, ready for content migration.

Quick Start

Generate a Payload schema for the 'products' collection by analyzing MDX files in the 'src/content/products' directory.