Skip to main content

Overview

PRPM uses JSON Schema to validate every package before publishing and during format conversion. This ensures package integrity, catches errors early, and provides helpful feedback when creating packages.

What Are Schemas?

JSON Schemas are specifications that define:
  • Required fields - What must be present (e.g., name, description)
  • Optional fields - What can be included (e.g., tools, model)
  • Field types - String, number, boolean, array, object
  • Field constraints - Min/max values, patterns, enums
  • Examples - Sample valid packages

When Validation Happens

1. During Publishing

When you run prpm publish, the CLI:
  1. Detects your package format and subtype
  2. Loads the appropriate JSON Schema
  3. Validates all frontmatter fields
  4. Checks required fields are present
  5. Verifies field types and constraints
  6. Reports any errors before publishing

2. During Format Conversion

When converting packages with prpm convert:
  1. Validates source format before conversion
  2. Converts to target format
  3. Validates output against target schema
  4. Reports any data loss or incompatibilities

3. During Package Installation

When installing packages, PRPM:
  1. Validates package structure from registry
  2. Ensures format compatibility with your IDE
  3. Checks for required dependencies

Supported Formats & Schemas

Base Format Schemas

Every supported AI IDE has a base schema:

Subtype Schemas

Formats with multiple package types have specialized schemas:

Claude Code

  • claude-agent.schema.json - AI agents with tools and permissions
  • claude-skill.schema.json - Specialized skills (name + description only)
  • claude-slash-command.schema.json - Custom slash commands
  • claude-hook.schema.json - Event-driven hooks

Factory Droid

  • droid-skill.schema.json - Reusable workflows
  • droid-slash-command.schema.json - Commands with argument hints
  • droid-hook.schema.json - Event automations (JSON format)

OpenCode

  • opencode-slash-command.schema.json - Template-based commands with placeholders

Kiro

  • kiro-agent.schema.json - Custom AI agents (JSON)
  • kiro-hooks.schema.json - Event hooks (JSON)

GitHub Copilot

  • copilot-skill.schema.json - Reusable skills with name and description

Cursor

  • cursor-command.schema.json - Cursor slash commands
  • cursor-plugin.schema.json - Cursor plugins (.cursor-plugin/plugin.json manifest)

Accessing Schemas

Public Registry API

All schemas are publicly accessible via the PRPM registry: List all schemas:
Get a base format schema:
Get a subtype schema:
Response:

Other Access Methods

1. View in Repository
2. Local Development
3. Direct URLs Schemas are available at: Base format schemas:
Subtype schemas:
Examples:
  • https://registry.prpm.dev/api/v1/schemas/cursor.json (base format)
  • https://registry.prpm.dev/api/v1/schemas/claude/agent.json (subtype)
  • https://registry.prpm.dev/api/v1/schemas/droid/slash-command.json (multi-word subtype)
  • https://registry.prpm.dev/api/v1/schemas/opencode/slash-command.json (subtype)
3. Programmatic Access

Common Validation Errors

Missing Required Fields

Fix:

Invalid Field Types

Fix:

Invalid Enum Values

Fix:

Out of Range Values

Fix:

Validation in CI/CD

GitHub Actions Example

Schema Development

Creating Custom Schemas

If you’re adding support for a new AI IDE:
  1. Study the format - Understand frontmatter fields, file structure, and constraints
  2. Create base schema - Define required and optional fields
  3. Add subtype schemas - If format has multiple types (agent, skill, command)
  4. Update validation - Map schema in validation.ts
  5. Test thoroughly - Create fixtures and run validation tests
See the adding-new-ai-format skill for complete instructions.

Best Practices

Validate Before Publishing

Run prpm publish --dry-run to catch errors before publishing

Use Strict Mode

Enable strict validation in your IDE to catch issues during development

Follow Schema Examples

Reference example packages in each schema for correct structure

Check Conversion Warnings

Review warnings when converting between formats for potential data loss

Further Reading

Format Specifications

Detailed specs for each AI IDE format

Publishing Guide

Step-by-step publishing workflow

Format Conversion

Convert packages between different AI IDEs

Package Structure

Understanding PRPM package anatomy