Back to Blog
TechnicalDeveloper ExperienceFormat Specifications

JSON Schemas for Every AI Prompt Format

Get IDE autocomplete, validate in CI/CD, and build tools with confidence—PRPM ships comprehensive schemas for 15+ AI prompt formats.

By PRPM TeamNovember 28, 202510 min read

Writing prompt files for AI coding assistants feels like the Wild West. Cursor wants YAML frontmatter with description. Claude needs name and allowed-tools. Windsurf? No frontmatter at all. Make a typo in a field name and your prompt silently breaks.

As part of building PRPM's universal format converter, we created something the AI coding ecosystem desperately needed: comprehensive JSON schemas for every major AI prompt format. These schemas define the structure, required fields, and validation rules for 15+ formats including Cursor, Claude Code, Continue, Windsurf, GitHub Copilot, Kiro, Ruler, and newer tools like Factory Droid, OpenCode, and Trae.

What Are JSON Schemas?

JSON Schema is a vocabulary that lets you annotate and validate JSON (and YAML) documents. Think of it like TypeScript types, but for data files. A schema describes:

  • What fields are required vs optional
  • Data types (string, number, boolean, array)
  • Format constraints (e.g., email addresses, URIs)
  • Allowed values (enums)
  • Patterns and validation rules

For AI prompt formats—which mix YAML frontmatter with Markdown content—schemas provide a source of truth for what makes a valid prompt file.

The Inconsistency Problem

Even within a single vendor's ecosystem, frontmatter fields are inconsistent. Take Anthropic's Claude Code formats:

SubtypeTool Access FieldExample
Skillallowed-toolsallowed-tools: Read, Grep, Glob
Agenttoolstools: Read, Write, Bash
Slash Commandallowed-toolsallowed-tools: Read, Edit

Skills and slash commands use allowed-tools, but agents use tools. Same vendor, same ecosystem, different field names for the same concept. Without schemas, you'd have to discover this through trial and error—or by carefully reading documentation that may not exist.

This pattern repeats across the ecosystem:

  • Cursor uses description (required) while Windsurf has no frontmatter at all
  • Continue uses name (required) while Claude agents use name but skills don't require it
  • Kiro steering files use inclusion modes while Cursor uses alwaysApply booleans
  • GitHub Copilot uses applyTo globs while Cursor uses globs

Schemas make these differences explicit and machine-readable. Instead of guessing, you get validation errors that tell you exactly what each format expects.

Why PRPM Built These Schemas

1. Format Conversion Requires Precision

PRPM converts prompts between 15+ formats. To do that reliably, we need to know exactly what each format expects. Schemas let us:

  • Validate input: Catch malformed prompts before conversion
  • Validate output: Ensure conversions produce valid files
  • Handle subtypes: Claude agents vs skills vs slash commands have different requirements
  • Preserve metadata: Know which fields are format-specific vs universal

Every converter in @pr-pm/converters uses these schemas for validation.

2. Publishing Needs Validation

When you run prpm publish, the CLI validates your package against the schema for your declared format and subtype. This catches errors before they reach the registry:

$ prpm publish

❌ Validation failed:
  - Missing required field: description
  - /frontmatter/model: must be one of [sonnet, opus, haiku, inherit]
  - /frontmatter/allowed-tools: pattern mismatch

Fix these errors and try again.

Clear error messages tell you exactly what's wrong and where.

3. Documentation Is a First-Class Output

Schemas aren't just for validation—they're living documentation. Each schema includes:

  • $comment with link to official docs
  • description fields explaining each property
  • examples showing real-world usage
  • Pattern explanations for complex fields

The schemas in packages/converters/schemas/ serve as the canonical reference for format specifications.

Practical Use Cases

IDE Autocomplete and IntelliSense

VS Code (and most modern editors) support YAML Language Server, which uses JSON schemas to provide autocomplete, validation, and hover documentation.

Add this to your workspace .vscode/settings.json:

