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 runprpm publish, the CLI:
- Detects your package format and subtype
- Loads the appropriate JSON Schema
- Validates all frontmatter fields
- Checks required fields are present
- Verifies field types and constraints
- Reports any errors before publishing
2. During Format Conversion
When converting packages withprpm convert:
- Validates source format before conversion
- Converts to target format
- Validates output against target schema
- Reports any data loss or incompatibilities
3. During Package Installation
When installing packages, PRPM:- Validates package structure from registry
- Ensures format compatibility with your IDE
- Checks for required dependencies
Supported Formats & Schemas
Base Format Schemas
Every supported AI IDE has a base schema:| Format | Schema | Description |
|---|---|---|
| Claude Code | claude.schema.json | Base schema for Claude packages |
| Cursor | cursor.schema.json | MDC format with YAML frontmatter |
| Continue | continue.schema.json | Rules with glob/regex matching |
| Windsurf | windsurf.schema.json | Plain markdown (12k char limit) |
| GitHub Copilot | copilot.schema.json | Path-specific instructions |
| Kiro | kiro-steering.schema.json | Steering files with frontmatter |
| Factory Droid | droid.schema.json | Base schema for Droid packages |
| OpenCode | opencode.schema.json | Agent configuration with tools |
| Gemini CLI | gemini.schema.json | Google Gemini format |
| Ruler | ruler.schema.json | Centralized rule management |
| agents.md | agents-md.schema.json | OpenAI single-file format |
Subtype Schemas
Formats with multiple package types have specialized schemas:Claude Code
claude-agent.schema.json- AI agents with tools and permissionsclaude-skill.schema.json- Specialized skills (name + description only)claude-slash-command.schema.json- Custom slash commandsclaude-hook.schema.json- Event-driven hooks
Factory Droid
droid-skill.schema.json- Reusable workflowsdroid-slash-command.schema.json- Commands with argument hintsdroid-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)
Cursor
cursor-command.schema.json- Cursor slash commands
Accessing Schemas
Public Registry API
All schemas are publicly accessible via the PRPM registry: List all schemas:Other Access Methods
1. View in Repositoryhttps://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)
Common Validation Errors
Missing Required Fields
Invalid Field Types
Invalid Enum Values
Out of Range Values
Validation in CI/CD
GitHub Actions Example
Schema Development
Creating Custom Schemas
If you’re adding support for a new AI IDE:- Study the format - Understand frontmatter fields, file structure, and constraints
- Create base schema - Define required and optional fields
- Add subtype schemas - If format has multiple types (agent, skill, command)
- Update validation - Map schema in
validation.ts - Test thoroughly - Create fixtures and run validation tests
Best Practices
Validate Before Publishing
Run
prpm publish --dry-run to catch errors before publishingUse 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