Skip to main content

Schema Endpoints

The PRPM Registry serves JSON Schema files for validating prompt packages across all supported AI editor formats.

List All Schemas

GET /api/v1/schemas
Returns a list of all available schemas with metadata. Query Parameters:
ParameterTypeDescription
formatstringFilter by format (e.g., claude, cursor)
groupedbooleanReturn schemas grouped by format
Example Response:
{
  "schemas": [
    {
      "name": "cursor.schema.json",
      "url": "https://registry.prpm.dev/api/v1/schemas/cursor.json",
      "format": "cursor",
      "subtype": null,
      "description": "JSON Schema for Cursor rules"
    }
  ],
  "total": 25,
  "formats": ["cursor", "claude", "kiro", "copilot", ...]
}

Get Base Format Schema

GET /api/v1/schemas/:format.json
Returns the JSON Schema for a base format. Available Base Formats:
FormatSchema URL
cursor/api/v1/schemas/cursor.json
claude/api/v1/schemas/claude.json
continue/api/v1/schemas/continue.json
windsurf/api/v1/schemas/windsurf.json
copilot/api/v1/schemas/copilot.json
kiro-steering/api/v1/schemas/kiro-steering.json
gemini/api/v1/schemas/gemini.json
opencode/api/v1/schemas/opencode.json
droid/api/v1/schemas/droid.json
trae/api/v1/schemas/trae.json
aider/api/v1/schemas/aider.json
zencoder/api/v1/schemas/zencoder.json
replit/api/v1/schemas/replit.json
zed/api/v1/schemas/zed.json
agents-md/api/v1/schemas/agents-md.json
canonical/api/v1/schemas/canonical.json

Get Subtype Schema

GET /api/v1/schemas/:format/:subtype.json
Returns the JSON Schema for a specific subtype within a format. Available Subtypes:

Claude Subtypes

SubtypeSchema URLDescription
agent/api/v1/schemas/claude/agent.jsonClaude Code agents
skill/api/v1/schemas/claude/skill.jsonClaude Code skills
slash-command/api/v1/schemas/claude/slash-command.jsonSlash commands
hook/api/v1/schemas/claude/hook.jsonClaude Code hooks

Cursor Subtypes

SubtypeSchema URLDescription
command/api/v1/schemas/cursor/command.jsonCursor slash commands
hooks/api/v1/schemas/cursor/hooks.jsonCursor hooks configuration

Kiro Subtypes

SubtypeSchema URLDescription
agent/api/v1/schemas/kiro/agent.jsonKiro agents
hook/api/v1/schemas/kiro/hook.jsonKiro hooks (file events + lifecycle)

Factory Droid Subtypes

SubtypeSchema URLDescription
skill/api/v1/schemas/droid/skill.jsonDroid skills
slash-command/api/v1/schemas/droid/slash-command.jsonDroid slash commands
hook/api/v1/schemas/droid/hook.jsonDroid hooks

OpenCode Subtypes

SubtypeSchema URLDescription
slash-command/api/v1/schemas/opencode/slash-command.jsonOpenCode slash commands

Get Format Registry

GET /api/v1/schemas/format-registry
Returns directory structures and file patterns for all AI editor formats. Example Response:
{
  "cursor": {
    "directories": [".cursor", ".cursor/rules", ".cursor/commands"],
    "files": {
      "rules": ".cursor/rules/*.mdc",
      "commands": ".cursor/commands/*.md"
    }
  },
  "claude": {
    "directories": [".claude", ".claude/agents", ".claude/skills"],
    "files": {
      "agents": ".claude/agents/*.md",
      "skills": ".claude/skills/*.md"
    }
  }
}

Using Schemas for Validation

You can reference these schemas directly in your files:
{
  "$schema": "https://registry.prpm.dev/api/v1/schemas/cursor.json",
  "name": "my-rule",
  "content": "..."
}
Or validate programmatically:
import Ajv from 'ajv';

const schema = await fetch('https://registry.prpm.dev/api/v1/schemas/claude/hook.json')
  .then(r => r.json());

const ajv = new Ajv();
const validate = ajv.compile(schema);

if (!validate(myHookConfig)) {
  console.error(validate.errors);
}