{
  "yaml.schemas": {
    "https://registry.prpm.dev/api/v1/schemas/cursor.json": ".cursor/rules/*.md",
    "https://registry.prpm.dev/api/v1/schemas/claude/agent.json": ".claude/agents/*.md",
    "https://registry.prpm.dev/api/v1/schemas/claude/skill.json": ".claude/skills/*.md",
    "https://registry.prpm.dev/api/v1/schemas/continue.json": ".continue/rules/*.md"
  }
}

Now when you edit Cursor rules or Claude agents, you get:

  • Field suggestions as you type frontmatter
  • Inline documentation for each field
  • Red squiggles for invalid values
  • Enum suggestions (e.g., Claude model choices)

CI/CD Validation

Add schema validation to your GitHub Actions workflow to catch invalid prompts before they reach production:

name: Validate Prompts

on: [push, pull_request]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
      - uses: actions/setup-node@v3
        with:
          node-version: '20'

      - name: Install PRPM
        run: npm install -g prpm

      - name: Validate all packages
        run: |
          for dir in packages/*/; do
            cd "$dir"
            prpm validate
            cd ../..
          done

The prpm validate command checks your prpm.json manifest and all referenced files against their schemas.

Building Tools on PRPM

If you're building tooling around AI prompts—linters, editors, quality analyzers—schemas give you a programmatic way to validate prompt files:

import { validateMarkdown } from '@pr-pm/converters';

// Validate a Cursor rule file
const cursorRule = readFileSync('.cursor/rules/react.md', 'utf-8');
const result = validateMarkdown('cursor', cursorRule, 'rule');

if (!result.valid) {
  console.error('Validation errors:', result.errors);
  result.errors.forEach(err => {
    console.error(`  - ${err.message}`);
  });
  process.exit(1);
}

// Validate a Claude agent with subtype-specific schema
const claudeAgent = readFileSync('.claude/agents/code-reviewer.md', 'utf-8');
const result2 = validateMarkdown('claude', claudeAgent, 'agent');

if (result2.warnings.length > 0) {
  console.warn('Warnings:', result2.warnings);
}

The validation API returns structured errors with paths and messages, making it easy to surface issues to users.

Format Conversion with the CLI

The PRPM CLI includes a convert command that leverages these schemas to safely convert between formats:

# Convert a Cursor rule to Claude skill format
$ prpm convert .cursor/rules/react.md --to claude --subtype skill

✅ Validated input (cursor:rule)
✅ Converted to claude:skill
✅ Validated output
📄 Wrote: .claude/skills/react.md

# Convert entire directories
$ prpm convert .cursor/rules/ --to continue --output .continue/rules/

Converting 12 files...
✅ 12/12 files converted successfully
⚠️  2 warnings (optional fields missing)
❌ 0 errors

The CLI validates both input and output using the appropriate schemas, catching errors before they reach your filesystem.

Programmatic Conversion with Validation

For building tools, use the conversion API which includes built-in schema validation:

import { convertToFormat, validateFormat } from '@pr-pm/converters';

// Convert Cursor rule to Claude skill
const cursorRule = readFileSync('.cursor/rules/refactoring.md', 'utf-8');

// Validate input
const inputValid = validateMarkdown('cursor', cursorRule, 'rule');
if (!inputValid.valid) {
  throw new Error('Invalid Cursor rule');
}

// Convert
const claudeSkill = convertToFormat(cursorRule, 'cursor', 'claude', 'skill');

// Validate output
const outputValid = validateMarkdown('claude', claudeSkill, 'skill');
if (!outputValid.valid) {
  console.error('Conversion produced invalid Claude skill');
  console.error('This is a converter bug, please report it');
}

Write Once, Publish Everywhere

For package publishers, schemas enable a powerful workflow: write your prompt in one format, then publish to all 15+ formats with confidence.

# Write once in your preferred format (e.g., Claude skill)
$ cat .claude/skills/typescript-best-practices.md

---
name: typescript-best-practices
description: TypeScript coding standards and best practices
---

# TypeScript Best Practices
...

# Publish to PRPM registry (canonical format)
$ prpm publish
✅ Validated against claude:skill schema
✅ Published to registry

# Generate distributions for all formats
$ prpm convert .claude/skills/typescript-best-practices.md --to cursor
$ prpm convert .claude/skills/typescript-best-practices.md --to continue
$ prpm convert .claude/skills/typescript-best-practices.md --to windsurf
$ prpm convert .claude/skills/typescript-best-practices.md --to copilot
# ... 15+ formats supported

# Each conversion is validated against target format's schema
✅ cursor:rule - validated
✅ continue:rule - validated
✅ windsurf:rule - validated
✅ copilot:repository - validated

Schemas ensure every converted output is valid for its target format. Users can install your package in any format they prefer:

# User A (Cursor user)
$ prpm install typescript-best-practices --format cursor
📥 Installed to .cursor/rules/typescript-best-practices.md

# User B (Claude user)
$ prpm install typescript-best-practices --format claude
📥 Installed to .claude/skills/typescript-best-practices.md

# User C (Continue user)
$ prpm install typescript-best-practices --format continue
📥 Installed to .continue/rules/typescript-best-practices.md

Behind the scenes, PRPM converts from the canonical format to the requested format and validates the output. Publishers maintain one source, users get their preferred format—all guaranteed valid by schemas.

Schema Coverage

PRPM ships schemas for 29 format/subtype combinations across 15+ AI coding tools:

FormatSubtypesSchema Files
Cursorrule, slash-command2 schemas
Claude Codeagent, skill, slash-command, hook5 schemas
Continuerule1 schema
Windsurfrule1 schema
GitHub Copilotrepository, path1 schema
Kirosteering, hook, agent3 schemas
Rulerrule1 schema
Factory Droidskill, slash-command, hook4 schemas
OpenCodeagent, slash-command3 schemas
agents.mdagent1 schema
Traerule1 schema
Aiderrule1 schema
Zencoderrule1 schema
Replitrule1 schema
Canonicaluniversal format1 schema

Each schema includes examples, detailed field descriptions, and links to official documentation.

Real Example: Cursor Rules Schema

Let's look at the Cursor rules schema to see what validation it provides:

{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://registry.prpm.dev/api/v1/schemas/cursor.json",
  "$comment": "https://cursor.com/docs/context/rules",
  "title": "Cursor Rules Format",
  "description": "JSON Schema for Cursor .cursor/rules format",
  "type": "object",
  "required": ["frontmatter", "content"],
  "properties": {
    "frontmatter": {
      "type": "object",
      "required": ["description"],
      "properties": {
        "description": {
          "type": "string",
          "description": "Human-readable description (REQUIRED)"
        },
        "globs": {
          "type": "array",
          "description": "File patterns to apply this rule to",
          "items": { "type": "string" }
        },
        "alwaysApply": {
          "type": "boolean",
          "description": "Whether to apply this rule to all files",
          "default": false
        }
      }
    },
    "content": {
      "type": "string",
      "description": "Markdown content following the frontmatter"
    }
  }
}

This schema enforces:

  • Required fields: description must be present in frontmatter
  • Type safety: globs must be an array of strings, alwaysApply must be boolean
  • Structure: Both frontmatter and content required at top level
  • Documentation: Inline descriptions explain each field's purpose

Advanced: Subtype-Specific Schemas

Some formats support multiple subtypes with different requirements. Claude Code is a great example:

  • Agents: Need name, description, optional model and allowed-tools
  • Skills: Similar to agents but may have different tool restrictions
  • Slash commands: Different frontmatter structure with command-specific fields
  • Hooks: Event-driven, JSON format with different validation rules

PRPM provides subtype-specific schemas for stricter validation:

// Base Claude schema (general)
https://registry.prpm.dev/api/v1/schemas/claude.json

// Subtype-specific schemas (stricter)
https://registry.prpm.dev/api/v1/schemas/claude/agent.json
https://registry.prpm.dev/api/v1/schemas/claude/skill.json
https://registry.prpm.dev/api/v1/schemas/claude/slash-command.json
https://registry.prpm.dev/api/v1/schemas/claude/hook.json

The validation API automatically uses the appropriate schema based on format and subtype:

// Validates against claude-agent.schema.json
const result = validateMarkdown('claude', content, 'agent');

// Validates against claude-skill.schema.json
const result2 = validateMarkdown('claude', content, 'skill');

Accessing the Schemas

All schemas are available in three ways:

1. Source Repository

Browse schemas directly in the PRPM repository:

packages/converters/schemas/
├── cursor.schema.json
├── cursor-command.schema.json
├── claude.schema.json
├── claude-agent.schema.json
├── claude-skill.schema.json
├── claude-slash-command.schema.json
├── claude-hook.schema.json
├── continue.schema.json
├── windsurf.schema.json
├── copilot.schema.json
├── kiro-steering.schema.json
├── kiro-hook.schema.json
├── kiro-agent.schema.json
├── ruler.schema.json
├── droid.schema.json
├── droid-skill.schema.json
├── droid-slash-command.schema.json
├── droid-hook.schema.json
├── opencode.schema.json
├── opencode-slash-command.schema.json
├── agents-md.schema.json
├── trae.schema.json
├── aider.schema.json
├── zencoder.schema.json
├── replit.schema.json
├── gemini.schema.json
├── gemini-md.schema.json
├── canonical.schema.json
└── format-registry.schema.json

2. Registry API

Access schemas via HTTPS for IDE integration and tooling. Browse all available schemas at the schema reference endpoint:

# Base format schemas
https://registry.prpm.dev/api/v1/schemas/{format}.json

# Subtype schemas (where applicable)
https://registry.prpm.dev/api/v1/schemas/{format}/{subtype}.json

# Format registry data (directory structures for all formats)
https://registry.prpm.dev/api/v1/schemas/format-registry

# Format registry schema (validates format-registry structure)
https://registry.prpm.dev/api/v1/schemas/format-registry.json

# Examples:
https://registry.prpm.dev/api/v1/schemas/cursor.json
https://registry.prpm.dev/api/v1/schemas/claude/agent.json
https://registry.prpm.dev/api/v1/schemas/kiro/hook.json

The format registry endpoint returns the complete directory structure configuration for all 15+ formats—where files should be installed, what patterns to scan for, and how nested packages work.

3. npm Package

Use the validation API in your JavaScript/TypeScript projects:

npm install @pr-pm/converters

import { validateMarkdown, validateFormat } from '@pr-pm/converters';

const result = validateMarkdown('cursor', content, 'rule');

Contributing and Maintenance

AI prompt formats are evolving rapidly. If you notice:

  • A format added new fields we're missing
  • Schema validation rejecting valid prompts
  • Missing schemas for new formats
  • Documentation that could be clearer

Open an issue or PR in the PRPM repository. When updating schemas:

  1. Verify against official docs: Link to the authoritative source in $comment
  2. Update converters: Schema changes may require converter updates
  3. Add tests: Include test cases for new fields or validation rules
  4. Update docs: Keep packages/converters/docs/ in sync with schemas

What This Enables

With comprehensive schemas for 15+ AI prompt formats, we've unlocked:

  • Reliable format conversion: Input and output validation ensures correct transformations
  • Better developer experience: IDE autocomplete and inline docs reduce errors
  • CI/CD integration: Catch invalid prompts before they reach production
  • Ecosystem tooling: Build linters, editors, and analyzers with confidence
  • Living documentation: Schemas serve as the source of truth for format specs

Most importantly, schemas make PRPM's universal format conversion possible. Converting between 15 formats means validating 29 format/subtype combinations—without schemas, that would be error-prone guesswork.


Get Started

Start using PRPM's schemas today. Add IDE autocomplete to your prompt files, validate in CI/CD, or build tools using the validation API. All schemas are open source and available via the registry API.