prpm.json Reference
Complete reference for the PRPM package manifest.
Need help creating prpm.json files? Install the PRPM package that teaches AI to write prpm.json manifests:# For Claude Code
prpm install @prpm/prpm-json-best-practices-skill
# For Cursor
prpm install @prpm/prpm-json-best-practices
These packages include real examples and best practices for single-package, multi-package, and collection repositories.
Single Package
Basic package manifest:
{
"name" : "my-package" ,
"version" : "1.0.0" ,
"description" : "Clear description of what this package does" ,
"author" : "Your Name <you@example.com>" ,
"license" : "MIT" ,
"repository" : "https://github.com/username/repo" ,
"format" : "cursor" ,
"subtype" : "rule" ,
"tags" : [ "typescript" , "best-practices" ],
"files" : [ ".cursor/rules/my-rule.mdc" ]
}
Multi-Package Repository
For repositories with multiple packages:
{
"name" : "my-prompts-repo" ,
"author" : "Your Name" ,
"license" : "MIT" ,
"repository" : "https://github.com/username/repo" ,
"packages" : [
{
"name" : "package-one" ,
"version" : "1.0.0" ,
"description" : "First package" ,
"format" : "cursor" ,
"subtype" : "rule" ,
"tags" : [ "tag1" ],
"files" : [ ".cursor/rules/one.mdc" ]
},
{
"name" : "package-two" ,
"version" : "1.0.0" ,
"description" : "Second package" ,
"format" : "claude" ,
"subtype" : "skill" ,
"tags" : [ "tag2" ],
"files" : [ ".claude/skills/two/SKILL.md" ]
}
]
}
Required Fields
Single Package
Field Type Description namestring Package name (kebab-case, unique) versionstring Semver version (e.g., 1.0.0) descriptionstring Clear description (min 10 chars) authorstring Author name and optional email licensestring SPDX license identifier formatstring Target format (claude, cursor, etc.) subtypestring Package type (agent, skill, rule, etc.) filesstring[] Files to include in package
Multi-Package
Each package in the packages array requires the same fields, except top-level author, license, and repository can be inherited.
Format Description claudeClaude Code cursorCursor IDE continueContinue.dev windsurfWindsurf IDE copilotGitHub Copilot kiroKiro AI geminiGemini CLI opencodeOpenCode AI rulerRuler droidFactory Droid agents.mdAgents.md universal format mcpModel Context Protocol genericMulti-tool
Some formats have aliases for compatibility:
claude.md → claude
gemini.md → gemini
Subtype Values
Subtype Description agentAutonomous agents that execute multi-step tasks skillSpecialized capabilities and knowledge domains ruleIDE rules and coding standards slash-commandExecutable commands for quick actions promptReusable prompt templates workflowMulti-step automation workflows toolExecutable utilities, scripts, and MCP servers templateFile and project templates collectionCurated package collections chatmodeChat interface modes and configurations hookEvent-triggered executable hooks
Different formats support different subtypes:
claude : skill, agent, slash-command, tool, hook
cursor : rule, agent, slash-command, tool
continue : rule, agent, prompt
windsurf : rule, agent, slash-command
kiro : rule, agent, tool, hook
opencode : agent, slash-command, tool
ruler : rule, agent, tool
droid : skill, slash-command, hook
mcp : tool
generic : all subtypes
File Paths
Use full paths from project root:
Correct:
{
"files" : [ ".cursor/rules/typescript.mdc" ]
}
Wrong:
{
"files" : [ "rules/typescript.mdc" ] // Missing .cursor/ prefix
}
Use 3-8 kebab-case tags:
Good:
{
"tags" : [ "typescript" , "best-practices" , "type-safety" ]
}
Bad:
{
"tags" : [ "TypeScript" , "code_quality" ] // Wrong case, wrong separator
}
Optional Fields
Field Type Description repositorystring GitHub repository URL homepagestring Package homepage documentationstring Documentation URL organizationstring Organization name/ID keywordsstring[] Additional search keywords privateboolean Mark as private (default: false) scriptsobject Lifecycle scripts (multi-package only)
Lifecycle Scripts
The scripts field only applies to multi-package manifests (prpm.json with a packages array). It does not work in single-package manifests.
Use the scripts field to run commands automatically during package operations:
{
"name" : "my-packages" ,
"license" : "MIT" ,
"repository" : "https://github.com/username/repo" ,
"scripts" : {
"prepublishOnly" : "cd packages/hooks && npm run build"
},
"packages" : [ ... ]
}
Available Scripts
Script When it Runs Use Case prepublishOnlyBefore prpm publish Build TypeScript hooks, compile assets prepublishBefore publish AND on install Not recommended - use prepublishOnly
prepublishOnly (Recommended)
Use prepublishOnly to build hooks or compile code before publishing:
{
"scripts" : {
"prepublishOnly" : "cd .claude/hooks/my-hook && npm run build"
}
}
What happens:
You run prpm publish
PRPM runs your prepublishOnly script
If the script succeeds, publishing continues
If the script fails, publishing is aborted
Common use cases:
Building TypeScript hooks to JavaScript
Compiling assets
Running tests before publish
Validating package contents
Multiple Commands
Chain multiple commands with &&:
{
"scripts" : {
"prepublishOnly" : "npm test && npm run build && npm run validate"
}
}
Example: Building Multiple Hooks
{
"name" : "my-hooks" ,
"scripts" : {
"prepublishOnly" : "cd .claude/hooks/hook-one && npm run build && cd ../hook-two && npm run build"
},
"packages" : [
{
"name" : "hook-one" ,
"version" : "1.0.0" ,
"format" : "claude" ,
"subtype" : "hook" ,
"files" : [
".claude/hooks/hook-one/hook.ts" ,
".claude/hooks/hook-one/hook.json" ,
".claude/hooks/hook-one/dist/hook.js"
]
},
{
"name" : "hook-two" ,
"version" : "1.0.0" ,
"format" : "claude" ,
"subtype" : "hook" ,
"files" : [
".claude/hooks/hook-two/hook.ts" ,
".claude/hooks/hook-two/hook.json" ,
".claude/hooks/hook-two/dist/hook.js"
]
}
]
}
Script Execution Details
Working Directory: Scripts run from the directory containing prpm.json
Timeout: Default 5 minutes (300,000ms)
Environment: Inherits your shell’s environment variables
Error Handling:
Exit code 0 = success (publishing continues)
Exit code non-zero = failure (publishing aborted)
Script output is shown in real-time
Best Practices
Always use prepublishOnly for builds This ensures your published packages always contain up-to-date compiled code, preventing the common mistake of publishing stale JavaScript files.
Good:
{
"scripts" : {
"prepublishOnly" : "npm run build"
}
}
Bad:
{
"scripts" : {
"prepublish" : "npm run build" // Runs on install too!
}
}
Why Not prepublish?
The prepublish script runs both before publishing AND when someone runs npm install in your repository. This can cause unexpected build steps for users installing your packages.
Use prepublishOnly which ONLY runs before prpm publish.
Next Steps
Publishing Collections Create package collections
Publishing Guide Publish your packages