# Meta Packages Source: https://docs.prpm.dev/advanced/meta-packages Using AI to write AI prompts - packages that teach AI assistants how to create better packages ## Overview Meta packages are **packages that teach AI how to create other packages**. They're "prompts about writing prompts" - expert guidance that helps AI assistants generate high-quality, well-structured PRPM packages. Think of them as: * Package creation templates * Style guides for AI prompts * Best practices for package structure * Quality standards enforcement ## Why Meta Packages Matter AI assistants are great at generating content, but they need guidance to produce **consistently high-quality packages** that follow PRPM conventions. Without meta packages: * ❌ Inconsistent package structures * ❌ Poor CSO (Context Search Optimization) * ❌ Missing required fields * ❌ Unclear when to use packages * ❌ No real-world examples With meta packages: * ✅ Standardized structure across all packages * ✅ Optimized for AI discovery and use * ✅ Complete metadata and documentation * ✅ Clear triggering conditions * ✅ Real examples and patterns ## PRPM's Meta Packages PRPM uses meta packages to maintain consistency across its own repository. These packages teach AI assistants how to create high-quality packages for each IDE format. ### Format-Specific Creation Packages PRPM provides specialized packages for creating packages in each supported format. Each format has both a **Claude skill** (for explicit invocation) and a **Cursor rule** (for intelligent context application). **Quick Reference:** | Format | Subtype | Claude Skill | Cursor Rule | | ------------- | ---------------------- | ---------------------------------------- | ---------------------------------- | | **Cursor** | Rules | `@prpm/creating-cursor-rules-skill` | `@prpm/creating-cursor-rules` | | **Cursor** | Commands | `@prpm/creating-cursor-commands-skill` | `@prpm/creating-cursor-commands` | | **Claude** | Skills | `@prpm/creating-skills-skill` | `@prpm/creating-skills` | | **Claude** | Agents | `@prpm/creating-claude-agents-skill` | `@prpm/creating-claude-agents` | | **Claude** | Commands | `@prpm/creating-claude-commands-skill` | `@prpm/creating-claude-commands` | | **Claude** | Hooks | `@prpm/creating-claude-hooks-skill` | `@prpm/creating-claude-hooks` | | **Continue** | Rules | `@prpm/creating-continue-packages-skill` | `@prpm/creating-continue-packages` | | **Windsurf** | Rules | `@prpm/creating-windsurf-packages-skill` | `@prpm/creating-windsurf-packages` | | **Copilot** | Instructions/Chatmodes | `@prpm/creating-copilot-packages-skill` | `@prpm/creating-copilot-packages` | | **Kiro** | Steering/Hooks | `@prpm/creating-kiro-packages-skill` | `@prpm/creating-kiro-packages` | | **Agents.md** | - | `@prpm/creating-agents-md-skill` | `@prpm/creating-agents-md` | #### Cursor Format **Creating Cursor Rules:** ```bash theme={null} # Claude skill version prpm install @prpm/creating-cursor-rules-skill # Cursor rule version prpm install @prpm/creating-cursor-rules ``` Teaches AI how to create Cursor rules with MDC format, frontmatter fields, rule types (Always Apply, Apply Intelligently, Apply to Specific Files, Apply Manually), and glob patterns. **Creating Cursor Commands:** ```bash theme={null} # Claude skill version prpm install @prpm/creating-cursor-commands-skill # Cursor rule version prpm install @prpm/creating-cursor-commands ``` Teaches AI how to create Cursor slash commands using plain markdown (NO frontmatter), descriptive filenames, and clear actionable instructions. #### Claude Code Format **Creating Claude Skills:** ```bash theme={null} # Claude skill version prpm install @prpm/creating-skills-skill # Cursor rule version prpm install @prpm/creating-skills ``` Teaches AI how to create Claude Code skills with proper frontmatter, CSO optimization, when to trigger, and real examples. **Creating Claude Agents:** ```bash theme={null} # Claude skill version prpm install @prpm/creating-claude-agents-skill # Cursor rule version prpm install @prpm/creating-claude-agents ``` Teaches AI how to create Claude Code agents with persona definition, allowed-tools, model selection, and long-running assistant patterns. **Creating Claude Commands:** ```bash theme={null} # Claude skill version prpm install @prpm/creating-claude-commands-skill # Cursor rule version prpm install @prpm/creating-claude-commands ``` Teaches AI how to create Claude Code slash commands with optional frontmatter (allowed-tools, argument-hint, description, model, disable-model-invocation). **Creating Claude Hooks:** ```bash theme={null} # Claude skill version prpm install @prpm/creating-claude-hooks-skill # Cursor rule version prpm install @prpm/creating-claude-hooks ``` Teaches AI how to create Claude Code hooks as executable files (shell scripts, TypeScript) with event handling (session-start, user-prompt-submit, tool-call, assistant-response), JSON I/O, and security best practices. #### Other Formats **Continue Rules:** ```bash theme={null} prpm install @prpm/creating-continue-packages-skill ``` Teaches AI how to create Continue rules with required frontmatter (name field is required), globs, regex, and alwaysApply behavior. **Windsurf Rules:** ```bash theme={null} prpm install @prpm/creating-windsurf-packages-skill ``` Teaches AI how to create Windsurf rules using plain markdown with 12K character limit, hierarchical structure, and minimalist approach. **GitHub Copilot:** ```bash theme={null} prpm install @prpm/creating-copilot-packages-skill ``` Teaches AI how to create GitHub Copilot instructions and chatmodes in `.github/` directory with markdown format. **Kiro Steering:** ```bash theme={null} prpm install @prpm/creating-kiro-packages-skill ``` Teaches AI how to create Kiro steering files with inclusion modes (always, fileMatch, manual), foundational files (product.md, tech.md, structure.md), and domain organization. **Agents.md:** ```bash theme={null} prpm install @prpm/creating-agents-md-skill ``` Teaches AI how to create agents.md files using plain markdown (NO frontmatter) with comprehensive project context documentation. ### Legacy Meta Packages These meta packages provide broader guidance: **Slash Command Builder (`@prpm/slash-command-builder-skill`):** ```bash theme={null} prpm install @prpm/slash-command-builder-skill ``` Comprehensive guidance for Claude Code slash commands with multiple reference files (SKILL.md, EXAMPLES.md, FRONTMATTER.md, PATTERNS.md). **Agent Builder (`@prpm/agent-builder-skill`):** ```bash theme={null} prpm install @prpm/agent-builder-skill ``` Comprehensive guidance for Claude Code subagents with system prompt design, tool access, model selection, and delegation patterns. ## Creating Your Own Meta Package ### Example: Package Creator for Python Let's create a meta package that teaches AI to generate Python-specific packages: ````markdown theme={null} --- name: python-package-creator description: Use when creating PRPM packages for Python best practices, frameworks, or libraries --- # Python Package Creator ## When to Use Triggers when user says: - "Create a package for Python {topic}" - "Generate Python {framework} rules" - "Package my Python best practices" ## Package Structure Standards ### For Python Skills (Claude) ```markdown --- name: {framework}-expert description: Use when working with {framework} - covers common patterns, pitfalls, and best practices --- # {Framework} Expert ## When to Use - Starting a new {framework} project - Debugging {framework} errors - Optimizing {framework} performance ## Common Patterns ### Pattern 1: {Real Pattern Name} **Use case**: [Specific scenario] **Example**: ```python # Actual working code ```` **Why it works**: \[Explanation] ```` ### Required Metadata Always include: - `tags`: ["python", "{framework}", "best-practices"] - `format`: "claude" or "cursor" - `subtype`: "skill" or "rule" - Real code examples that actually work ### CSO Optimization Include searchable keywords: - Framework names: flask, django, fastapi - Common errors: "ModuleNotFoundError", "circular import" - Use cases: "async", "database migrations", "testing" ## Quality Checklist Before generating, ensure: - [ ] Real code examples (not pseudocode) - [ ] Specific error messages mentioned - [ ] Clear triggering conditions - [ ] Proper frontmatter - [ ] Relevant tags ## Example Output ```markdown --- name: fastapi-expert description: Use when building FastAPI applications or encountering async route errors --- # FastAPI Expert ## When to Use - Building REST APIs with FastAPI - Debugging async route handlers - Implementing dependency injection - Working with Pydantic models ## Common Patterns ### Dependency Injection **Use case**: Database connections, auth, logging ```python from fastapi import Depends from sqlalchemy.orm import Session def get_db(): db = SessionLocal() try: yield db finally: db.close() @app.get("/users/{user_id}") async def get_user(user_id: int, db: Session = Depends(get_db)): return db.query(User).filter(User.id == user_id).first() ```` **Why it works**: FastAPI calls `get_db()` automatically, handles cleanup ``` ## Anti-Patterns to Avoid ❌ Generic examples without context ❌ Incomplete code snippets ❌ No explanation of when to use ❌ Missing error messages ❌ Vague descriptions ``` Save as `.claude/skills/python-package-creator/SKILL.md` and publish: ```bash theme={null} prpm publish ``` ## Real-World Use Case: PRPM's Own Development PRPM uses meta packages to generate its internal packages. Here's the workflow: ### 1. Install Meta Package ```bash theme={null} prpm install @prpm/creating-skills-skill ``` ### 2. Create Package ``` User: "Create a skill for Stripe webhook integration" AI: *references creating-skills-skill* AI: *generates structured skill with:* - Proper frontmatter - CSO-optimized description - Real webhook code examples - Common error solutions ``` ### 3. Publish Package ```bash theme={null} prpm publish ``` ### 4. Share with Community The generated package is now available in the PRPM registry for others to use. ## Meta Package Patterns ### Pattern 1: Template-Based Generation Provide a complete template with placeholders: ````markdown theme={null} ## Template ```markdown --- name: {{framework}}-{{feature}} description: Use when {{use_case}} tags: ["{{framework}}", "{{category}}", "best-practices"] --- # {{Framework}} {{Feature}} ## When to Use - {{trigger_condition_1}} - {{trigger_condition_2}} ## Examples {{real_code_example}} ```` ```` ### Pattern 2: Quality Enforcement Require specific quality standards: ```markdown ## Quality Requirements Before generating, verify: 1. All code examples are tested and working 2. Error messages are exact (not paraphrased) 3. Framework version is specified 4. At least 3 real-world use cases included 5. Links to official docs provided ```` ### Pattern 3: CSO Optimization Teach AI to optimize for searchability: ```markdown theme={null} ## CSO Keywords Include these in description: - Exact error messages users will search for - Framework-specific terms - Common task descriptions - Integration names Example: ✅ "Use when getting 'Raw body not available' in Stripe webhooks" ❌ "Use for Stripe integration" ``` ### Pattern 4: Format-Specific Guidance Different AI editors need different formats: ```markdown theme={null} ## Format Selection **Cursor (.mdc files)**: - Use frontmatter with `ruleType` - Keep concise (Cursor prefers shorter rules) - Focus on actionable patterns **Claude (SKILL.md files)**: - More detailed explanations allowed - Include "When to Use" section - Can be longer with examples **Continue (.continue/rules/*.md)**: - Markdown files with YAML frontmatter - Focus on rules and context-aware guidelines - Include globs for file-specific rules ``` ## Advanced: Self-Generating Meta Packages Meta packages can teach AI to create **more meta packages**: ```bash theme={null} # Install meta-meta package prpm install @prpm/meta-package-creator # Now AI can create packages that teach how to create packages User: "Create a meta package for Rust best practices" AI: *generates rust-package-creator that teaches AI how to make Rust packages* ``` This creates a **recursive improvement loop**: 1. Meta package teaches AI to create packages 2. Those packages teach AI domain expertise 3. Domain expertise helps users solve problems 4. Users share new patterns back to packages ## Testing Meta Packages Before publishing, test that your meta package actually works: ### 1. Install the Meta Package ```bash theme={null} prpm install @your-org/python-package-creator ``` ### 2. Generate a Package ``` User: "Create a FastAPI authentication package" AI: *uses python-package-creator guidance* AI: *generates package* ``` ### 3. Verify Output Quality * [ ] Proper structure and frontmatter * [ ] Real, working code examples * [ ] Clear triggering conditions * [ ] Good CSO keywords * [ ] Complete metadata ### 4. Iterate If output is poor, improve the meta package's guidance. ## Best Practices ### 1. Provide Complete Templates Show **exactly** what good packages look like, with all sections filled in. ### 2. Use Real Examples Don't use placeholder text. Show actual packages from the registry as examples. ### 3. Enforce Standards Include checklists and requirements that AI must follow. ### 4. Optimize for Discovery Teach AI to include CSO keywords that users will actually search for. ### 5. Version Your Guidance As PRPM evolves, update meta packages to reflect new best practices. ## Common Pitfalls ### ❌ Too Abstract ```markdown theme={null} "Create a well-structured package with good examples" ``` ### ✅ Specific and Actionable ```markdown theme={null} "Include frontmatter with name, description, and tags array. Add 3 code examples with comments. Ensure description mentions exact error messages." ``` ### ❌ Generic Examples ```markdown theme={null} "Example: Some code here..." ``` ### ✅ Real, Tested Code ````markdown theme={null} "Example: ```python from fastapi import FastAPI, HTTPException app = FastAPI() @app.get("/users/{user_id}") async def get_user(user_id: int): # This pattern avoids N+1 queries user = await db.users.find_one({"id": user_id}) if not user: raise HTTPException(status_code=404, detail="User not found") return user ```` ```` ## Publishing Your Meta Package ```bash # Create prpm.json { "name": "python-package-creator", "description": "Meta package for creating high-quality Python PRPM packages", "tags": ["meta", "python", "package-creation", "ai-prompts"], "format": "claude", "subtype": "skill", "files": [".claude/skills/python-package-creator/SKILL.md"] } # Publish prpm publish ```` ## Related Topics * [Self-Improving Packages](/advanced/self-improving-packages) * [Package Formats](/concepts/formats) * [Publishing Guide](/publishing/getting-started) # Self-Improving Packages Source: https://docs.prpm.dev/advanced/self-improving-packages How AI assistants can automatically discover and install expertise packages from PRPM to enhance their capabilities ## Overview Self-improving packages enable AI assistants (Claude, Cursor, etc.) to **automatically search and install PRPM packages** when they detect they're working on specialized tasks. Instead of relying only on their base training, the AI can dynamically acquire domain-specific expertise from the PRPM registry. ## How It Works ### 1. Task Detection The AI analyzes the user's request for domain-specific keywords: * **Infrastructure**: aws, pulumi, terraform, kubernetes, docker, beanstalk * **Testing**: playwright, jest, cypress, vitest, e2e * **Deployment**: ci/cd, github-actions, gitlab-ci, workflows * **Frameworks**: react, vue, next.js, express, django, fastapi ### 2. Automatic Package Search When keywords are detected, the AI searches the PRPM registry: ```bash theme={null} prpm search "pulumi aws infrastructure" --limit 5 ``` ### 3. Quality Assessment The AI evaluates packages based on confidence levels: **High Confidence (Auto-suggest)** * ✅ Official packages (`@prpm/*`) * ✅ Featured packages * ✅ High downloads (>1,000) * ✅ Verified authors **Medium Confidence (Present options)** * ⚠️ Community packages (\<1,000 downloads) * ⚠️ Multiple similar packages **Low Confidence (Skip)** * ❌ Unverified packages * ❌ Zero downloads ### 4. User Approval The AI presents findings and asks permission: ``` I found a package that can help: 📦 @prpm/pulumi-infrastructure (Official, 3.2K downloads) - Pulumi + AWS best practices - Cost optimization patterns - Production deployment guides Should I install this to enhance my Pulumi knowledge? ``` ### 5. Installation & Application After approval, the package is installed and immediately applied: ```bash theme={null} prpm install @prpm/pulumi-infrastructure ``` The AI then uses the package's expertise to help with the task. ## Real-World Example ### User Request ``` "Help me deploy a Node.js app to AWS Elastic Beanstalk using Pulumi" ``` ### AI Detection & Response ``` Keywords detected: Elastic Beanstalk, Pulumi, deployment Searching PRPM registry... Found relevant packages: 1. @prpm/pulumi-infrastructure (Official, 5.2K downloads) - Pulumi best practices and AWS patterns 2. @prpm/beanstalk-deploy (Official, 2.1K downloads) - Elastic Beanstalk deployment patterns - GitHub Actions integration Should I install these packages to provide expert guidance? ``` ### After Installation The AI now has access to: * Production-tested Pulumi patterns * Beanstalk deployment best practices * Common pitfalls and solutions * CI/CD integration examples ## Installing Self-Improving Packages ### For Claude Code ```bash theme={null} prpm install @prpm/self-improving-skill ``` This skill teaches Claude to: * Detect task-specific keywords * Search the registry proactively * Evaluate package quality * Request permission before installing * Apply package knowledge immediately ### For Cursor ```bash theme={null} prpm install @prpm/self-improve-cursor ``` This rule enables Cursor to: * Automatically trigger searches on infrastructure/testing tasks * Present top packages with download counts * Install packages after user approval * Load expertise for the current task ## Creating Your Own Self-Improving Package You can create packages that teach AI assistants to be self-improving: ```markdown theme={null} # self-improving-python.md ## When to Use Triggers when detecting Python-specific tasks: - web frameworks: flask, django, fastapi - data science: pandas, numpy, scikit-learn - async: asyncio, aiohttp ## Search Strategy When Python framework detected: 1. Extract framework name 2. Search: `prpm search "python {framework} best-practices"` 3. Filter for packages with >500 downloads 4. Present top 3 options to user ## Example User: "Help me build a FastAPI app" Action: Search "python fastapi best-practices" Result: Suggest @community/fastapi-expert (1.2K downloads) ``` Publish it: ```bash theme={null} prpm publish ``` ## Meta-Dogfooding PRPM uses its own self-improving packages for development: * **`@prpm/pulumi-infrastructure`** → PRPM's infrastructure (74% cost savings) * **`@prpm/github-actions-testing`** → PRPM's workflow validation * **`@prpm/postgres-migrations`** → PRPM's database patterns **Benefit**: Users get the same battle-tested expertise that built PRPM itself. ## Privacy & Security * ✅ All searches query the PRPM registry API * ✅ No personal data collected during searches * ✅ Download tracking only on install (anonymous) * ✅ User approval required before installation * ✅ Packages are scanned for quality and safety ## Best Practices ### 1. Be Proactive Search for packages **before** starting complex tasks, not after encountering errors. ### 2. Verify Quality Always check: * Download counts * Official/verified status * Package description relevance ### 3. Ask Permission Never install packages without explicit user approval. ### 4. Apply Immediately Once installed, use the package knowledge right away on the current task. ### 5. Track Helpfulness Note which packages were useful for future reference. ## Advanced Patterns ### Chaining Package Discovery AI can discover packages that help discover more packages: ```bash theme={null} # Install the package discovery expert prpm install @prpm/self-improving-skill # Now the AI can discover domain-specific packages User: "Build a Kubernetes deployment" AI: *searches for kubernetes packages* AI: *finds @prpm/k8s-expert* AI: *suggests installation* ``` ### Context-Aware Installation AI can choose package format based on the editor: ```bash theme={null} # For Claude Code users prpm install @prpm/pulumi-infrastructure --as claude # For Cursor users prpm install @prpm/pulumi-infrastructure --as cursor ``` ### Temporary vs Permanent Some packages are task-specific, others are project-wide: ```bash theme={null} # Temporary: install for one-time task prpm install @prpm/stripe-webhooks # Permanent: add to project prpm install @prpm/typescript-type-safety ``` ## Limitations 1. **Search Quality**: Results depend on package descriptions and tags 2. **Installation Friction**: Requires user approval (by design) 3. **Context Window**: Very large packages may exceed token limits 4. **Network Required**: Registry search needs internet access ## Related Topics * [Creating Meta Packages](/advanced/meta-packages) * [Package Collections](/cli/workflows#working-with-collections) * [AI Prompt Formats](/concepts/formats) # Format Capabilities Source: https://docs.prpm.dev/api/formats API endpoints for discovering what features each AI editor format supports # Format Capabilities API The format capabilities API provides information about what features each AI editor format supports. Use this to determine compatibility when converting packages between formats. ## Get All Format Capabilities ```bash theme={null} GET /api/v1/formats/capabilities ``` Returns the complete format capabilities matrix. **Example Response:** ```json theme={null} { "version": "1.0.2", "description": "Format capability matrix for PRPM converters", "formats": { "cursor": { "name": "Cursor", "supportsSkills": false, "supportsPlugins": true, "supportsExtensions": false, "supportsAgents": false, "supportsAgentsMd": true, "supportsSlashCommands": true, "markdownFallback": "cursor-rules.md", "notes": "Cursor supports plugins (.cursor-plugin/plugin.json) that bundle rules, skills, agents, commands, hooks, and MCP servers..." }, "claude": { "name": "Claude Code", "supportsSkills": true, "supportsPlugins": true, "supportsExtensions": false, "supportsAgents": true, "supportsAgentsMd": false, "markdownFallback": "CLAUDE.md", "notes": "Claude Code supports skills, agents, and plugins..." }, "kiro": { "name": "Kiro AI", "supportsSkills": false, "supportsPlugins": false, "supportsExtensions": false, "supportsAgents": true, "supportsAgentsMd": true, "markdownFallback": "kiro-agent.md", "notes": "Kiro supports agents in .kiro/agents/ directory..." } }, "agentsMdSupport": { "description": "Formats that support agents.md for progressive disclosure", "formats": ["cursor", "copilot", "kiro", "opencode", "ruler", "droid", "replit", "zed"], "notes": "These formats can use AGENTS.md as a universal fallback..." } } ``` ## Get Specific Format Capabilities ```bash theme={null} GET /api/v1/formats/capabilities/:format ``` Returns capabilities for a single format. **Path Parameters:** | Parameter | Type | Description | | --------- | ------ | ---------------------------------------------- | | `format` | string | Format name (e.g., `cursor`, `claude`, `kiro`) | **Example Request:** ```bash theme={null} curl https://registry.prpm.dev/api/v1/formats/capabilities/kiro ``` **Example Response:** ```json theme={null} { "format": "kiro", "name": "Kiro AI", "supportsSkills": false, "supportsPlugins": false, "supportsExtensions": false, "supportsAgents": true, "supportsAgentsMd": true, "markdownFallback": "kiro-agent.md", "notes": "Kiro supports agents in .kiro/agents/ directory. Full agents.md support." } ``` **404 Response (format not found):** ```json theme={null} { "error": "Format not found", "message": "Format \"invalid\" does not exist in the capabilities matrix", "availableFormats": ["cursor", "claude", "continue", "windsurf", "copilot", "kiro", ...] } ``` ## Capability Fields | Field | Type | Description | | ----------------------- | ------- | ------------------------------------------ | | `name` | string | Human-readable format name | | `supportsSkills` | boolean | Can use skill packages | | `supportsPlugins` | boolean | Can use plugin packages | | `supportsExtensions` | boolean | Can use extension packages | | `supportsAgents` | boolean | Has native agent support | | `supportsAgentsMd` | boolean | Reads AGENTS.md files | | `supportsSlashCommands` | boolean | Has custom slash commands | | `markdownFallback` | string | Fallback filename for unsupported features | | `notes` | string | Additional capability notes | ## Progressive Disclosure When a target format doesn't support a specific feature (e.g., skills), PRPM uses progressive disclosure to convert to the best available alternative: 1. **Native format** - Use if supported 2. **Format-specific markdown** - e.g., `CLAUDE.md`, `GEMINI.md` 3. **Universal fallback** - `AGENTS.md` for maximum compatibility Use the capabilities API to determine the best conversion strategy for your packages. ## Example: Check Agents.md Support ```typescript theme={null} const response = await fetch('https://registry.prpm.dev/api/v1/formats/capabilities'); const { agentsMdSupport } = await response.json(); // Check if a format supports agents.md const supportsAgentsMd = agentsMdSupport.formats.includes('cursor'); console.log(`Cursor supports agents.md: ${supportsAgentsMd}`); // true ``` ## Available Formats | Format | Key | Supports Agents.md | | -------------- | ---------- | ------------------------ | | Cursor | `cursor` | Yes | | Claude Code | `claude` | No (uses CLAUDE.md) | | Continue | `continue` | No | | Windsurf | `windsurf` | No | | GitHub Copilot | `copilot` | Yes | | Kiro AI | `kiro` | Yes | | Gemini CLI | `gemini` | No (uses GEMINI.md) | | OpenCode | `opencode` | Yes | | Ruler | `ruler` | Yes | | Factory Droid | `droid` | Yes | | Trae | `trae` | No | | Aider | `aider` | No (uses CONVENTIONS.md) | | Zencoder | `zencoder` | No | | Replit Agent | `replit` | Yes | | Zed | `zed` | Yes | # API Overview Source: https://docs.prpm.dev/api/overview PRPM Registry API endpoints for packages, schemas, and format capabilities # Registry API The PRPM Registry provides a REST API for accessing packages, schemas, and format capabilities. All endpoints are available at `https://registry.prpm.dev/api/v1/`. ## Base URL ``` https://registry.prpm.dev/api/v1 ``` ## Authentication Most read endpoints are public. Write operations (publishing, updating packages) require authentication via GitHub OAuth. ## Rate Limits * Public endpoints: 100 requests/minute * Authenticated endpoints: 1000 requests/minute ## Response Format All responses are JSON with appropriate `Content-Type` headers. Schema endpoints use `application/schema+json`. ## Available Endpoints ### Packages | Endpoint | Description | | ------------------------------ | -------------------- | | `GET /packages` | List all packages | | `GET /packages/:name` | Get package by name | | `GET /packages/:name/:version` | Get specific version | ### Search | Endpoint | Description | | ------------------------- | -------------------------- | | `GET /search?q=:query` | Search packages | | `GET /ai-search?q=:query` | AI-powered semantic search | ### Schemas | Endpoint | Description | | ------------------------------------ | ------------------------------- | | `GET /schemas` | List all available schemas | | `GET /schemas/:format.json` | Get base format schema | | `GET /schemas/:format/:subtype.json` | Get subtype schema | | `GET /schemas/format-registry` | Get format directory structures | ### Format Capabilities | Endpoint | Description | | ----------------------------------- | ------------------------------------ | | `GET /formats/capabilities` | Get all format capabilities | | `GET /formats/capabilities/:format` | Get capabilities for specific format | ### Collections | Endpoint | Description | | ------------------------ | ---------------------- | | `GET /collections` | List all collections | | `GET /collections/:slug` | Get collection by slug | ### Taxonomy | Endpoint | Description | | ------------------------ | ---------------------- | | `GET /taxonomy` | Get full taxonomy tree | | `GET /taxonomy/formats` | Get supported formats | | `GET /taxonomy/subtypes` | Get package subtypes | ### Download | Endpoint | Description | | ------------------------------ | ------------------------------- | | `GET /download/:name` | Download latest package version | | `GET /download/:name/:version` | Download specific version | # Schema Endpoints Source: https://docs.prpm.dev/api/schemas JSON Schema endpoints for validating AI editor prompt packages # Schema Endpoints The PRPM Registry serves JSON Schema files for validating prompt packages across all supported AI editor formats. ## List All Schemas ```bash theme={null} GET /api/v1/schemas ``` Returns a list of all available schemas with metadata. **Query Parameters:** | Parameter | Type | Description | | --------- | ------- | ------------------------------------------- | | `format` | string | Filter by format (e.g., `claude`, `cursor`) | | `grouped` | boolean | Return schemas grouped by format | **Example Response:** ```json theme={null} { "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 ```bash theme={null} GET /api/v1/schemas/:format.json ``` Returns the JSON Schema for a base format. **Available Base Formats:** | Format | Schema 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 ```bash theme={null} GET /api/v1/schemas/:format/:subtype.json ``` Returns the JSON Schema for a specific subtype within a format. **Available Subtypes:** ### Claude Subtypes | Subtype | Schema URL | Description | | --------------- | ------------------------------------------- | ------------------ | | `agent` | `/api/v1/schemas/claude/agent.json` | Claude Code agents | | `skill` | `/api/v1/schemas/claude/skill.json` | Claude Code skills | | `slash-command` | `/api/v1/schemas/claude/slash-command.json` | Slash commands | | `hook` | `/api/v1/schemas/claude/hook.json` | Claude Code hooks | ### Cursor Subtypes | Subtype | Schema URL | Description | | --------- | ------------------------------------- | --------------------------------------------- | | `command` | `/api/v1/schemas/cursor/command.json` | Cursor slash commands | | `hooks` | `/api/v1/schemas/cursor/hooks.json` | Cursor hooks configuration | | `plugin` | `/api/v1/schemas/cursor/plugin.json` | Cursor plugins (`.cursor-plugin/plugin.json`) | ### Kiro Subtypes | Subtype | Schema URL | Description | | ------- | --------------------------------- | ------------------------------------ | | `agent` | `/api/v1/schemas/kiro/agent.json` | Kiro agents | | `hook` | `/api/v1/schemas/kiro/hook.json` | Kiro hooks (file events + lifecycle) | ### Factory Droid Subtypes | Subtype | Schema URL | Description | | --------------- | ------------------------------------------ | -------------------- | | `skill` | `/api/v1/schemas/droid/skill.json` | Droid skills | | `slash-command` | `/api/v1/schemas/droid/slash-command.json` | Droid slash commands | | `hook` | `/api/v1/schemas/droid/hook.json` | Droid hooks | ### OpenCode Subtypes | Subtype | Schema URL | Description | | --------------- | --------------------------------------------- | ----------------------- | | `slash-command` | `/api/v1/schemas/opencode/slash-command.json` | OpenCode slash commands | ## Get Format Registry ```bash theme={null} GET /api/v1/schemas/format-registry ``` Returns directory structures and file patterns for all AI editor formats. **Example Response:** ```json theme={null} { "cursor": { "directories": [".cursor", ".cursor/rules", ".cursor/commands", ".cursor-plugin"], "files": { "rules": ".cursor/rules/*.mdc", "commands": ".cursor/commands/*.md", "plugins": ".cursor-plugin/plugin.json" } }, "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: ```json theme={null} { "$schema": "https://registry.prpm.dev/api/v1/schemas/cursor.json", "name": "my-rule", "content": "..." } ``` Or validate programmatically: ```typescript theme={null} 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); } ``` # Command Reference Source: https://docs.prpm.dev/cli/commands Complete reference for all PRPM CLI commands ## Package Discovery Commands ### search Search for packages in the PRPM registry (keyword-based). ```bash theme={null} prpm search [options] ``` **Arguments:** * `query` - Search term to find packages **Options:** * `--format ` - Filter by format (cursor, claude, windsurf, continue, etc.) * `--subtype ` - Filter by subtype (rule, agent, skill, slash-command, etc.) * `--limit ` - Maximum number of results to return (default: 20) * `--no-interactive` - Disable interactive pagination (useful for automation and scripting) **Note:** Interactive mode is enabled **by default** when there are multiple pages of results. Use `--no-interactive` when you want to search and install packages programmatically in scripts or CI/CD environments. **Examples:** ```bash theme={null} # Basic search (interactive by default) prpm search typescript # Filter by format prpm search react --format cursor # Filter by subtype prpm search coding --subtype rule # Disable interactive mode for automation prpm search python --no-interactive # Use in scripts/CI/CD pipelines prpm search typescript --format cursor --no-interactive | head -n 1 ``` **Output:** Displays matching packages with their name, description, format, downloads, and installation command. *** ### ai-search AI-powered semantic search for finding packages using natural language (no login required). ```bash theme={null} prpm ai-search "" [options] ``` **Arguments:** * `query` - Natural language description of what you need **Options:** * `--limit ` - Number of results to return (default: 10) * `--format ` - Filter by format (cursor, claude, windsurf, continue, etc.) * `--subtype ` - Filter by subtype (rule, agent, skill, slash-command, etc.) **Examples:** ```bash theme={null} # Find packages using natural language prpm ai-search "I need help with React state management best practices" # Limit results prpm ai-search "Python type safety" --limit 5 # Filter by format prpm ai-search "code review assistant" --format claude # Filter by subtype prpm ai-search "API documentation generator" --subtype agent ``` **How it works:** * Uses AI embeddings to understand semantic meaning * Matches your intent rather than just keywords * Ranks results by relevance, quality, and popularity * 100% free with no authentication required * Faster and more accurate than keyword search for complex queries **Output:** Displays matching packages with similarity scores, descriptions, match quality, and installation commands. *** ### info Display detailed information about a specific package. ```bash theme={null} prpm info ``` **Arguments:** * `package-name` - Full package name (e.g., `@username/typescript-rules`) **Options:** * `--json` - Output in JSON format * `--version ` - Show info for a specific version **Examples:** ```bash theme={null} # View package details prpm info @username/typescript-best-practices # View specific version prpm info @username/typescript-best-practices --version 1.2.0 # JSON output for scripting prpm info @username/typescript-rules --json ``` **Output:** Shows package name, version, description, author, format, subtype, dependencies, installation instructions, and README content. *** ### show Preview package contents before installing. Downloads and extracts the package to display its files without modifying your project. ```bash theme={null} prpm show [options] ``` **Arguments:** * `package` - Package ID to show (e.g., `@username/package` or `@username/package@1.0.0`) **Options:** * `--full` - Show complete file contents (not just file list) * `--file ` - Show contents of a specific file * `--json` - Output in JSON format (for programmatic use) **Examples:** ```bash theme={null} # Preview package files prpm show @username/typescript-rules # View complete file contents prpm show @username/typescript-rules --full # View a specific file prpm show @username/typescript-rules --file SKILL.md # View specific version prpm show @username/typescript-rules@2.0.0 # JSON output for scripting prpm show @username/typescript-rules --json ``` **Output:** Displays package metadata (name, version, format, subtype), a list of all files with their sizes, and optionally the full file contents. Binary files are detected and marked as `[binary]`. **Use Cases:** * Inspect package contents before installing * Verify package structure and file organization * Review code/rules before adding to your project * Audit packages for security or quality *** ### trending View trending packages from the registry. ```bash theme={null} prpm trending [options] ``` **Options:** * `--format ` - Filter by format * `--subtype ` - Filter by subtype * `--limit ` - Number of packages to display (default: 10) * `--period ` - Time period (day, week, month) (default: week) **Examples:** ```bash theme={null} # View trending packages prpm trending # Trending Cursor rules this month prpm trending --format cursor --period month # Top 20 trending agents prpm trending --subtype agent --limit 20 ``` *** ### popular View all-time popular packages from the registry. ```bash theme={null} prpm popular [options] ``` **Options:** * `--format ` - Filter by format * `--subtype ` - Filter by subtype **Note:** `popular` shows all-time most downloaded packages, while `trending` shows packages gaining traction in a specific time period. **Examples:** ```bash theme={null} # View popular packages prpm popular # Popular Cursor rules prpm popular --format cursor # Popular Claude skills prpm popular --format claude --subtype skill ``` *** ### starred List your starred packages and collections. ```bash theme={null} prpm starred [options] ``` **Options:** * `--packages` - Show only starred packages * `--collections` - Show only starred collections * `--format ` - Filter packages by format (cursor, claude, continue, windsurf, etc.) * `--limit ` - Maximum number of items to fetch (default: 100) **Prerequisites:** * Must be logged in (`prpm login`) **Examples:** ```bash theme={null} # List all starred items (packages and collections) prpm starred # Show only starred packages prpm starred --packages # Show only starred collections prpm starred --collections # Filter by format prpm starred --packages --format cursor # Limit results prpm starred --limit 20 ``` **Output:** Displays starred items with their name, description, format/category, downloads/stars, and last update time. **Tip:** Star packages and collections on the web interface at [https://prpm.dev](https://prpm.dev) to save your favorites for easy access later. *** ### collections Browse and view curated collections of packages. ```bash theme={null} prpm collections [options] prpm collections ``` **Options:** * `--list` - List all available collections * `--install` - Install all packages in a collection **Examples:** ```bash theme={null} # List all collections prpm collections --list # View a specific collection prpm collections web-development # Install all packages in a collection prpm collections web-development --install ``` *** ## Package Management Commands ### install Install one or more packages from the registry. ```bash theme={null} prpm install [additional-packages...] [options] ``` **Arguments:** * `package-name` - Package to install (supports multiple packages) **Options:** * `--version ` - Install a specific version * `--as ` - Convert and install in specific format (cursor, claude, continue, windsurf, copilot, kiro, agents.md, canonical). For MCP servers, specifies the target editor (claude, codex, cursor, windsurf, vscode, gemini, opencode, kiro, trae, amp, zed) * `--format ` - Alias for `--as` * `--subtype ` - Specify subtype when converting (skill, agent, rule, etc.) * `--location ` - Custom installation location (Cursor and agents.md only) * `--global` - Install MCP servers to global config (e.g., `~/.claude/settings.json`) * `--frozen-lockfile` - Fail if lock file needs to be updated (for CI) * `--eager` - Force skill/agent to always activate at session start (not on-demand) * `--lazy` - Use default on-demand activation (overrides package eager setting) **Examples:** ```bash theme={null} # Install a package prpm install @username/typescript-best-practices # Install multiple packages prpm install @username/typescript-rules1 @username/typescript-rules2 @username/typescript-rules3 # Install specific version prpm install @username/typescript-rules --version 2.1.0 # Install and convert to Cursor format prpm install @username/typescript-rules --as cursor # Install and convert to Claude format prpm install @username/typescript-rules --format claude # Install to custom location (Cursor rules in monorepo) prpm install @username/react-rules --as cursor --location packages/frontend # Install agents.md to custom directory prpm install @username/project-context --as agents.md --location docs # Frozen lockfile (for CI) prpm install @username/typescript-rules --frozen-lockfile # Install skill with eager activation (always active) prpm install @username/code-style --as agents.md --eager # Install with lazy activation (on-demand, default) prpm install @username/debugging-helper --as agents.md --lazy # Install MCP server for a specific editor prpm install @org/my-mcp-server --as cursor prpm install @org/my-mcp-server --as codex # Install MCP server globally prpm install @org/my-mcp-server --as vscode --global ``` **What happens during installation:** 1. Package is downloaded from the registry 2. Files are extracted to the appropriate directory (`.cursor/`, `.claude/`, etc.) 3. Package is registered in `prpm.lock` 4. Format-specific configuration is applied (MDC headers for Cursor, etc.) **Custom Locations (`--location`):** The `--location` flag allows you to install packages to custom directories. This is useful for: * **Monorepos**: Install Cursor rules in specific packages (e.g., `--location packages/backend` creates `packages/backend/.cursor/rules/`) * **Nested projects**: Keep different contexts in subdirectories * **Agents.md**: Create `AGENTS.override.md` in custom locations (e.g., `--location docs` creates `docs/AGENTS.override.md`) **Supported formats:** * `cursor` - Installs to nested `.cursor/` directory within the specified path * `agents.md` - Creates `AGENTS.override.md` in the specified path **Eager vs Lazy Activation (`--eager` / `--lazy`):** These flags control how skills and agents are loaded in progressive disclosure formats (agents.md, gemini.md, claude.md, aider): * **Lazy (default)**: Skills/agents are available but only activated when relevant based on their description. The AI decides when to use them. * **Eager**: Skills/agents are loaded at the START of every session. Always active, no activation needed. | Mode | When Loaded | Use Case | | ----- | ----------------------- | ---------------------------------------- | | Lazy | On-demand when relevant | Most skills - keeps context clean | | Eager | Every session start | Critical skills that should always apply | **Precedence:** CLI flag (`--eager`/`--lazy`) > file-level setting > package-level setting > default (lazy) **Applies to:** Skills and agents in progressive disclosure formats only. Rules, hooks, and other subtypes are not affected. **Example directory structure:** ```bash theme={null} # Install to packages/frontend prpm install @user/react-rules --as cursor --location packages/frontend # Result: packages/ frontend/ .cursor/ rules/ react-rules.mdc ``` *** ### uninstall Remove installed packages from your project. ```bash theme={null} prpm uninstall [additional-packages...] [options] ``` **Arguments:** * `package-id` - ID of the package to uninstall **Options:** * `--force` - Skip confirmation prompts * `--keep-files` - Remove from lock file but keep the files **Examples:** ```bash theme={null} # Uninstall a package prpm uninstall @username/typescript-best-practices # Uninstall multiple packages prpm uninstall package1 package2 package3 # Uninstall without confirmation prpm uninstall package-name --force ``` *** ### list List all installed packages in the current project. ```bash theme={null} prpm list [options] ``` **Options:** * `--format ` - Filter by format * `--subtype ` - Filter by subtype * `--json` - Output in JSON format * `--verbose` - Show additional details (file paths, versions) **Examples:** ```bash theme={null} # List all packages prpm list # List only Cursor packages prpm list --format cursor # List all agents prpm list --subtype agent # Detailed output prpm list --verbose # JSON output prpm list --json ``` **Output:** Shows package ID, format, subtype, version, and file path for each installed package. *** ### outdated Check for packages that have newer versions available. ```bash theme={null} prpm outdated [options] ``` **Options:** * `--json` - Output in JSON format **Examples:** ```bash theme={null} # Check for outdated packages prpm outdated # JSON output for scripting prpm outdated --json ``` **Output:** Displays packages with their current version, latest available version, and update command. *** ### update Update specific packages to their latest versions. ```bash theme={null} prpm update [additional-packages...] [options] ``` **Arguments:** * `package-name` - Package(s) to update **Options:** * `--version ` - Update to a specific version * `--force` - Force update even if at latest version **Examples:** ```bash theme={null} # Update a single package prpm update @username/typescript-rules # Update multiple packages prpm update package1 package2 package3 # Update to specific version prpm update package-name --version 2.5.0 ``` *** ### upgrade Upgrade all installed packages to their latest versions. ```bash theme={null} prpm upgrade [options] ``` **Options:** * `--dry-run` - Show what would be upgraded without making changes * `--interactive` - Prompt for confirmation for each package * `--skip-breaking` - Skip packages with breaking changes (major version bumps) **Examples:** ```bash theme={null} # Upgrade all packages prpm upgrade # Preview upgrades prpm upgrade --dry-run # Interactive upgrades prpm upgrade --interactive ``` *** ## Package Creation Commands ### init Initialize a new PRPM package or scan directories to discover existing packages. ```bash theme={null} prpm init [directories...] [options] ``` **Arguments:** * `directories` - Directories to scan (only used with `--scan`) **Options:** * `-y, --yes` - Use default values, skip prompts * `--private` - Create a private package * `-f, --force` - Overwrite existing `prpm.json` if present * `-s, --scan` - Scan mode: discover packages in directories without prompts * `-o, --output ` - Output path for prpm.json (scan mode only) * `-a, --append` - Append to existing prpm.json instead of overwriting (scan mode only) * `--dry-run` - Show what would be discovered without making changes (scan mode only) **Interactive Prompts (standard mode):** * Package name * Version * Description * Format (cursor, claude, windsurf, etc.) * Subtype (rule, agent, skill, etc.) * Author name * License * Repository URL * Tags * Files to include **Examples:** ```bash theme={null} # Interactive initialization prpm init # Use defaults prpm init --yes # Create private package prpm init --private # Force overwrite prpm init --force # Scan mode: discover packages in current directory prpm init --scan # Scan specific directories prpm init --scan .claude .cursor .windsurf # Append discovered packages to existing prpm.json prpm init --scan --append # Preview what would be discovered prpm init --scan --dry-run # Output to custom location prpm init --scan -o packages.json ``` **What gets created (standard mode):** * `prpm.json` - Package manifest * `README.md` - Package documentation template * Format-specific example files based on your selection **What scan mode does:** 1. Scans directories for prompt files (`.md`, `.mdc`, `SKILL.md`, etc.) 2. Detects format (cursor, claude, windsurf, etc.) and subtype (rule, skill, agent) 3. Extracts package metadata from file content 4. Filters out packages installed from registry (only discovers user-created content) 5. Creates/updates `prpm.json` with discovered packages *** ### publish Publish packages or collections to the PRPM registry. ```bash theme={null} prpm publish [options] ``` **Options:** * `--package ` - Publish only a specific package from multi-package manifest * `--collection ` - Publish only a specific collection (skips packages) * `-l, --list` - List all packages in prpm.json without publishing * `--dry-run` - Test publishing without actually uploading * `--tag ` - Publish with a specific tag (e.g., `beta`, `next`) * `--access ` - Set package access level * `--force` - Skip validation warnings **Prerequisites:** * Must be logged in (`prpm login`) * Must have a valid `prpm.json` in current directory * Package version must not already exist in registry **Examples:** ```bash theme={null} # Publish everything (all packages + all collections) prpm publish # Publish only a specific package prpm publish --package my-package # Publish only a specific collection (skips all packages) prpm publish --collection my-collection # Test publish (dry run) prpm publish --dry-run # Publish specific package as beta prpm publish --package my-package --tag beta # Publish private package prpm publish --access private # List all packages without publishing prpm publish --list ``` **Multi-Package Publishing:** When your `prpm.json` has multiple packages or collections: ```json theme={null} { "name": "my-workspace", "packages": [ { "name": "package-a", ... }, { "name": "package-b", ... } ], "collections": [ { "id": "collection-1", ... }, { "id": "collection-2", ... } ] } ``` **Publishing Behavior:** * `prpm publish` → Publishes **all** packages + **all** collections * `prpm publish --package package-a` → Publishes **only** `package-a` (skips collections) * `prpm publish --collection collection-1` → Publishes **only** `collection-1` (skips packages) **What happens during publish:** 1. Package is validated against schema 2. Files are packaged into a tarball 3. Package metadata is uploaded to registry 4. Tarball is uploaded to storage 5. Package becomes available for installation **Rate Limiting:** * Burst capacity: 20 packages can be published immediately * Sustained rate: 10 packages per minute after burst * Requests are automatically queued when rate limit is reached * Maximum queue wait: 30 seconds *** ## Playground Commands ### playground Test packages with real AI models before installing. ```bash theme={null} prpm playground [options] ``` **Options:** * `-p, --package ` - Package name to test (e.g., `@user/package-name`) * `--input ` - Input text to send to the model (omit for interactive mode) * `-m, --model ` - AI model to use (sonnet, opus, gpt-4o, gpt-4o-mini, gpt-4-turbo) (default: sonnet) * `-c, --compare` - Compare with and without package prompt (baseline test) * `-i, --interactive` - Start interactive multi-turn conversation mode * `-v, --version ` - Specific package version to test * `--custom ` - Use a custom prompt string (verified authors only) * `--prompt-file ` - Load custom prompt from a file (verified authors only) **Examples:** ```bash theme={null} # Basic test prpm playground --package @user/code-reviewer --input "Review this: console.log('hello')" # Interactive conversation prpm playground --package @user/brainstorm-assistant --interactive # Compare mode (with and without prompt) prpm playground --package @user/optimizer --input "Optimize this function" --compare # Use a specific model prpm playground --package @user/complex-task --input "Analyze this" --model opus prpm playground --package @user/simple-task --input "Format this" --model gpt-4o-mini # Test specific version prpm playground --package @user/my-package --version 2.1.0 --input "Test this" # Custom prompt (verified authors only) prpm playground --custom "You are a helpful assistant" --input "Hello" prpm playground --prompt-file my-prompt.txt --input "Test" ``` **Supported Models:** * `sonnet` (Claude Sonnet 3.5) - Balanced performance, 2 credits (default) * `gpt-4o-mini` - Fast and economical, 1 credit * `gpt-4o` - Advanced reasoning, 3 credits * `gpt-4-turbo` - Complex tasks, 4 credits * `opus` (Claude Opus) - Most capable, 7 credits **Credits:** * 1 credit = 5,000 tokens (input + output combined) * Free tier: 5 trial credits * PRPM+: 100 monthly credits (\$6/month) * Credit packs: Buy additional credits that never expire See the [Playground Guide](/guides/playground) for detailed information. *** ### subscribe Manage your PRPM+ subscription. ```bash theme={null} prpm subscribe [command] ``` **Commands:** * (no command) - Subscribe to PRPM+ * `status` - View subscription status and credit balance * `cancel` - Cancel your PRPM+ subscription **Examples:** ```bash theme={null} # Subscribe to PRPM+ prpm subscribe # Check subscription status and credits prpm subscribe status # Cancel subscription prpm subscribe cancel ``` **PRPM+ Benefits:** * 100 monthly playground credits * Credits roll over (max 200 balance) * $6/month (or $3/month for organization members) * Priority support *** ### credits Check your playground credits balance and transaction history. ```bash theme={null} prpm credits [options] ``` **Options:** * `-h, --history` - Show transaction history instead of balance * `-l, --limit ` - Number of transactions to show in history (default: 10) **Examples:** ```bash theme={null} # Check credit balance prpm credits # View transaction history prpm credits --history # View last 20 transactions prpm credits --history --limit 20 ``` **Output:** * Without `--history`: Displays current credit balance, monthly allotment (if PRPM+ subscriber), and next renewal date * With `--history`: Shows recent credit transactions including purchases, usage, monthly credits, and rollover *** ### buy-credits Purchase additional playground credits. ```bash theme={null} prpm buy-credits ``` Opens an interactive prompt to select and purchase credit packs. **Credit Packs:** * 100 credits = \$5.00 * Credits never expire * Stack with monthly PRPM+ credits **Examples:** ```bash theme={null} # Open credit purchase flow prpm buy-credits ``` *** ### suggested-inputs Manage suggested test inputs for your packages (authors only). ```bash theme={null} prpm suggested-inputs [input] ``` **Commands:** * `add ` - Add a suggested test input * `list ` - List all suggested inputs for a package * `remove ` - Remove a suggested input **Examples:** ```bash theme={null} # Add suggested input prpm suggested-inputs add @user/my-package "Review this authentication code" # List all inputs prpm suggested-inputs list @user/my-package # Remove an input prpm suggested-inputs remove @user/my-package abc123 ``` **What it does:** Suggested inputs appear automatically in the playground web interface, making it easier for users to test your package with relevant examples. *** ## Local File Management Commands ### index Scan your project directories for existing prompt files and register them in PRPM. ```bash theme={null} prpm index [options] ``` **Options:** * `--verbose` - Show detailed output for each file **Scanned Directories:** * `.cursor/rules/` - Cursor rules * `.cursor/agents/` - Cursor agents * `.cursor/commands/` - Cursor slash commands * `.claude/agents/` - Claude agents * `.claude/skills/` - Claude skills * `.claude/commands/` - Claude slash commands * `.continue/rules/` - Continue rules * `.windsurf/rules/` - Windsurf rules * `.prompts/` - Generic prompts * `.mcp/` - MCP servers **Examples:** ```bash theme={null} # Index local files prpm index # Verbose output prpm index --verbose ``` **Output:** Shows how many files were found and registered in each directory, and updates `prpm.lock`. *** ### convert Convert AI prompt files between different formats (e.g., Cursor to Claude, Claude to Windsurf). ```bash theme={null} prpm convert [options] ``` **Arguments:** * `source-file` - Path to the file you want to convert **Options:** * `-t, --to ` - Target format (cursor, claude, windsurf, kiro, copilot, continue, agents.md) * `-s, --subtype ` - Target subtype (agent, skill, slash-command, rule, prompt, etc.) * `-o, --output ` - Custom output path (defaults to format-specific location) * `-y, --yes` - Skip confirmation prompts **Examples:** ```bash theme={null} # Convert Cursor rule to Claude skill prpm convert .cursor/rules/my-rule.mdc --to claude --subtype skill # Convert Claude agent to Windsurf rule prpm convert .claude/agents/my-agent.md --to windsurf # Convert to Copilot with custom output prpm convert my-prompt.md --to copilot --output .github/instructions/custom.instructions.md # Auto-detect source format and convert to Continue prpm convert some-file.md --to continue --subtype rule # Skip confirmation prompts prpm convert .claude/skills/helper/SKILL.md --to cursor --yes ``` **How it works:** 1. Auto-detects the source format from file content and location 2. Parses the source file to extract content and metadata 3. Converts to canonical intermediate format 4. Transforms to target format with appropriate structure 5. Writes to format-specific default location or custom output path **Default Output Locations:** * **Cursor**: `.cursor/rules/*.mdc` (rules) or `.cursor/commands/*.md` (commands) * **Claude**: `.claude/skills/*/SKILL.md` (skills), `.claude/agents/*.md` (agents), `.claude/commands/*.md` (commands) * **Windsurf**: `.windsurf/rules/*.md` * **Continue**: `.continue/rules/*.md` (rules) or `.continue/prompts/*.md` (prompts) * **Copilot**: `.github/instructions/*.instructions.md` * **Kiro**: `.kiro/steering/*.md` (steering) or `.kiro/hooks/*.kiro.hook` (hooks) * **Agents.md**: `agents.md` (root file) **Supported Conversions:** All formats can be converted to all other formats with intelligent content preservation and format-specific adaptations. *** ## User Management Commands ### login Authenticate with the PRPM registry. ```bash theme={null} prpm login [options] ``` **Options:** * `--token ` - Use an existing authentication token **Examples:** ```bash theme={null} # Interactive login prpm login # Login with token prpm login --token your-auth-token # Login to custom registry (set registry URL first) PRPM_REGISTRY_URL=https://custom-registry.example.com prpm login # Or configure permanently: prpm config set registryUrl https://custom-registry.example.com prpm login ``` **Authentication Flow:** 1. Opens browser for authentication (or uses provided token) 2. Saves authentication token to `~/.prpmrc` 3. Token is used for future authenticated requests *** ### whoami Display information about the currently authenticated user. ```bash theme={null} prpm whoami [options] ``` **Options:** * `--json` - Output in JSON format **Examples:** ```bash theme={null} # Show current user prpm whoami # JSON output prpm whoami --json ``` **Output:** Displays username, email, and authentication status. *** ## Configuration Commands ### config View or modify CLI configuration. ```bash theme={null} prpm config [key] [value] ``` **Subcommands:** * `list` (or `ls`) - List all configuration values * `get ` - Get a configuration value * `set ` - Set a configuration value * `delete ` (or `rm`) - Reset a configuration value to default **Configuration Keys:** **Readable keys:** * `registryUrl` - Registry URL * `telemetryEnabled` - Telemetry enabled (true/false) * `token` - Authentication token (set via `prpm login`) * `username` - Username (set via `prpm login`) **Settable keys:** * `registryUrl` - Change the registry URL * `telemetryEnabled` - Enable or disable telemetry **Note:** `token` and `username` are managed via `prpm login` and cannot be set directly. **Examples:** ```bash theme={null} # List all configuration prpm config list # or just: prpm config # Get a specific value prpm config get registryUrl prpm config get telemetryEnabled # Set registry URL prpm config set registryUrl https://custom-registry.dev # Enable telemetry prpm config set telemetryEnabled true # Disable telemetry prpm config set telemetryEnabled false # Reset a value to default prpm config delete registryUrl prpm config delete telemetryEnabled ``` **Telemetry values:** When setting `telemetryEnabled`, you can use: * `true`, `1`, `yes` - Enable telemetry * `false`, `0`, `no` - Disable telemetry *** ### telemetry Manage anonymous usage telemetry. ```bash theme={null} prpm telemetry ``` **Actions:** * `enable` - Enable telemetry * `disable` - Disable telemetry * `status` - Show current telemetry status **Examples:** ```bash theme={null} # Check status prpm telemetry status # Enable telemetry prpm telemetry enable # Disable telemetry prpm telemetry disable ``` **What we collect:** * Command usage (anonymized) * Error messages (anonymized) * Installation success/failure rates * Package popularity **We do NOT collect:** * Personal information * File contents * Project details * Authentication tokens *** ### schema View or validate package schemas. ```bash theme={null} prpm schema [options] ``` **Options:** * `--validate ` - Validate a package manifest against schema * `--format ` - Show schema for a specific format * `--output ` - Write schema to file **Examples:** ```bash theme={null} # View main package schema prpm schema # Validate your package prpm schema --validate prpm.json # Get schema for specific format prpm schema --format cursor # Save schema to file prpm schema --output schema.json ``` *** ## Exit Codes The PRPM CLI uses standard exit codes: * `0` - Success * `1` - General error * `2` - Invalid arguments or usage * `3` - Network error * `4` - Authentication error * `5` - Package not found * `6` - Validation error These can be useful when scripting with PRPM: ```bash theme={null} #!/bin/bash if prpm install @username/typescript-rules; then echo "Installation successful" else echo "Installation failed with code $?" fi ``` *** ## Environment Variables PRPM respects these environment variables: * `PRPM_REGISTRY_URL` - Override default registry URL * `PRPM_TOKEN` - Authentication token * `PRPM_TELEMETRY` - Enable/disable telemetry (true/false) * `PRPM_CONFIG_PATH` - Custom config file location * `NO_COLOR` - Disable colored output **Example:** ```bash theme={null} PRPM_REGISTRY_URL=https://custom.registry.dev prpm search typescript ``` # CLI Overview Source: https://docs.prpm.dev/cli/overview Introduction to the PRPM command-line interface The PRPM CLI is a powerful command-line tool for managing AI prompts, rules, skills, and agents across different AI coding assistants. ## Installation Install the CLI globally using npm: ```bash theme={null} npm install -g prpm ``` Or use it with npx without installation: ```bash theme={null} npx prpm ``` ## Getting Help View all available commands: ```bash theme={null} prpm --help ``` Get help for a specific command: ```bash theme={null} prpm --help ``` ## Command Categories The PRPM CLI commands are organized into several categories: ### Package Discovery * **search** - Search for packages in the registry * **ai-search** - AI-powered semantic search (PRPM+ feature) * **info** - View detailed information about a package * **trending** - View trending packages * **popular** - View all-time popular packages * **collections** - Browse curated package collections ### Package Management * **install** - Install packages from the registry * **uninstall** - Remove installed packages * **list** - List all installed packages * **outdated** - Check for outdated packages * **update** - Update specific packages * **upgrade** - Upgrade all packages to latest versions ### Package Creation * **init** - Initialize a new PRPM package * **publish** - Publish a package to the registry ### Local File Management * **index** - Scan local directories and register prompt files ### User Management * **login** - Authenticate with the registry * **whoami** - Display current user information ### Configuration * **config** - Manage CLI configuration * **telemetry** - Manage telemetry settings * **schema** - View or validate package schemas ## Quick Start 1. **Search for a package:** ```bash theme={null} prpm search typescript ``` 2. **Install a package:** ```bash theme={null} prpm install @username/typescript-best-practices ``` 3. **List installed packages:** ```bash theme={null} prpm list ``` 4. **Create a new package:** ```bash theme={null} prpm init ``` ## Common Workflows ### Installing Your First Package ```bash theme={null} # Search for what you need prpm search react # Get detailed info about a package prpm info @username/react-rules # Install the package prpm install @username/react-rules ``` ### Creating and Publishing a Package ```bash theme={null} # Initialize a new package prpm init # Follow the prompts to configure your package # Edit your prompt files # Publish to the registry prpm login prpm publish ``` ### Managing Local Prompts ```bash theme={null} # Index existing prompt files in your project prpm index # See what's been registered prpm list # Remove a package you no longer need prpm uninstall package-name ``` ## Global Options Most commands support these global options: * `--help` - Display help for the command * `--version` - Display PRPM version * `--verbose` - Show detailed output (where applicable) ## Configuration PRPM stores configuration in `~/.prpmrc`. You can edit this file directly or use the `prpm config` command. Common configuration options: * Registry URL * Authentication tokens * Default format preferences * Telemetry settings ## Next Steps Explore all available commands in detail Learn how to create and publish your own packages # Troubleshooting Source: https://docs.prpm.dev/cli/troubleshooting Solutions to common PRPM CLI issues ## Installation Issues ### Command Not Found After Installation **Problem:** After running `npm install -g prpm`, the `prpm` command is not found. **Solutions:** 1. **Check if npm global bin is in your PATH:** ```bash theme={null} npm config get prefix # Should output something like /usr/local or ~/.npm-global ``` 2. **Add npm global bin to PATH (if needed):** ```bash theme={null} # For bash echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.bashrc source ~/.bashrc # For zsh echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc source ~/.zshrc ``` 3. **Use npx as alternative:** ```bash theme={null} npx prpm install @username/typescript-rules ``` 4. **Reinstall with correct permissions:** ```bash theme={null} # On Linux/Mac, may need sudo sudo npm install -g prpm ``` ### Permission Errors During Installation **Problem:** EACCES or permission denied errors when installing globally. **Solutions:** 1. **Change npm's default directory (recommended):** ```bash theme={null} mkdir ~/.npm-global npm config set prefix '~/.npm-global' echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile source ~/.profile npm install -g prpm ``` 2. **Use sudo (less secure):** ```bash theme={null} sudo npm install -g prpm ``` *** ## Package Installation Issues ### Package Not Found **Problem:** `Error: Package 'package-name' not found` **Diagnose:** ```bash theme={null} # Search for the package prpm search package-name # Check exact name prpm info @username/typescript-rules ``` **Common causes:** 1. **Typo in package name:** ```bash theme={null} # Check the exact name prpm search typescript # Then use the exact package name from search results prpm install @username/typescript-rules ``` 2. **Private package without authentication:** ```bash theme={null} # Login first prpm login prpm install @username/private-package ``` 3. **Package doesn't exist:** Verify on [registry.prpm.dev](https://registry.prpm.dev) ### File Already Exists **Problem:** `Error: File already exists at destination` **Solutions:** 1. **Check what's already installed:** ```bash theme={null} prpm list --verbose ``` 2. **Uninstall conflicting package first:** ```bash theme={null} prpm uninstall conflicting-package prpm install @username/new-package ``` 3. **Force reinstall:** ```bash theme={null} prpm install @username/typescript-rules --force ``` 4. **Install with custom name:** ```bash theme={null} prpm install @username/typescript-rules --as different-name ``` ### Download/Network Errors **Problem:** Timeouts or connection errors during installation. **Solutions:** 1. **Check internet connection:** ```bash theme={null} ping registry.prpm.dev ``` 2. **Check registry URL:** ```bash theme={null} prpm config get registry # Should be: https://registry.prpm.dev ``` 3. **Try with custom timeout:** ```bash theme={null} # Set higher timeout (in seconds) export REQUEST_TIMEOUT=60 prpm install @username/typescript-rules ``` 4. **Check firewall/proxy settings:** ```bash theme={null} # If behind a proxy npm config set proxy http://proxy.company.com:8080 npm config set https-proxy http://proxy.company.com:8080 ``` 5. **Retry installation:** ```bash theme={null} prpm install @username/typescript-rules ``` ### Integrity Check Failed **Problem:** `Error: Package integrity check failed` **Solutions:** 1. **Clear cache and retry:** ```bash theme={null} rm -rf ~/.prpm/cache prpm install @username/typescript-rules ``` 2. **Force reinstall:** ```bash theme={null} prpm install @username/typescript-rules --force ``` 3. **Report issue:** This may indicate a corrupted package in the registry *** ## Authentication Issues ### Login Fails **Problem:** Unable to authenticate with the registry. **Solutions:** 1. **Clear existing auth and retry:** ```bash theme={null} prpm config delete token prpm login ``` 2. **Check registry URL:** ```bash theme={null} prpm config get registry # Should match your intended registry ``` 3. **Use token directly (if you have one):** ```bash theme={null} prpm login --token YOUR_AUTH_TOKEN ``` 4. **Check browser is opening:** * If browser doesn't open, copy URL from terminal * Complete authentication manually ### Permission Denied When Publishing **Problem:** `Error: Insufficient permissions to publish` **Diagnose:** ```bash theme={null} # Check if logged in prpm whoami # Verify package name doesn't conflict prpm info @username/typescript-rules ``` **Solutions:** 1. **Ensure you're logged in:** ```bash theme={null} prpm login ``` 2. **Use correct namespace:** ```bash theme={null} # Can only publish to your own namespace # In prpm.json: { "name": "@username/typescript-rules" } ``` 3. **Check package doesn't already exist:** ```bash theme={null} prpm search package-name # If exists, increment version or choose different name ``` *** ## Publishing Issues ### Validation Errors **Problem:** `Error: Package validation failed` **Solutions:** 1. **Validate your manifest:** ```bash theme={null} prpm schema --validate prpm.json ``` 2. **Check required fields:** ```json theme={null} { "name": "@username/typescript-rules", "version": "1.0.0", "description": "Package description", "format": "cursor", "subtype": "rule", "author": "Your Name", "files": [".cursorrules"] } ``` 3. **Ensure files exist:** ```bash theme={null} # Check that all files in "files" array exist ls -la .cursorrules ``` 4. **Validate version format:** * Must be valid semver: `1.0.0`, `2.1.3`, etc. * Cannot republish same version ### Package Already Exists **Problem:** `Error: Package version already exists` **Solutions:** 1. **Increment version:** ```json theme={null} { "version": "1.0.1" // Increment from 1.0.0 } ``` 2. **Check existing versions:** ```bash theme={null} prpm info @username/typescript-rules ``` 3. **Use semantic versioning:** * Patch: `1.0.1` (bug fixes) * Minor: `1.1.0` (new features) * Major: `2.0.0` (breaking changes) ### Files Not Included in Package **Problem:** Published package missing expected files. **Solutions:** 1. **Check files array in prpm.json:** ```json theme={null} { "files": [ ".cursorrules", "README.md", "examples/" ] } ``` 2. **Use dry-run to preview:** ```bash theme={null} prpm publish --dry-run # Shows what will be included ``` 3. **Verify file paths are correct:** ```bash theme={null} # List files that match patterns ls -la .cursorrules ls -la README.md ``` *** ## Lock File Issues ### Corrupted prpm.lock **Problem:** `Error: Invalid lock file format` **Solutions:** 1. **Validate JSON syntax:** ```bash theme={null} cat prpm.lock | jq . # Shows where JSON is invalid ``` 2. **Rebuild lock file:** ```bash theme={null} # Backup first cp prpm.lock prpm.lock.backup # Remove and regenerate rm prpm.lock prpm index ``` 3. **Manual fix (if you know what's wrong):** ```bash theme={null} vim prpm.lock # Fix JSON syntax errors ``` ### Lock File Out of Sync **Problem:** Lock file doesn't match installed files. **Solutions:** 1. **Rebuild from installed files:** ```bash theme={null} prpm index ``` 2. **Reinstall packages:** ```bash theme={null} # List packages first prpm list # Reinstall each prpm install @username/typescript-rules --force ``` *** ## Update/Upgrade Issues ### No Updates Available (But You Know There Should Be) **Problem:** `prpm outdated` shows no updates despite new versions existing. **Solutions:** 1. **Check registry directly:** ```bash theme={null} prpm info @username/typescript-rules # Shows latest version ``` 2. **Clear cache:** ```bash theme={null} rm -rf ~/.prpm/cache prpm outdated ``` 3. **Force update:** ```bash theme={null} prpm update package-name --force ``` ### Update Fails Partway Through **Problem:** Update starts but fails, leaving package in inconsistent state. **Solutions:** 1. **Uninstall and reinstall:** ```bash theme={null} prpm uninstall package-name prpm install @username/typescript-rules ``` 2. **Check file permissions:** ```bash theme={null} ls -la .cursor/rules/ # Ensure you have write permissions ``` 3. **Cleanup and retry:** ```bash theme={null} # Remove partial installation rm -f .cursor/rules/package-file.md prpm install @username/typescript-rules ``` *** ## Format-Specific Issues ### Cursor: Rules Not Being Applied **Problem:** Installed Cursor rules don't seem to affect the AI. **Solutions:** 1. **Check MDC header is present:** ```bash theme={null} head -5 .cursor/rules/your-rule.mdc # Should show frontmatter: # --- # title: Your Rule # tags: [] # --- ``` 2. **Restart Cursor:** * Close and reopen Cursor * Or reload window: Cmd/Ctrl + Shift + P → "Reload Window" 3. **Check file is in correct location:** ```bash theme={null} ls -la .cursor/rules/ # Files should be .mdc or .cursorrules ``` 4. **Verify file syntax:** ```bash theme={null} # Open in Cursor and check for errors cursor .cursor/rules/your-rule.mdc ``` ### Claude: Skills Not Loading **Problem:** Claude skills installed but not available. **Solutions:** 1. **Check directory structure:** ```bash theme={null} ls -la .claude/skills/ # Should have subdirectories with SKILL.md files # Example structure: # .claude/skills/ # └── my-skill/ # └── SKILL.md ``` 2. **Verify SKILL.md format:** ```markdown theme={null} # Skill Name ## Description What this skill does ## Instructions How to use it ``` 3. **Restart Claude application** *** ## Configuration Issues ### Config Not Persisting **Problem:** Configuration changes don't persist after restart. **Solutions:** 1. **Check config file location:** ```bash theme={null} ls -la ~/.prpmrc # Should exist and be writable ``` 2. **Check file permissions:** ```bash theme={null} chmod 600 ~/.prpmrc ``` 3. **Manually edit config:** ```bash theme={null} vim ~/.prpmrc # Format: # registry=https://registry.prpm.dev # token=your-token ``` ### Custom Registry Not Working **Problem:** Setting custom registry doesn't take effect. **Solutions:** 1. **Verify config:** ```bash theme={null} prpm config get registry ``` 2. **Set via environment variable:** ```bash theme={null} export PRPM_REGISTRY_URL=https://custom.registry.dev prpm search test ``` 3. **Set globally:** ```bash theme={null} prpm config set registry https://custom.registry.dev ``` *** ## Performance Issues ### Slow Package Installation **Problem:** Package installation takes longer than expected. **Diagnose:** ```bash theme={null} # Check network speed curl -o /dev/null https://registry.prpm.dev/test-file # Check disk space df -h # Check disk I/O iostat -x 1 ``` **Solutions:** 1. **Clear cache:** ```bash theme={null} rm -rf ~/.prpm/cache ``` 2. **Check DNS resolution:** ```bash theme={null} nslookup registry.prpm.dev # Should resolve quickly ``` 3. **Use wired connection if on WiFi** 4. **Close other applications using network/disk** ### High Memory Usage **Problem:** PRPM CLI using excessive memory. **Solutions:** 1. **Update to latest version:** ```bash theme={null} npm update -g prpm ``` 2. **Use smaller batch operations:** ```bash theme={null} # Instead of: prpm install pkg1 pkg2 pkg3 ... pkg50 # Do: prpm install pkg1 pkg2 pkg3 prpm install pkg4 pkg5 pkg6 ``` *** ## Debugging ### Enable Verbose Logging Get detailed output for debugging: ```bash theme={null} # Enable debug logs export DEBUG=prpm:* prpm install @username/typescript-rules # Or for specific command prpm install @username/typescript-rules --verbose ``` ### Check PRPM Version ```bash theme={null} prpm --version ``` ### View Full Error Stack ```bash theme={null} # Set environment variable export NODE_ENV=development prpm install @username/typescript-rules # Will show full error stack traces ``` ### Inspect Lock File ```bash theme={null} # Pretty print lock file cat prpm.lock | jq . # Check specific package cat prpm.lock | jq '.packages[] | select(.id=="package-name")' ``` ### Network Debugging ```bash theme={null} # Test registry connection curl -I https://registry.prpm.dev # Test package download curl -I https://registry.prpm.dev/packages/@username/typescript-rules ``` *** ## Getting Additional Help If you've tried these solutions and still have issues: 1. **Check GitHub Issues:** * [https://github.com/pr-pm/prpm/issues](https://github.com/pr-pm/prpm/issues) * Search for similar issues * Comment on existing issues or create new one 2. **Provide detailed information when reporting:** ```bash theme={null} # Include this information: prpm --version node --version npm --version uname -a # or `ver` on Windows # Include error message and full command # Include relevant config prpm config list ``` 3. **Join the community:** * GitHub Discussions *** ## Common Error Messages Explained ### `ENOENT: no such file or directory` **Meaning:** File or directory doesn't exist. **Solution:** Check that the path is correct and the file exists. ### `EACCES: permission denied` **Meaning:** Insufficient permissions to access file/directory. **Solution:** Check permissions with `ls -la`, use `sudo` if appropriate, or change ownership. ### `EISDIR: illegal operation on a directory` **Meaning:** Trying to perform file operation on a directory. **Solution:** Check that your target is a file, not a directory. ### `EEXIST: file already exists` **Meaning:** Trying to create something that already exists. **Solution:** Use `--force` flag or remove existing file first. ### `Invalid semver version` **Meaning:** Version number doesn't follow semantic versioning. **Solution:** Use format `X.Y.Z` (e.g., `1.0.0`, `2.1.3`). ### `Package not found in registry` **Meaning:** Package doesn't exist or you lack access. **Solution:** Check package name, ensure you're authenticated if private. ### `Authentication required` **Meaning:** Need to login to access resource. **Solution:** Run `prpm login`. ### `Rate limit exceeded` **Meaning:** Too many requests to registry. **Solution:** Wait a few minutes and retry. # Common Workflows Source: https://docs.prpm.dev/cli/workflows Step-by-step guides for common PRPM tasks ## Getting Started with PRPM ### First Time Setup 1. **Install the CLI:** ```bash theme={null} npm install -g prpm ``` 2. **Verify installation:** ```bash theme={null} prpm --version ``` 3. **Create an account and login:** ```bash theme={null} prpm login ``` 4. **Browse available packages:** ```bash theme={null} prpm trending ``` *** ## Discovering and Installing Packages ### Finding the Right Package **Search by keyword:** ```bash theme={null} prpm search typescript ``` **Browse trending packages:** ```bash theme={null} prpm trending --format cursor ``` **View package details:** ```bash theme={null} prpm info @username/typescript-rules ``` **Check collections:** ```bash theme={null} # List all collections prpm collections --list # View a specific collection prpm collections web-development ``` ### Installing Packages **Install a single package:** ```bash theme={null} prpm install @username/typescript-best-practices ``` **Install multiple packages at once:** ```bash theme={null} prpm install \ @username/react-rules \ @username/typescript-config \ @username/testing-guidelines ``` **Install an entire collection:** ```bash theme={null} prpm collections web-development --install ``` **Install and convert to a specific format:** ```bash theme={null} prpm install @username/typescript-rules --as cursor ``` ### Verifying Installation **List installed packages:** ```bash theme={null} prpm list ``` **List packages for a specific format:** ```bash theme={null} prpm list --format cursor ``` **Check package details:** ```bash theme={null} prpm list --verbose ``` *** ## Managing Existing Projects ### Indexing Local Prompt Files If you have existing prompt files in your project, register them with PRPM: ```bash theme={null} # Scan and register all prompt files prpm index # View registered packages prpm list ``` This will scan these directories: * `.cursor/rules/`, `.cursor/agents/`, `.cursor/commands/` * `.claude/agents/`, `.claude/skills/`, `.claude/commands/` * `.continue/rules/` * `.windsurf/rules/` * `.prompts/` * `.mcp/` ### Keeping Packages Up to Date **Check for outdated packages:** ```bash theme={null} prpm outdated ``` **Update a specific package:** ```bash theme={null} prpm update package-name ``` **Update all packages:** ```bash theme={null} prpm upgrade ``` **Preview updates without applying:** ```bash theme={null} prpm upgrade --dry-run ``` **Interactive updates (choose which to update):** ```bash theme={null} prpm upgrade --interactive ``` ### Cleaning Up Packages **Remove a package:** ```bash theme={null} prpm uninstall package-name ``` **Remove multiple packages:** ```bash theme={null} prpm uninstall package1 package2 package3 ``` **Remove without confirmation:** ```bash theme={null} prpm uninstall package-name --force ``` *** ## Creating and Publishing Packages ### Creating Your First Package 1. **Initialize a new package:** ```bash theme={null} mkdir @username/my-cursor-rules cd @username/my-cursor-rules prpm init ``` 2. **Follow the interactive prompts:** * Package name: `my-username/@username/my-cursor-rules` * Description: Describe what your package does * Format: `cursor` * Subtype: `rule` * Author: Your name * License: `MIT` (or your choice) * Tags: `typescript`, `react`, `best-practices` 3. **Edit the generated files:** ```bash theme={null} # Edit your rules file vim .cursorrules # Update the README vim README.md ``` 4. **Test locally:** ```bash theme={null} # Install in a test project cd ../test-project prpm install /path/to/@username/my-cursor-rules ``` ### Publishing Your Package 1. **Ensure you're logged in:** ```bash theme={null} prpm whoami # If not logged in: prpm login ``` 2. **Validate your package:** ```bash theme={null} prpm schema --validate prpm.json ``` 3. **Test publish (dry run):** ```bash theme={null} prpm publish --dry-run ``` 4. **Publish to registry:** ```bash theme={null} prpm publish ``` 5. **Verify publication:** ```bash theme={null} prpm info my-username/@username/my-cursor-rules ``` ### Updating Your Published Package 1. **Update version in `prpm.json`:** ```json theme={null} { "name": "@username/my-cursor-rules", "version": "1.1.0", ... } ``` 2. **Publish the update:** ```bash theme={null} prpm publish ``` 3. **Publish a beta version:** ```bash theme={null} # Update version to 2.0.0-beta.1 prpm publish --tag beta ``` *** ## Working Across Multiple Projects ### Setting Up a Standardized Environment Create a script to install your standard packages across projects: ```bash theme={null} #!/bin/bash # setup-prpm.sh echo "Installing standard PRPM packages..." prpm install \ @username/typescript-rules \ @username/react-best-practices \ @username/testing-guidelines \ @username/git-commit-standards echo "Setup complete!" ``` Make it executable and run: ```bash theme={null} chmod +x setup-prpm.sh ./setup-prpm.sh ``` ### Sharing Configurations Across Teams 1. **Create a collection for your team:** * Contact PRPM support or create via registry API * Add your team's standard packages 2. **Team members can install everything at once:** ```bash theme={null} prpm collections your-team-name --install ``` ### Cross-Project Packages PRPM currently installs packages into the current project directory. To use packages across projects: ```bash theme={null} # Create a shared setup script cat > ~/prpm-setup.sh << 'EOF' #!/bin/bash prpm install @username/typescript-rules prpm install @username/react-patterns EOF # Run in each project chmod +x ~/prpm-setup.sh cd /path/to/project && ~/prpm-setup.sh ``` *** ## Advanced Workflows ### Using PRPM in CI/CD **Install packages in CI:** ```yaml theme={null} # .github/workflows/ci.yml steps: - name: Install PRPM packages run: | npm install -g prpm prpm install @username/typescript-rules1 @username/typescript-rules2 env: PRPM_TOKEN: ${{ secrets.PRPM_TOKEN }} ``` **Verify packages are up to date:** ```yaml theme={null} steps: - name: Check for outdated packages run: | prpm outdated --json > outdated.json if [ $(jq length outdated.json) -gt 0 ]; then echo "Outdated packages found!" exit 1 fi ``` ### Scripting with PRPM **Check if a package is installed:** ```bash theme={null} #!/bin/bash if prpm list --json | jq -e '.[] | select(.id=="package-name")' > /dev/null; then echo "Package is installed" else echo "Package not found" prpm install @username/typescript-rules fi ``` **Batch operations:** ```bash theme={null} #!/bin/bash # Update all cursor packages prpm list --format cursor --json | \ jq -r '.[].id' | \ xargs prpm update ``` ### Custom Registry **Use a private registry:** ```bash theme={null} # Set custom registry prpm config set registry https://registry.example.com # Or use environment variable export PRPM_REGISTRY_URL=https://registry.example.com prpm search internal-packages ``` **Switch between registries:** ```bash theme={null} # Production registry alias prpm-prod='PRPM_REGISTRY_URL=https://registry.prpm.dev prpm' # Development registry alias prpm-dev='PRPM_REGISTRY_URL=https://dev.registry.prpm.dev prpm' # Use them prpm-prod search typescript prpm-dev publish ``` *** ## Troubleshooting Common Issues ### Package Not Found ```bash theme={null} # Ensure you're using the correct package name prpm search package-name # Check if you're authenticated (for private packages) prpm whoami # Try specifying a version prpm install @username/typescript-rules --version 1.0.0 ``` ### Installation Fails ```bash theme={null} # Check for conflicting files ls -la .cursor/rules/ # Force reinstall prpm uninstall package-name prpm install @username/typescript-rules --force # Check disk space and permissions df -h ls -la .cursor/ ``` ### Authentication Issues ```bash theme={null} # Re-authenticate prpm login # Check current auth status prpm whoami # Manually set token prpm config set token YOUR_TOKEN ``` ### Updates Not Working ```bash theme={null} # Check what's outdated prpm outdated # Try force update prpm update package-name --force # Or uninstall and reinstall prpm uninstall package-name prpm install @username/typescript-rules ``` ### Lock File Conflicts ```bash theme={null} # Rebuild lock file from installed packages prpm index # Or manually edit prpm.lock if needed vim prpm.lock ``` *** ## Best Practices ### For Package Users 1. **Always check package info before installing:** ```bash theme={null} prpm info @username/typescript-rules ``` 2. **Keep packages updated:** ```bash theme={null} # Set up a weekly reminder prpm outdated ``` 3. **Convert to your preferred format:** ```bash theme={null} prpm install package-name --as cursor # Convert to Cursor format prpm install package-name --as claude # Convert to Claude format ``` 4. **Document your dependencies:** ```markdown theme={null} # README.md ## PRPM Packages This project uses: - `@username/typescript-rules` - TypeScript coding standards - `@username/react-patterns` - React best practices ``` ### For Package Authors 1. **Follow semantic versioning:** * Patch: Bug fixes (1.0.1) * Minor: New features (1.1.0) * Major: Breaking changes (2.0.0) 2. **Write comprehensive READMEs:** * What the package does * Installation instructions * Usage examples * Configuration options 3. **Use descriptive tags:** ```json theme={null} { "tags": ["typescript", "react", "testing", "best-practices"] } ``` 4. **Test before publishing:** ```bash theme={null} prpm publish --dry-run ``` 5. **Keep packages focused:** * One clear purpose per package * Split large packages into smaller ones * Use collections to group related packages *** ## Getting Help * **Command help:** `prpm --help` * **GitHub Issues:** [https://github.com/pr-pm/prpm/issues](https://github.com/pr-pm/prpm/issues) # Collections Source: https://docs.prpm.dev/concepts/collections Bundle multiple packages together # Collections Collections are curated bundles of packages that work together for specific development workflows. ## What are Collections? Instead of installing packages one by one: ```bash theme={null} prpm install typescript-strict prpm install @username/react-best-practices prpm install tailwind-config prpm install testing-patterns ``` You can install a collection: ```bash theme={null} prpm install collections/my-react-setup ``` ## Creating Collections Collections are defined in your prpm.json using the `collections` array: ```json theme={null} { "name": "my-prompts-repo", "author": "Your Name", "license": "MIT", "collections": [ { "id": "react-complete", "name": "Complete React Setup", "description": "Full React development setup with TypeScript and testing", "version": "1.0.0", "category": "development", "tags": ["react", "typescript", "testing"], "packages": [ { "packageId": "typescript-strict", "version": "^1.0.0", "required": true, "reason": "Enforces strict type checking" }, { "packageId": "@username/react-best-practices", "version": "^2.0.0", "required": true }, { "packageId": "tailwind-config", "version": "^1.5.0", "required": false, "reason": "Optional Tailwind CSS setup" } ] } ] } ``` ## Version Ranges Specify how packages should be updated: * `^1.0.0` - Compatible with 1.x.x (recommended) * `~1.2.0` - Compatible with 1.2.x * `1.0.0` - Exact version only * `latest` - Always use latest version ## Required vs Optional Packages Mark packages as optional so users can skip them: ```json theme={null} { "packageId": "storybook-setup", "version": "^1.0.0", "required": false, "reason": "Optional Storybook configuration" } ``` Install without optional packages: ```bash theme={null} prpm install collections/react-complete --skip-optional ``` ## Publishing Collections Collections are published alongside packages: ```bash theme={null} prpm publish ``` Or publish only a specific collection: ```bash theme={null} prpm publish --collection react-complete ``` ## Use Cases ### Starter Kits Bundle everything needed for new projects: ```json theme={null} { "id": "nextjs-starter", "name": "Next.js Starter", "description": "Complete Next.js setup with TypeScript and Tailwind", "packages": [...] } ``` ### Team Standards Share team development standards: ```json theme={null} { "id": "acme-standards", "name": "ACME Corp Standards", "description": "Company development standards", "packages": [...] } ``` ### Technology Stacks Bundle complete technology stacks: ```json theme={null} { "id": "python-ml-stack", "name": "Python ML Stack", "description": "Machine learning development stack", "packages": [...] } ``` ## Next Steps Learn how to publish your collections Complete collection schema # Formats Source: https://docs.prpm.dev/concepts/formats Understanding PRPM format support # Formats PRPM supports multiple AI tool formats, allowing you to install packages for different IDEs and development environments. ## Supported Formats | Format | Tool | Description | | ----------- | ---------------------- | -------------------------------------------------------- | | `claude` | Claude Code | Agents and skills for Claude Code | | `cursor` | Cursor IDE | Rules, plugins, commands, and configurations for Cursor | | `continue` | Continue.dev | Prompts for Continue extension | | `windsurf` | Windsurf IDE | Rules for Windsurf | | `copilot` | GitHub Copilot | Instructions, chat modes, and skills for Copilot | | `kiro` | Kiro AI | Agents and steering files for Kiro | | `gemini` | Gemini CLI | Custom commands and extensions for Gemini CLI | | `opencode` | OpenCode AI | Agents, commands, and tools for OpenCode | | `ruler` | Ruler | Coding rules and agents for Ruler | | `droid` | Factory Droid | Skills, commands, and hooks for Factory Droid | | `trae` | Trae IDE | Rules for Trae IDE (ByteDance) | | `aider` | Aider | Conventions and rules for Aider AI coding assistant | | `zencoder` | Zencoder | Rules for Zencoder AI coding assistant | | `replit` | Replit Agent | Instructions for Replit Agent | | `agents.md` | Agents.md | Universal agent format (works with OpenAI, Gemini, etc.) | | `mcp` | Model Context Protocol | MCP server configurations | | `generic` | Multiple | Works across multiple tools | ### Format Aliases Some formats have aliases for compatibility: * `claude.md` → `claude` * `gemini.md` → installs `GEMINI.md` (Gemini markdown); `gemini` installs Gemini CLI commands into `.gemini/commands` ### Cursor Format Details The `cursor` format supports multiple subtypes: * **Rules** (`subtype: rule`): Project guidelines in `.cursor/rules/*.mdc` with MDC frontmatter (`description`, `globs`, `alwaysApply`) * **Slash Commands** (`subtype: slash-command`): Custom commands in `.cursor/commands/*.md` * **Hooks** (`subtype: hook`): Event-triggered scripts configured in `hooks.json` * **Plugins** (`subtype: plugin`): Bundles of rules, skills, agents, commands, hooks, and MCP servers defined by a `.cursor-plugin/plugin.json` manifest Plugins are the most comprehensive package type for Cursor, containing multiple components in a single distributable unit. The `plugin.json` manifest requires only a `name` field and optionally includes `description`, `version`, `author`, `keywords`, `logo`, and paths to component directories. ```json theme={null} { "name": "my-plugin", "description": "Development toolkit with linting and testing", "version": "1.0.0", "author": { "name": "Jane Doe" }, "mcpServers": { "playwright": { "command": "npx", "args": ["-y", "@playwright/mcp@latest"] } } } ``` Cursor plugins are available via the [Cursor Marketplace](https://cursor.com/marketplace). See the [official plugin docs](https://cursor.com/docs/plugins/building) for full details. ### Copilot Format Details The `copilot` format supports three subtypes: * **Rules** (`subtype: rule`): Path-specific instructions in `.github/instructions/*.instructions.md` * **Chat Modes** (`subtype: chatmode`): Custom chat modes in `.github/chatmodes/*.chatmode.md` * **Skills** (`subtype: skill`): Reusable task-specific capabilities in `.github/skills//SKILL.md` Skills are discovered by Copilot based on context and loaded when relevant. Each skill requires: * A `name` field (lowercase, hyphens for spaces, max 64 chars) * A `description` field (max 1024 chars) * Markdown body with detailed instructions Skills require VS Code Insiders with the `chat.useAgentSkills` setting enabled. ### Gemini Format Details The `gemini` format supports two subtypes: * **Slash Commands** (`subtype: slash-command`): Custom commands defined in `.toml` files, installed to `.gemini/commands/` * **Extensions** (`subtype: extension`): Full extensions with MCP servers and context files, installed to `.gemini/extensions//gemini-extension.json` Extensions support: * MCP (Model Context Protocol) server configurations * Custom context files * Tool exclusions * Experimental settings ### MCP Format Details The `mcp` format is for MCP (Model Context Protocol) server packages. Use `subtype: tool`. When installed, PRPM reads the `mcpServers` object from your package's JSON file and merges each server entry into the user's editor config. This works across 11 editors — Claude Code, Cursor, VS Code, Codex, Windsurf, Gemini, Kiro, OpenCode, Trae, Amp, and Zed. Your package file should be a JSON file with a `mcpServers` object: ```json mcp-server.json theme={null} { "name": "My MCP Server", "description": "What this server does", "version": "1.0.0", "mcpServers": { "my-server": { "command": "npx", "args": ["-y", "@my-org/my-mcp-server"] } } } ``` See the [MCP Servers guide](/guides/mcp-servers) for full publishing and installation details. ## Installing for Specific Formats Auto-detect format from your project: ```bash theme={null} prpm install @prpm/@username/typescript-best-practices ``` Specify a format explicitly: ```bash theme={null} prpm install @prpm/@username/typescript-best-practices --as cursor ``` ## Format Detection PRPM auto-detects the format based on your project structure: * `.claude/` directory → `claude` * `.cursor/` directory → `cursor` * `.continue/` directory → `continue` * `.windsurf/` directory → `windsurf` * `.kiro/` directory → `kiro` * `.agents/` directory → `agents.md` * `.ruler/` directory → `ruler` * `.opencode/` directory → `opencode` * `.factory/` directory → `droid` * `.trae/` directory → `trae` * `.aider/` or `CONVENTIONS.md` file → `aider` * `.zencoder/` directory → `zencoder` * `.replit/` directory or `.replit` file → `replit` * `.mcp/` directory → `mcp` ## File Installation Paths Each format has a standard installation path: | Format | Directory | Example | | ----------- | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | | `claude` | `.claude/agents/`, `.claude/skills/`, or `.claude/commands/` | `.claude/skills/my-skill/SKILL.md` | | `cursor` | `.cursor/rules/`, `.cursor/commands/`, or `.cursor-plugin/` | `.cursor/rules/typescript.mdc` or `.cursor-plugin/plugin.json` | | `continue` | `.continue/prompts/` | `.continue/prompts/refactor.md` | | `windsurf` | `.windsurf/rules/` | `.windsurf/rules/python.md` | | `copilot` | `.github/instructions/`, `.github/chatmodes/`, or `.github/skills/` | `.github/skills/my-skill/SKILL.md` | | `kiro` | `.kiro/agents/` or `.kiro/steering/` | `.kiro/agents/code-reviewer.json` | | `gemini` | `.gemini/commands/` or `.gemini/extensions/` | `.gemini/commands/refactor.toml` or `.gemini/extensions/my-ext/gemini-extension.json` | | `opencode` | `.opencode/agent/` or `.opencode/command/` | `.opencode/agent/code-reviewer.md` | | `ruler` | `.ruler/rules/` or `.ruler/agents/` | `.ruler/rules/typescript.md` | | `droid` | `.factory/skills/` or `.factory/commands/` | `.factory/skills/code-review/SKILL.md` | | `trae` | `.trae/rules/` | `.trae/rules/typescript.md` | | `aider` | `CONVENTIONS.md` or `.aider/` | `CONVENTIONS.md` | | `zencoder` | `.zencoder/rules/` | `.zencoder/rules/typescript.md` | | `replit` | `.replit/` or `replit_agent_instructions.md` | `replit_agent_instructions.md` | | `agents.md` | `.agents/` | `.agents/code-reviewer.md` | | `mcp` | `.mcp/servers/` | `.mcp/servers/filesystem.json` | ## Multi-Format Packages Some packages support multiple formats. PRPM will install the appropriate version based on your environment: ```json theme={null} { "name": "@username/typescript-rules", "version": "1.0.0", "files": [ { "path": ".cursor/rules/typescript.mdc", "format": "cursor" }, { "path": ".windsurf/rules/typescript.md", "format": "windsurf" } ] } ``` ## Next Steps Learn more about packages Publish multi-format packages # Packages Source: https://docs.prpm.dev/concepts/packages Understanding PRPM packages # Packages Packages are the core unit of distribution in PRPM. A package contains prompts, rules, skills, agents, or other AI tool configurations. ## Package Types PRPM supports different package subtypes: | Subtype | Description | Example | | --------------- | ----------------------------------------- | -------------------------------- | | `agent` | Autonomous multi-step agents | Complex workflow automation | | `skill` | Specialized knowledge/capabilities | Domain expertise, best practices | | `rule` | IDE rules and guidelines | Coding standards, conventions | | `slash-command` | Executable commands | Quick actions, shortcuts | | `prompt` | Reusable prompt templates | Common tasks, queries | | `workflow` | Multi-step automation workflows | CI/CD pipelines, build processes | | `tool` | Executable utilities and scripts | MCP tools, helper scripts | | `template` | File and project templates | Boilerplates, scaffolds | | `collection` | Curated package collections | Stack bundles, thematic sets | | `chatmode` | Chat interface modes | Specialized AI modes | | `hook` | Event-triggered executable hooks | Pre/post actions, validations | | `plugin` | Bundled packages with multiple components | Cursor plugins, Claude plugins | ## Package Formats Packages target different AI tools: * **claude**: Claude Code agents and skills * **cursor**: Cursor IDE rules, commands, hooks, and plugins * **continue**: Continue.dev extension * **windsurf**: Windsurf IDE * **copilot**: GitHub Copilot instructions * **kiro**: Kiro AI agents and steering files * **gemini**: Gemini CLI custom commands * **opencode**: OpenCode AI agents and commands * **ruler**: Ruler coding rules and agents * **droid**: Factory Droid skills and hooks * **agents.md**: Universal agent format (OpenAI, Gemini, etc.) * **mcp**: Model Context Protocol servers * **generic**: Works across multiple tools See the [Formats documentation](/concepts/formats) for complete details on each format. ## Package Structure A basic package in prpm.json: ```json theme={null} { "name": "@username/typescript-best-practices", "version": "1.0.0", "description": "TypeScript coding standards and best practices", "author": "Your Name", "license": "MIT", "format": "cursor", "subtype": "rule", "tags": ["typescript", "best-practices"], "files": [".cursor/rules/typescript.mdc"] } ``` ## Installing Packages Install a package: ```bash theme={null} prpm install @prpm/@username/typescript-best-practices ``` Install for a specific format: ```bash theme={null} prpm install @prpm/@username/typescript-best-practices --as cursor ``` ## Publishing Packages See the [Publishing Guide](/publishing/getting-started) for details on publishing your packages. # Schemas & Validation Source: https://docs.prpm.dev/concepts/schemas JSON Schema validation for all supported AI prompt formats ## 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 ```bash theme={null} prpm publish # ❌ Validation error: Missing required field 'description' # ❌ Field 'temperature' must be between 0.0 and 1.0 ``` ### 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 ```bash theme={null} prpm convert agent.md --from claude --to opencode # ✅ Source validation passed # ⚠️ Warning: 'permissionMode' field not supported in OpenCode # ✅ Output validation passed ``` ### 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: | 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` | Instructions, chat modes, and skills | | **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 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:** ```bash theme={null} curl https://registry.prpm.dev/api/v1/schemas ``` **Get a base format schema:** ```bash theme={null} curl https://registry.prpm.dev/api/v1/schemas/cursor.json ``` **Get a subtype schema:** ```bash theme={null} curl https://registry.prpm.dev/api/v1/schemas/claude/agent.json ``` **Response:** ```json theme={null} { "$schema": "http://json-schema.org/draft-07/schema#", "$id": "https://registry.prpm.dev/api/v1/schemas/claude/agent.json", "title": "Claude Code Agent Format", "description": "JSON Schema for Claude Code Agents", ... } ``` ### Other Access Methods **1. View in Repository** ```bash theme={null} https://github.com/pr-pm/prpm/tree/main/packages/converters/schemas ``` **2. Local Development** ```bash theme={null} # Source schemas packages/converters/schemas/*.schema.json # Bundled with CLI node_modules/prpm/dist/schemas/*.schema.json ``` **3. Direct URLs** Schemas are available at: **Base format schemas:** ``` https://registry.prpm.dev/api/v1/schemas/{format}.json ``` **Subtype schemas:** ``` https://registry.prpm.dev/api/v1/schemas/{format}/{subtype}.json ``` 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** ```typescript theme={null} import { validateMarkdown, validateFormat } from '@pr-pm/converters'; // Validate markdown with frontmatter const result = validateMarkdown('claude', markdownContent, 'agent'); if (!result.valid) { console.error('Validation errors:', result.errors); result.errors.forEach(error => { console.log(`${error.path}: ${error.message}`); }); } // Validate structured data const packageData = { frontmatter: { name: 'my-agent', description: 'AI agent that reviews code', mode: 'subagent', tools: 'Read, Grep, Bash' }, content: '# Code Reviewer\n\nYou are an expert code reviewer.' }; const result2 = validateFormat('opencode', packageData, 'agent'); ``` ## Common Validation Errors ### Missing Required Fields ```yaml theme={null} --- # ❌ Missing 'description' field name: my-agent --- ``` **Fix:** ```yaml theme={null} --- name: my-agent description: Brief explanation of what this agent does # ✅ Added --- ``` ### Invalid Field Types ```yaml theme={null} --- description: Test agent temperature: "0.5" # ❌ String instead of number --- ``` **Fix:** ```yaml theme={null} --- description: Test agent temperature: 0.5 # ✅ Number type --- ``` ### Invalid Enum Values ```yaml theme={null} --- description: Test agent mode: "standalone" # ❌ Invalid mode --- ``` **Fix:** ```yaml theme={null} --- description: Test agent mode: "subagent" # ✅ Valid: "primary", "subagent", or "all" --- ``` ### Out of Range Values ```yaml theme={null} --- description: Test agent temperature: 1.5 # ❌ Must be 0.0-1.0 --- ``` **Fix:** ```yaml theme={null} --- description: Test agent temperature: 0.7 # ✅ Within valid range --- ``` ## Validation in CI/CD ### GitHub Actions Example ```yaml theme={null} name: Validate PRPM Package on: pull_request: paths: - '.claude/**' - '.cursor/**' - 'prpm.json' jobs: validate: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Setup Node.js uses: actions/setup-node@v3 with: node-version: '18' - name: Install PRPM run: npm install -g prpm - name: Validate Package run: prpm publish --dry-run - name: Report Validation Results if: failure() run: echo "❌ Package validation failed. Check the logs above for details." ``` ## 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](/concepts/packages#extending-prpm) for complete instructions. ## Best Practices Run `prpm publish --dry-run` to catch errors before publishing Enable strict validation in your IDE to catch issues during development Reference example packages in each schema for correct structure Review warnings when converting between formats for potential data loss ## Further Reading Detailed specs for each AI IDE format Step-by-step publishing workflow Convert packages between different AI IDEs Understanding PRPM package anatomy # Claude Code Hooks Source: https://docs.prpm.dev/guides/claude-hooks Learn how to install and use Claude Code hooks in your projects # Claude Code Hooks Claude Code hooks allow you to execute custom TypeScript logic in response to lifecycle events like session start, tool usage, and user prompts. Hooks are powerful automation tools that can enforce workflows, add context, or modify behavior. **New to hooks?** Install the hook writer skill to help you create hooks: ```bash theme={null} prpm install @prpm/typescript-hook-writer-skill ``` This skill teaches AI how to write TypeScript hooks with proper structure, best practices, and error handling. ## What are Hooks? Hooks are TypeScript functions that run automatically when specific events occur in Claude Code: * **SessionStart**: Run code when a new conversation begins * **UserPromptSubmit**: Intercept and modify user prompts * **ToolUse**: Monitor or block tool usage * **Custom Events**: Create your own hook types ## Installation ### From PRPM Registry The easiest way to install hooks is from the PRPM registry: ```bash theme={null} # Install a specific hook package prpm install @prpm/my-hook # Install multiple hooks at once prpm install @prpm/hook-one @prpm/hook-two # Install a collection of related hooks prpm install @prpm/workspace-hooks-collection ``` ### Manual Installation You can also create hooks manually: 1. Create a TypeScript file in `.claude/hooks/` 2. Add a `hook.json` manifest file 3. Register the hook in `prpm.json` Example structure: ``` .claude/hooks/my-hook/ ├── hook.ts # TypeScript implementation ├── hook.json # Hook metadata └── dist/ # Compiled JavaScript (generated) ``` ## Hook Structure ### hook.json Every hook needs a `hook.json` manifest: ```json theme={null} { "name": "my-hook", "version": "1.0.0", "description": "My custom hook", "type": "SessionStart", "enabled": true, "config": { "timeout": 5000 } } ``` **Fields:** | Field | Type | Required | Description | | ------------- | ------- | -------- | --------------------------- | | `name` | string | Yes | Hook name (kebab-case) | | `version` | string | Yes | Semver version | | `description` | string | Yes | What the hook does | | `type` | string | Yes | Hook event type | | `enabled` | boolean | Yes | Whether hook is active | | `config` | object | No | Hook-specific configuration | ### hook.ts Your TypeScript implementation: ```typescript theme={null} import { SessionStartHook } from '@claude/hooks'; export default async function myHook(context: SessionStartHook['context']): Promise { // Your hook logic here return { additionalContext: 'Extra context for Claude', systemReminders: ['Important reminder for this session'] }; } ``` ## Hook Types ### SessionStart Runs when a new Claude Code session begins. Perfect for adding project-specific context or reminders. **Use Cases:** * Load project configuration * Add coding standards reminders * Check git status * Load environment-specific context **Example:** ```typescript theme={null} import { SessionStartHook } from '@claude/hooks'; export default async function sessionStart( context: SessionStartHook['context'] ): Promise { const projectInfo = ` Project: ${context.workingDirectory} Git Branch: ${context.gitBranch || 'none'} `; return { additionalContext: projectInfo, systemReminders: [ 'Follow TypeScript strict mode', 'Write tests for all new features' ] }; } ``` ### UserPromptSubmit Intercepts user prompts before they reach Claude. Can modify, block, or add context to prompts. **Use Cases:** * Add context automatically * Enforce prompt patterns * Block certain requests * Log user interactions **Example:** ```typescript theme={null} import { UserPromptSubmitHook } from '@claude/hooks'; export default async function promptSubmit( context: UserPromptSubmitHook['context'] ): Promise { const { userPrompt } = context; // Add context to bug-related prompts if (userPrompt.includes('bug') || userPrompt.includes('fix')) { return { additionalContext: 'Check the error logs in /logs for details', modifiedPrompt: `${userPrompt}\n\nReminder: Follow systematic debugging workflow` }; } return { status: 'continue' }; } ``` ### ToolUse Monitors tool usage and can block dangerous operations. **Use Cases:** * Prevent accidental deletions * Log tool usage * Require confirmation for dangerous operations * Enforce tool usage patterns **Example:** ```typescript theme={null} import { ToolUseHook } from '@claude/hooks'; export default async function toolUse( context: ToolUseHook['context'] ): Promise { const { toolName, toolInput } = context; // Block deletion of important files if (toolName === 'Edit' && toolInput.file_path?.includes('/config/')) { return { status: 'blocked', message: 'Editing config files requires manual review' }; } return { status: 'continue' }; } ``` ## Registering Hooks After creating a hook, register it in your `prpm.json`: ```json theme={null} { "name": "my-project", "packages": [ { "name": "my-hook", "version": "1.0.0", "description": "My custom hook", "format": "claude", "subtype": "hook", "files": [ ".claude/hooks/my-hook/hook.ts", ".claude/hooks/my-hook/hook.json", ".claude/hooks/my-hook/dist/hook.js" ] } ] } ``` ## Building Hooks Hooks must be compiled from TypeScript to JavaScript before Claude Code can use them. ### Automatic Building Use the `scripts` field in your root `prpm.json` to automatically build hooks before publishing: ```json theme={null} { "name": "my-project", "scripts": { "prepublishOnly": "cd .claude/hooks/my-hook && npm run build" }, "packages": [...] } ``` When you run `prpm publish`, the `prepublishOnly` script runs automatically, ensuring hooks are always built before publishing. ### Manual Building ```bash theme={null} cd .claude/hooks/my-hook npm run build # or: esbuild hook.ts --outfile=dist/hook.js --bundle --platform=node ``` ## Best Practices ### 1. Use prepublishOnly Scripts Always use `prepublishOnly` to build hooks automatically: ```json theme={null} { "scripts": { "prepublishOnly": "cd packages/hooks && npm run build" } } ``` This prevents publishing stale JavaScript and keeps your dist files in sync. ### 2. Keep Hooks Fast Hooks run on every event - keep them performant: ```typescript theme={null} // ✅ Good: Fast and simple export default async function myHook(context) { return { additionalContext: 'Quick context' }; } // ❌ Bad: Slow and blocking export default async function myHook(context) { await fetchFromAPI(); // Blocks session start! await processLargeFile(); // Too slow! return { additionalContext: 'Slow context' }; } ``` ### 3. Handle Errors Gracefully Don't let hook errors crash sessions: ```typescript theme={null} export default async function myHook(context) { try { // Your hook logic return { status: 'continue' }; } catch (error) { console.error('Hook error:', error); // Continue anyway - don't block the session return { status: 'continue' }; } } ``` ### 4. Use TypeScript Strictly Enable strict mode for type safety: ```typescript theme={null} import { SessionStartHook } from '@claude/hooks'; // Fully typed hook export default async function myHook( context: SessionStartHook['context'] ): Promise { // TypeScript catches errors before runtime return { additionalContext: context.workingDirectory // Type-safe! }; } ``` ### 5. Document Your Hooks Add comments explaining what your hooks do: ```typescript theme={null} /** * SessionStart hook that loads project-specific coding standards. * * Reads .standards.json and adds rules to Claude's context. * Falls back to defaults if file doesn't exist. */ export default async function loadStandards(context) { // Implementation } ``` ## Advanced Configuration ### Conditional Hooks Enable hooks only in certain conditions: ```json theme={null} { "name": "production-hook", "type": "SessionStart", "enabled": true, "config": { "enabledEnvironments": ["production"], "enabledBranches": ["main", "release/*"] } } ``` ### Hook Priorities Control hook execution order with priorities: ```json theme={null} { "name": "early-hook", "type": "SessionStart", "priority": 100 } ``` Higher priority = runs first. ### Shared Configuration Use `config` to share settings between hook code and Claude: ```json theme={null} { "name": "my-hook", "config": { "apiEndpoint": "https://api.example.com", "maxRetries": 3 } } ``` Access in your hook: ```typescript theme={null} export default async function myHook(context) { const { apiEndpoint, maxRetries } = context.hookConfig; // Use config values } ``` ## Troubleshooting ### Hook Not Running **Check:** 1. Is `enabled: true` in hook.json? 2. Is the hook registered in prpm.json? 3. Is dist/hook.js compiled and up to date? 4. Does Claude Code have permission to read the file? ### Build Errors **Common issues:** * Missing dependencies: Run `npm install` in the hook directory * TypeScript errors: Check your type definitions * Import errors: Verify @claude/hooks is installed ### Performance Issues **Solutions:** * Move slow operations outside hooks * Cache expensive computations * Use async operations carefully * Set timeout in hook.json config ## Examples ### Workspace Standards Hook ```typescript theme={null} import { SessionStartHook } from '@claude/hooks'; import { readFile } from 'fs/promises'; export default async function workspaceStandards( context: SessionStartHook['context'] ): Promise { try { const standards = await readFile('.standards.json', 'utf-8'); const parsed = JSON.parse(standards); return { systemReminders: parsed.reminders || [], additionalContext: `Workspace standards loaded: ${parsed.name}` }; } catch { return { systemReminders: ['Follow project best practices'] }; } } ``` ### Git Branch Reminder ```typescript theme={null} import { SessionStartHook } from '@claude/hooks'; export default async function gitBranchReminder( context: SessionStartHook['context'] ): Promise { const { gitBranch } = context; if (gitBranch === 'main' || gitBranch === 'master') { return { systemReminders: [ '⚠️ You are on the main branch!', 'Consider creating a feature branch for changes' ] }; } return { status: 'continue' }; } ``` ## Next Steps Share your hooks with others Install the hook writer skill to help create hooks ```bash theme={null} prpm install @prpm/typescript-hook-writer-skill ``` # Format Conversion Source: https://docs.prpm.dev/guides/format-conversion How PRPM converts packages between different AI coding tool formats ## Overview PRPM supports **automatic format conversion** - you can install a package designed for one AI tool (like Cursor) and use it in another (like Claude). The registry handles conversion server-side, ensuring packages work across different editors. ## Supported Formats PRPM supports conversion between these AI coding tool formats: | Format | Description | Learn More | | ------------- | -------------------------------------------------- | ---------------------------------------------------------------- | | **Cursor** | Rules in `.cursor/rules/` with MDC format | [Cursor Deep Dive](https://prpm.dev/blog/cursor-deep-dive) | | **Claude** | Skills, agents, and commands in `.claude/` | [Claude Deep Dive](https://prpm.dev/blog/claude-deep-dive) | | **Continue** | Prompts in `.continue/` config | [Continue Deep Dive](https://prpm.dev/blog/continue-deep-dive) | | **Windsurf** | Rules in `.windsurf/` directory | [Windsurf Deep Dive](https://prpm.dev/blog/windsurf-deep-dive) | | **Copilot** | Instructions in `.github/.copilot-instructions.md` | [Copilot Deep Dive](https://prpm.dev/blog/copilot-deep-dive) | | **Kiro** | Steering files in `.kiro/` | [Kiro Deep Dive](https://prpm.dev/blog/kiro-deep-dive) | | **agents.md** | OpenAI's open standard for agents | [agents.md Deep Dive](https://prpm.dev/blog/agents-md-deep-dive) | ## How Conversion Works ### Installing with Format Conversion Use the `--as` flag to convert a package to your preferred format: ```bash theme={null} # Install a Cursor rule as a Claude skill prpm install @username/typescript-rules --as claude # Install a Claude skill as a Cursor rule prpm install @username/react-patterns --as cursor # Install as Continue prompt prpm install @username/testing-guide --as continue ``` ### Server-Side Conversion When you request a different format: 1. **Package Request**: CLI requests the package in your desired format 2. **Format Detection**: Registry checks if package exists in target format 3. **Automatic Conversion**: If not, registry converts on-the-fly using format converters 4. **Quality Check**: Converted output is validated for correctness 5. **Delivery**: Converted package is returned to CLI 6. **Installation**: CLI installs in the appropriate directory for your tool ### Conversion Types #### 1. Rule-to-Rule Conversion Converting between rule-based formats (Cursor ↔ Windsurf ↔ Kiro): ```bash theme={null} # Cursor rule → Windsurf rule prpm install @username/typescript-rules --as windsurf ``` **What's converted:** * ✅ Content and guidelines * ✅ Code examples * ✅ Frontmatter metadata * ⚠️ Format-specific features may be adapted #### 2. Rule-to-Skill Conversion Converting rules to Claude skills: ```bash theme={null} # Cursor rule → Claude skill prpm install @username/api-design --as claude ``` **What's converted:** * ✅ Content becomes skill documentation * ✅ Examples mapped to skill patterns * ✅ Frontmatter adapted to skill structure * ✅ "When to Use" section generated #### 3. Skill-to-Rule Conversion Converting Claude skills to rules: ```bash theme={null} # Claude skill → Cursor rule prpm install @username/testing-patterns --as cursor ``` **What's converted:** * ✅ Skill content becomes rule guidelines * ✅ Patterns become rule examples * ✅ "When to Use" becomes rule description * ✅ MDC frontmatter generated #### 4. Multi-File to Single-File Conversion Some formats (Claude skills) support multiple files, others (Cursor rules) are single-file: ```bash theme={null} # Multi-file Claude skill → Single Cursor rule prpm install @username/complex-skill --as cursor ``` **What happens:** * ✅ Multiple files consolidated into one * ✅ Cross-references preserved as sections * ✅ Examples merged logically * ⚠️ Some structure flattened ## Format Subtypes Different formats support different subtypes: ### Claude Subtypes * **skill** - Reference documentation (`.claude/skills/`) * **agent** - Task-specific automation (`.claude/agents/`) * **slash-command** - Quick actions (`.claude/commands/`) ### Cursor Subtypes * **rule** - Project guidelines (`.cursor/rules/`) * **slash-command** - Custom commands (`.cursor/commands/`) * **hook** - Event-triggered scripts (`hooks.json`) * **plugin** - Bundles of rules, skills, agents, commands, hooks, and MCP servers (`.cursor-plugin/plugin.json`) ### Continue Subtypes * **prompt** - Custom prompts (`.continue/config.json`) When converting, PRPM intelligently maps subtypes: ```bash theme={null} # Claude skill → Cursor rule prpm install @username/postgres-expert --as cursor # Result: Skill content converted to rule format # Claude slash-command → Continue prompt prpm install @username/quick-test --as continue # Result: Command converted to Continue slash command ``` ## Conversion Best Practices ### 1. Choose the Right Source Format For best conversion results, install from the format closest to your target: **Good conversions** (high fidelity): * ✅ Cursor ↔ Windsurf ↔ Kiro (all rule-based) * ✅ Claude skill → Cursor rule (skill docs map well to rules) * ✅ Cursor rule → Claude skill (rules expand nicely to skills) **Okay conversions** (some adaptation): * ⚠️ Claude agent → Cursor rule (task automation flattened to guidelines) * ⚠️ Claude slash-command → Cursor rule (quick actions become examples) **Limited conversions** (lossy): * ⚠️ agents.md → Other formats (complex agent workflows simplified) ### 2. Specify Subtype When Needed For formats with multiple subtypes, specify the subtype: ```bash theme={null} # Convert to Claude, specify it should be a skill prpm install @username/package --as claude --subtype skill # Convert to Claude agent instead prpm install @username/package --as claude --subtype agent ``` ### 3. Review Converted Content After installation, review the converted file to ensure quality: ```bash theme={null} # Install with conversion prpm install @username/package --as cursor # Check the result cat .cursor/rules/package.mdc ``` If conversion quality is poor, consider: * Installing from a different source format * Manually editing the converted file * Requesting the author publish in your target format ### 4. Publish in Multiple Formats If you're a package author, publish native versions for maximum quality: ```json theme={null} { "name": "my-packages", "packages": [ { "name": "typescript-rules-cursor", "format": "cursor", "files": [".cursor/rules/typescript.mdc"] }, { "name": "typescript-rules-claude", "format": "claude", "files": [".claude/skills/typescript/SKILL.md"] } ] } ``` Users get native versions instead of conversions when available. ## Conversion Limitations ### What's Preserved * ✅ Core content and guidelines * ✅ Code examples * ✅ Documentation structure * ✅ Metadata (author, description, tags) ### What May Be Lost * ❌ Format-specific features * ❌ Complex cross-file references * ❌ Interactive elements * ❌ Tool-specific configuration ### Format-Specific Features Some features don't translate across formats: **Cursor-specific:** * MDC headers with `ruleType` and `alwaysApply` * Cursor-specific markdown extensions * Plugin manifest fields (`logo`, component paths, MCP servers) **Claude-specific:** * Multi-file skill structure * Agent tool specifications * Slash command arguments/options **Continue-specific:** * Slash command JSON configuration * Context provider settings When these features are encountered, PRPM: 1. Preserves the content in the converted format 2. Adapts the feature where possible 3. Includes a comment noting the original feature ## Technical Details ### Conversion Pipeline 1. **Parse Source**: Extract content, metadata, and structure 2. **Normalize**: Convert to intermediate representation 3. **Map Features**: Translate format-specific features 4. **Generate Target**: Create output in target format 5. **Validate**: Ensure output meets format requirements 6. **Return**: Deliver converted package to CLI ### Caching Converted packages are cached to improve performance: * First conversion: Takes \~100-500ms * Subsequent requests: Retrieved from cache instantly * Cache invalidation: When package is updated ## Troubleshooting ### Conversion Failed If conversion fails: ```bash theme={null} prpm install @username/package --as cursor # Error: Conversion failed: Unsupported format ``` **Solutions:** 1. Check if the source format is supported 2. Try a different target format 3. Install without `--as` flag (original format) 4. Report the issue on GitHub ### Poor Conversion Quality If converted content is low quality: 1. **Check source quality**: Some packages convert better than others 2. **Try native format**: Install without `--as` flag 3. **Manual editing**: Edit the converted file after installation 4. **Request native version**: Ask author to publish in your format ### Missing Features If features are missing after conversion: * Expected: Format-specific features don't always translate * Workaround: Manually add missing features to converted file * Best practice: Use native format when possible ## Examples ### Example 1: Cross-Format Team Your team uses different editors: ```bash theme={null} # Developer 1 (Cursor user) prpm install @company/coding-standards --as cursor # Developer 2 (Claude user) prpm install @company/coding-standards --as claude # Developer 3 (Continue user) prpm install @company/coding-standards --as continue ``` Everyone gets the same guidelines in their preferred format. ### Example 2: Trying Different Tools Testing different AI coding tools: ```bash theme={null} # Try package in Cursor prpm install @username/react-patterns --as cursor # Switch to Claude, reinstall in Claude format prpm install @username/react-patterns --as claude # Compare the results ``` ### Example 3: Format-Agnostic Publishing As a package author, let users choose their format: ```json theme={null} { "name": "python-best-practices", "description": "Python coding standards and patterns", "format": "cursor", "files": [".cursor/rules/python.mdc"] } ``` Publish in one format, PRPM handles conversions: * Cursor users get native `.mdc` file * Claude users get auto-converted skill * Continue users get auto-converted prompt ## Related Topics * [Package Formats](/concepts/formats) * [Publishing Guide](/publishing/getting-started) * [CLI Commands](/cli/commands) ## Deep Dives by Format Want to understand how each format works? Read our technical deep dives: * **[Cursor Rules: A Technical Deep Dive](https://prpm.dev/blog/cursor-deep-dive)** - MDC format, frontmatter, and best practices * **[Claude Desktop & Claude Code: A Technical Deep Dive](https://prpm.dev/blog/claude-deep-dive)** - Skills, agents, slash commands, and CSO * **[GitHub Copilot Instructions: A Deep Dive](https://prpm.dev/blog/copilot-deep-dive)** - `.copilot-instructions.md` format * **[Continue Dev Prompts: A Technical Deep Dive](https://prpm.dev/blog/continue-deep-dive)** - `.continue/` config structure * **[Windsurf Rules: A Technical Deep Dive](https://prpm.dev/blog/windsurf-deep-dive)** - Windsurf's rule system * **[Kiro Steering Files: A Technical Deep Dive](https://prpm.dev/blog/kiro-deep-dive)** - Kiro's steering file format * **[agents.md: A Deep Dive into OpenAI's Open Standard](https://prpm.dev/blog/agents-md-deep-dive)** - The agents.md specification # MCP Servers Source: https://docs.prpm.dev/guides/mcp-servers Publishing and installing MCP server packages with PRPM PRPM has first-class support for publishing and installing MCP server packages. When you run `prpm install`, PRPM automatically merges server configurations into the right config file for your editor — no manual JSON editing required. ## What are MCP Servers? **MCP (Model Context Protocol)** servers provide specialized capabilities to Claude Code and other AI clients, like: * File system operations * Database queries * Web search * Cloud resource management (Azure, AWS, GCP) * Custom tools and APIs * Third-party integrations (Slack, GitHub, Notion, etc.) Think of MCP servers as tools that extend what AI assistants can do. ## Why Publish MCP Servers to PRPM? PRPM provides dedicated installation logic that handles the complexity of MCP server configuration across editors: * **Multi-editor support** — A single `prpm install` automatically configures the server for Claude Code, Cursor, VS Code, Windsurf, Codex, Gemini, Kiro, Trae, Amp, Zed, and OpenCode * **Local and global installs** — Install to a project (`.mcp.json`) or globally (`~/.claude/settings.json`) with the `--global` flag * **Config merging** — PRPM merges server entries into existing config files without overwriting your other servers * **Lockfile tracking** — Installations are tracked in `prpm.lock` for clean uninstalls that don't remove your manual configurations * **One command** — No need to manually edit JSON config files for each editor ### Editor Config Locations When you run `prpm install`, MCP server configs are written to the correct location automatically: | Editor | Local Config | Global Config | | ----------- | ------------------------- | ------------------------------------- | | Claude Code | `.mcp.json` | `~/.claude/settings.json` | | Cursor | `.cursor/mcp.json` | `~/.cursor/mcp.json` | | VS Code | `.vscode/mcp.json` | Platform-specific | | Codex | `.codex/config.toml` | `~/.codex/config.toml` | | Windsurf | — | `~/.codeium/windsurf/mcp_config.json` | | Gemini | `.gemini/settings.json` | `~/.gemini/settings.json` | | Kiro | `.kiro/settings/mcp.json` | `~/.kiro/settings/mcp.json` | | OpenCode | `opencode.json` | `~/.config/opencode/opencode.json` | | Trae | `.trae/mcp.json` | — | | Amp | `.amp/settings.json` | `~/.amp/settings.json` | | Zed | — | `~/.config/zed/settings.json` | ## Publishing an MCP Server Package ### 1. Create the MCP Server Config File Create a JSON file that defines your MCP server(s). This follows the standard MCP server configuration format: ```json mcp-server.json theme={null} { "name": "My MCP Server", "description": "What this MCP server does", "version": "1.0.0", "author": "Your Name", "license": "MIT", "mcpServers": { "my-server": { "command": "npx", "args": ["-y", "@my-org/my-mcp-server"], "env": { "API_KEY": "${MY_API_KEY}" } } } } ``` Each server entry in `mcpServers` supports: | Field | Required | Description | | --------- | -------------- | ------------------------------------------------------------- | | `command` | Yes (stdio) | Command to execute | | `args` | No | Command arguments | | `env` | No | Environment variables (use `${VAR}` for user-provided values) | | `url` | Yes (http/sse) | Server URL for remote servers | | `type` | No | Connection type: `stdio` (default), `http`, or `sse` | ### 2. Add to prpm.json Reference the config file in your `prpm.json` with `format: "mcp"` and `subtype: "tool"`: **Single package:** ```json prpm.json theme={null} { "name": "my-mcp-server", "version": "1.0.0", "description": "MCP server for interacting with my service", "author": "Your Name", "license": "MIT", "format": "mcp", "subtype": "tool", "tags": ["mcp", "mcp-server", "my-service"], "files": ["mcp-server.json"] } ``` **Multi-package repository:** ```json prpm.json theme={null} { "name": "my-packages", "author": "Your Name", "license": "MIT", "repository": "https://github.com/username/repo", "packages": [ { "name": "my-mcp-server", "version": "1.0.0", "description": "MCP server for interacting with my service", "format": "mcp", "subtype": "tool", "tags": ["mcp", "mcp-server"], "files": ["path/to/mcp-server.json"] } ] } ``` ### 3. Publish ```bash theme={null} prpm publish ``` ## Installing MCP Server Packages ```bash theme={null} # Install to local project (writes to .mcp.json for Claude Code) prpm install @org/my-mcp-server # Install globally prpm install @org/my-mcp-server --global # Install for a specific editor prpm install @org/my-mcp-server --as cursor prpm install @org/my-mcp-server --as vscode --global ``` ## MCP Servers + PRPM Collections MCP server packages work alongside other PRPM packages. Install prompts, rules, and agents alongside MCP servers from the same registry: ```bash theme={null} # Install development prompts and rules prpm install @prpm/typescript-best-practices # Install an MCP server for database access prpm install @org/postgres-mcp-server ``` ## Other MCP Server Catalogs If you're looking for existing MCP servers to use (not publish), these catalogs are also available: * **[Smithery](https://smithery.ai)** — Large catalog with a CLI for installing servers * **[MCP Server Finder](https://mcpserverfinder.com)** — Directory with implementation guides * **[Awesome MCP Servers](https://github.com/punkpeye/awesome-mcp-servers)** — Curated GitHub list * **[Official MCP Servers](https://github.com/modelcontextprotocol/servers)** — Reference implementations by Anthropic * **[Composio](https://composio.dev)** — Pre-built integrations (Gmail, Linear, Slack, etc.) ## FAQ Use `format: "mcp"` and `subtype: "tool"`. MCP servers provide tools to AI clients, so `tool` is the appropriate subtype. A JSON object with a `name` field and a `mcpServers` object containing one or more server configurations. Each server needs either a `command` (for stdio servers) or a `url` (for HTTP/SSE servers). Yes. The `mcpServers` object can contain multiple server entries. All servers in the package will be merged into the user's config on install. PRPM tracks which servers it installed via `prpm.lock`. On uninstall, it removes only the servers it added, leaving your manually configured servers untouched. PRPM can install MCP server configs for Claude Code, Cursor, VS Code, Codex, Windsurf, Gemini, Kiro, OpenCode, Trae, Amp, and Zed. Use the `--as` flag to target a specific editor (e.g., `--as cursor`). No. PRPM packages like rules, agents, and skills work on their own. MCP servers are an additional package type you can publish and install through the same registry. # Playground Source: https://docs.prpm.dev/guides/playground Test packages with real AI models before installing ## Overview PRPM Playground lets you test any package with leading AI models (Claude, GPT-4o, and more) directly in your browser or CLI. No installation required—just instant, interactive testing with real models. ## Why Use Playground? Before Playground, you had to: 1. Install the package 2. Set up your AI environment 3. Create test scenarios 4. Try it with your model 5. Uninstall if it doesn't work Playground eliminates this friction entirely. Test instantly, compare results, and make informed decisions before installing anything. ## Getting Started ### Web Interface 1. Browse packages at [prpm.dev/search](https://prpm.dev/search) 2. Click **"Test in Playground"** on any package page 3. Enter your test input 4. Get instant results from your chosen AI model ### CLI Interface ```bash theme={null} # Single test prpm playground --package @user/package-name --input "your test input" # Interactive mode (multi-turn conversation) prpm playground --package @user/package-name --interactive # Compare with baseline (test with and without the package) prpm playground --package @user/package-name --input "test input" --compare # Use a specific model prpm playground --package @user/package-name --input "test input" --model opus prpm playground --package @user/package-name --input "test input" --model gpt-4o ``` ## Supported Models | Model | Best For | Credit Cost | | --------------------- | ------------------------------ | ----------- | | **Claude Sonnet 3.5** | Balanced performance (default) | 2 credits | | **GPT-4o Mini** | Fast, simple tasks | 1 credit | | **GPT-4o** | Advanced reasoning | 3 credits | | **GPT-4 Turbo** | Complex tasks | 4 credits | | **Claude Opus** | Most capable, complex tasks | 7 credits | 1 credit = 5,000 tokens (input + output combined) ## Credit System ### Free Trial * **5 free credits** to get started * No credit card required * Test immediately after signup ### PRPM+ Subscription * **100 monthly credits** for \$6/month * Credits roll over (max 200 balance) * Unused credits expire after 1 month * Organization members get PRPM+ for \$3/month ### Credit Packs * Buy additional credits that never expire * **100 credits = \$5.00** * Stack with monthly credits * Perfect for heavy users ## Advanced Features ### Compare Mode Compare the same input with and without the package prompt to see the actual value added: ```bash theme={null} prpm playground --package @user/code-reviewer --input "Review this code" --compare ``` This runs two tests: 1. **With package**: Uses the package's prompt 2. **Without package**: Baseline model with no prompt Perfect for evaluating if a package actually improves results or is just prompt fluff. ### Interactive Mode Have multi-turn conversations to stress test packages: ```bash theme={null} prpm playground --package @user/brainstorm-assistant --interactive ``` * Multiple conversation turns * Context maintained across messages * Type `exit` or press Ctrl+C to quit * Great for testing conversational packages ### Model Selection Choose the right model for your test: ```bash theme={null} # Use Claude Opus for complex analysis prpm playground --package @user/complex-analyzer --input "analyze this" --model opus # Use GPT-4o Mini for simple tests prpm playground --package @user/simple-formatter --input "format this" --model gpt-4o-mini # Use GPT-4o for advanced reasoning prpm playground --package @user/problem-solver --input "solve this" --model gpt-4o ``` ## Custom Prompts (Verified Authors Only) Custom prompts let verified authors test their own system prompts before publishing as packages. This is the fastest way to iterate on prompts. ### Requirements To use custom prompts, you must be a verified author: 1. Run `prpm login` and link your GitHub account 2. Complete GitHub OAuth flow 3. You're now verified and can use custom prompts Check your status: `prpm whoami` ### Why 2x Cost? Custom prompts cost **2x normal credits** because they don't benefit from prompt caching: * Published packages cache the system prompt (cheaper follow-ups) * Custom prompts can change between requests (no caching possible) * Still cheaper than running your own API keys ### Web UI Usage 1. Go to [prpm.dev/playground](https://prpm.dev/playground) 2. Toggle **"Use Custom Prompt"** (verified authors only) 3. Enter your system prompt (10-50,000 characters) 4. Enter your test input 5. Click **"Run Playground"** The web UI is great for quick experiments. The CLI is better for rapid iteration on prompt files. ### CLI Usage #### Option 1: Inline String ```bash theme={null} prpm playground --custom "You are a helpful coding assistant" --input "Explain async/await" ``` #### Option 2: From File (Recommended) ```bash theme={null} # Create prompt file cat > my-prompt.txt <<'EOF' You are a helpful coding assistant that specializes in TypeScript and React. When answering questions: 1. Be concise and practical 2. Provide code examples when relevant 3. Explain trade-offs and best practices Always prioritize type safety and clean code. EOF # Test it prpm playground --prompt-file ./my-prompt.txt --input "Explain async/await" ``` #### Interactive Mode ```bash theme={null} prpm playground --prompt-file ./my-prompt.txt --interactive ``` ### A/B Testing with --compare The most powerful feature for custom prompts is `--compare` mode. It runs your custom prompt and a baseline (no prompt) side-by-side: ```bash theme={null} prpm playground --custom "You are concise. Use 2 sentences max." --input "Explain recursion" --compare ``` **Output:** ``` ⏳ Processing comparison (2 requests)... ═══════════════════════════════════════════════════════════ ✨ WITH CUSTOM PROMPT ═══════════════════════════════════════════════════════════ 🤖 Assistant: Recursion is when a function calls itself until a base condition is met. Each call breaks the problem into smaller pieces until it's simple enough to solve directly. ═══════════════════════════════════════════════════════════ 🔵 WITHOUT PROMPT (BASELINE) ═══════════════════════════════════════════════════════════ 🤖 Assistant: Recursion is a programming technique where a function calls itself to solve a problem. It works by breaking down a complex problem into smaller, more manageable sub-problems of the same type. Each recursive call works on a smaller portion of the problem until a base case is reached... [continues] 📊 Combined Stats: Total tokens: 423 Total credits: 8 Credits remaining: 492 💡 Compare the responses to evaluate your custom prompt's effectiveness! ``` You can instantly see your prompt made the response 60% shorter. ### File-Based Workflow (Best for Iteration) This workflow enables 10 iterations in 10 minutes instead of 10 days: ```bash theme={null} # 1. Create prompt file vim security-reviewer.txt # 2. Test it with compare mode prpm playground --prompt-file ./security-reviewer.txt \ --input "const query = 'SELECT * FROM users WHERE id = ' + userId" \ --compare # 3. See results, tweak prompt # 4. Test again (up-arrow to repeat command) # ...iterate until perfect # 5. Publish as package prpm publish ``` ### Workflow Comparison 1. Write prompt in `.cursor/rules` or `.claude/skills/` 2. Reload/restart your editor 3. Ask AI a test question in your editor 4. Realize it needs work 5. Edit the prompt file 6. Reload/restart editor again 7. Test again 8. **Repeat 10x** (lots of reloading, no comparison mode) 1. Write prompt locally 2. Create `prpm.json` manifest 3. Publish package (version 0.0.1) 4. Test in Playground 5. Realize it needs work 6. Edit prompt locally 7. Bump version (0.0.2) and publish again 8. Test new version 9. **Repeat 10x** (versions 0.0.3 through 0.0.12) 1. Write prompt in file 2. `prpm playground --prompt-file ./prompt.txt --input "test" --compare` 3. Edit prompt 4. ↑ (up arrow to repeat command) 5. **Repeat until perfect** (seconds per iteration) 6. Publish once ### Example: Security Code Reviewer You're building a security-focused code reviewer that catches SQL injection, XSS, and auth bugs without false positives: ```bash theme={null} # Test with real vulnerable code prpm playground --prompt-file ./security-reviewer.txt \ --input "const query = 'SELECT * FROM users WHERE id = ' + userId" \ --compare ``` The baseline might give generic advice. Your prompt should catch the specific SQL injection vulnerability and suggest parameterized queries. Iterate until your prompt consistently catches real vulnerabilities without false positives, then publish it. ### Custom Prompt Limits | Limit | Value | Why | | ----------- | --------------- | ----------------------------- | | Min length | 10 chars | Sanity check | | Max length | 50,000 chars | Avoids token limits | | Recommended | 500-5,000 chars | Best results, manageable cost | | Max output | 1,024 tokens | \~750 words | | Timeout | 30 seconds | Prevents runaway requests | | Cost | 2x normal | No caching | Custom prompts run in isolated sandboxes (text-only, no tools). This is by design for safe experimentation. ### Best Practices for Custom Prompts 1. **Start simple** - Write 2-3 sentences, test, iterate 2. **Use files** - Version control your prompts 3. **Compare early** - Use `--compare` to ensure you're adding value 4. **Test multiple inputs** - Don't optimize for one example 5. **Check token usage** - Long prompts = high costs 6. **Be specific** - "Review for security issues" beats "Review code" 7. **Iterate rapidly** - Edit file → ↑ (repeat command) → see results ## Sharing Results ### Web Interface 1. Complete a test in the playground 2. Click the **"Share"** button 3. Get a shareable link 4. Share with your team or the community Shared results include: * The input you tested * The model's complete response * Token usage and credit cost * Package information ### Community Results Every package page shows recent community test results. See: * What inputs others tested * Which models they chose * Whether they found it helpful * Token usage and costs This creates living documentation showing real-world usage. ## For Package Authors ### Analytics Dashboard Package authors get detailed analytics showing: * Total test sessions * Popular AI models used * Credit usage patterns * Session duration averages * Test input trends Access your analytics at [prpm.dev/dashboard](https://prpm.dev/dashboard) ### Suggested Test Inputs Help users test your package effectively: ```bash theme={null} # Add suggested inputs to your package prpm suggested-inputs add @user/package-name "Review this authentication code" prpm suggested-inputs add @user/package-name "Find security vulnerabilities" # List current inputs prpm suggested-inputs list @user/package-name # Remove an input prpm suggested-inputs remove @user/package-name ``` Suggested inputs appear automatically in the playground, making it easier for users to test your package with relevant examples. ## CLI Commands Reference ### `prpm playground` Test a package or custom prompt with AI models. ```bash theme={null} prpm playground [options] ``` **Options:** * `-p, --package ` - Package name to test * `--input ` - Input text (omit for interactive mode) * `-m, --model ` - AI model (sonnet, opus, gpt-4o, gpt-4o-mini, gpt-4-turbo) * `-c, --compare` - Compare with and without prompt (baseline) * `-i, --interactive` - Start interactive conversation mode * `-v, --version ` - Specific package version to test * `--custom ` - Use custom prompt string (verified authors only) * `--prompt-file ` - Load custom prompt from file (verified authors only) **Examples:** ```bash theme={null} # Package testing prpm playground --package @anthropic/code-reviewer --input "Review this: console.log('hi')" prpm playground --package @user/brainstorm --interactive prpm playground --package @user/optimizer --input "Optimize this" --compare # Custom prompts (verified authors only) prpm playground --custom "You are a concise assistant" --input "Explain async" prpm playground --prompt-file ./my-prompt.txt --input "Test" prpm playground --prompt-file ./my-prompt.txt --input "Test" --compare # Interactive mode prpm playground --package @user/prompt --interactive prpm playground --prompt-file ./my-prompt.txt --interactive ``` ### `prpm subscribe` Manage your PRPM+ subscription. ```bash theme={null} prpm subscribe [command] ``` **Commands:** * (no command) - Subscribe to PRPM+ * `status` - View subscription status and credits * `cancel` - Cancel your subscription **Examples:** ```bash theme={null} # Subscribe to PRPM+ prpm subscribe # Check your credits and status prpm subscribe status # Cancel subscription prpm subscribe cancel ``` ### `prpm buy-credits` Purchase additional playground credits. ```bash theme={null} prpm buy-credits ``` Opens an interactive prompt to select and purchase credit packs. ### `prpm suggested-inputs` Manage suggested test inputs for your packages. ```bash theme={null} prpm suggested-inputs [input] ``` **Commands:** * `add` - Add a suggested input * `list` - List all suggested inputs * `remove` - Remove a suggested input **Examples:** ```bash theme={null} # Add a suggested input prpm suggested-inputs add @user/my-package "Test with this input" # List all inputs prpm suggested-inputs list @user/my-package # Remove an input prpm suggested-inputs remove @user/my-package abc123 ``` ## Best Practices ### For Testing 1. **Use realistic inputs** - Test with inputs you'd actually use in your workflow 2. **Try multiple models** - Different models excel at different tasks 3. **Use compare mode** - Verify the package actually adds value 4. **Test edge cases** - Don't just test the happy path 5. **Share useful results** - Help the community learn from your tests ### For Package Authors 1. **Add suggested inputs** - Make it easy for users to test effectively 2. **Monitor analytics** - See how users actually test your package 3. **Respond to feedback** - Address issues users discover through testing 4. **Test your own packages** - Verify they work as expected with different models 5. **Share best results** - Feature great test results in your package README ## Pricing & Limits ### Credit Costs Credits are spent based on token usage: * 1 credit = 5,000 tokens * Tokens = input tokens + output tokens * Cost shown after each test ### Rate Limits * **Free tier**: 5 credits total * **PRPM+**: 100 credits/month + rollover (max 200) * **Credit packs**: No limits, never expire ### Fair Use Playground is for testing packages, not production AI usage: * ✅ Testing packages before installing * ✅ Comparing multiple packages * ✅ Sharing test results with team * ❌ Using as primary AI interface * ❌ Automating bulk requests * ❌ Sharing account credentials ## Troubleshooting ### "Insufficient credits" **Solution:** Subscribe to PRPM+ or buy a credit pack: ```bash theme={null} prpm subscribe # or prpm buy-credits ``` ### "Package not found" **Solution:** Verify the package name is correct: ```bash theme={null} prpm search "package name" ``` ### CLI playground not working **Solution:** Ensure you're logged in: ```bash theme={null} prpm login prpm playground @user/package "test" ``` ### Test taking too long **Solution:** * Try a faster model (GPT-4o Mini) * Reduce input length * Check your internet connection ## Support Need help with Playground? * **Documentation**: [docs.prpm.dev](https://docs.prpm.dev) * **Email**: [hello@prpm.dev](mailto:hello@prpm.dev) * **Twitter**: [@prpmdev](https://twitter.com/prpmdev) * **GitHub**: [github.com/pr-pm/prpm](https://github.com/pr-pm/prpm) # Installation Source: https://docs.prpm.dev/installation Install PRPM on your system ## Install via npm The easiest way to install the PRPM CLI is using npm: ```bash theme={null} npm install -g prpm ``` ## Verify Installation Check that PRPM is installed correctly: ```bash theme={null} prpm --version ``` You should see the version number of PRPM. ## System Requirements * **Node.js**: 18.x or higher * **npm**: 9.x or higher * **Operating Systems**: macOS, Linux, Windows ## Authentication Setup Before publishing packages, you'll need to authenticate: ```bash theme={null} prpm login ``` This will open GitHub OAuth in your browser to authenticate. Check your authentication status: ```bash theme={null} prpm whoami ``` ## Alternative: Use with npx If you don't want to install globally, you can use npx: ```bash theme={null} npx prpm search typescript npx prpm install @username/typescript-rules ``` Using npx will download the CLI each time, which is slower than installing globally. ## Configuration PRPM stores configuration in `~/.prpmrc`. View all configuration: ```bash theme={null} prpm config list ``` View a specific setting: ```bash theme={null} prpm config get registry ``` Set a configuration value: ```bash theme={null} prpm config set registry https://custom-registry.dev ``` ### Common Configuration Options * `registry` - Registry URL (default: `https://registry.prpm.dev`) * `token` - Authentication token (set automatically by `prpm login`) * `telemetry` - Enable/disable telemetry (default: `true`) ### Environment Variables You can also configure PRPM using environment variables: ```bash theme={null} export PRPM_REGISTRY_URL=https://custom-registry.dev export PRPM_TOKEN=your-auth-token export PRPM_TELEMETRY=false ``` ## Troubleshooting ### Command not found If `prpm` command is not found after installation: 1. Check if npm global bin is in your PATH: ```bash theme={null} npm config get prefix ``` 2. Add npm global bin to PATH: ```bash theme={null} # For bash echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.bashrc source ~/.bashrc # For zsh echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc source ~/.zshrc ``` ### Permission errors If you get EACCES errors: 1. Change npm's default directory (recommended): ```bash theme={null} mkdir ~/.npm-global npm config set prefix '~/.npm-global' echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.profile source ~/.profile npm install -g prpm ``` 2. Or use sudo (less secure): ```bash theme={null} sudo npm install -g prpm ``` For more troubleshooting help, see the [Troubleshooting Guide](/cli/troubleshooting). ## Next Steps Install your first package Explore all commands # Introduction to PRPM Source: https://docs.prpm.dev/introduction The universal package manager for AI prompts, rules, skills, and agents # Welcome to PRPM PRPM (Prompt Package Manager) is a universal package manager that allows you to install, share, and manage AI tool configurations across Claude Code, Cursor, Continue, Windsurf, OpenCode, Droid, and other AI development tools. ## What is PRPM? PRPM makes it easy to: * **Install** pre-built prompts, rules, and skills from the PRPM registry * **Share** your AI configurations with your team or the community * **Manage** multiple AI tool configurations from a single place * **Discover** popular AI patterns and best practices ## Key Features Works with Claude Code, Cursor, Continue, Windsurf, Copilot, Kiro, and more Find packages using natural language (no login required) Bundle multiple packages together for easier setup Test packages with real AI models before installing Convert prompt files between different formats Publish your prompts and rules to share with others Powerful command-line interface for managing packages Browse and search packages on the web ## Quick Example Install a package: ```bash theme={null} prpm install @username/typescript-best-practices ``` Publish your own package: ```bash theme={null} prpm init prpm login prpm publish ``` ## How It Works PRPM manages AI prompt files across different formats and tools: 1. **Search & Discover** - Find packages in the PRPM registry that match your needs 2. **Install** - Download and install packages to the correct locations (`.cursor/`, `.claude/`, etc.) 3. **Track** - Maintain a lock file (`prpm.lock`) to track what's installed 4. **Update** - Keep your packages up to date with the latest versions 5. **Publish** - Share your own packages with the community ## Supported Formats PRPM supports a wide range of AI development tools: * **Claude Code** - Skills, agents, slash commands, hooks, and tools * **Cursor** - Rules, agents, slash commands, and tools * **Continue** - Coding rules and prompts * **Windsurf** - Coding rules, agents, slash commands, and tools * **GitHub Copilot** - Instructions and chat modes * **Kiro** - Steering files, agents, and hooks * **Gemini CLI** - Custom commands and tools * **OpenCode** - Agents, commands, and tools * **Ruler** - Coding rules and agents * **Factory Droid** - Skills, commands, and hooks * **Trae** - Rules for Trae IDE (ByteDance) * **Aider** - Conventions for Aider AI coding assistant * **Zencoder** - Rules for Zencoder AI coding assistant * **Replit Agent** - Instructions for Replit Agent * **Agents.md** - Universal agent format (OpenAI, Gemini, etc.) * **MCP** - Model Context Protocol servers * **Generic** - Universal AI prompts Each format has its own directory structure and file format. PRPM handles all the details automatically, including format conversion between tools. ## Next Steps Get up and running in 5 minutes Learn how to publish your own packages # Publishing Collections Source: https://docs.prpm.dev/publishing/collections Create and publish package collections # Publishing Collections Learn how to create and publish collections that bundle multiple packages together. ## What are Collections? Collections allow users to install multiple related packages with a single command: ```bash theme={null} prpm install collections/fullstack-nextjs ``` Instead of: ```bash theme={null} prpm install typescript-strict prpm install nextjs-patterns prpm install @username/react-best-practices prpm install prisma-patterns # ...and so on ``` ## Creating a Collection Collections are defined in prpm.json using the `collections` array: ```json theme={null} { "name": "my-prompts-repo", "author": "Your Name", "license": "MIT", "repository": "https://github.com/username/repo", "collections": [ { "id": "fullstack-nextjs", "name": "Full-Stack Next.js", "description": "Complete Next.js setup with TypeScript, Prisma, and testing", "version": "1.0.0", "category": "development", "tags": ["nextjs", "typescript", "fullstack"], "icon": "⚡", "packages": [ { "packageId": "typescript-strict", "version": "^1.0.0", "required": true, "reason": "Enforces strict TypeScript type safety" }, { "packageId": "nextjs-patterns", "version": "^2.0.0", "required": true, "reason": "Next.js best practices" }, { "packageId": "tailwind-config", "version": "^3.0.0", "required": false, "reason": "Optional Tailwind CSS setup" } ] } ] } ``` ## Collection Fields ### Required Fields | Field | Description | | ------------- | ------------------------------ | | `id` | Unique identifier (kebab-case) | | `name` | Display name | | `description` | What this collection provides | | `packages` | Array of packages to include | ### Optional Fields | Field | Description | | ---------- | ------------------------------------- | | `version` | Semantic version (default: 1.0.0) | | `category` | Category (development, testing, etc.) | | `tags` | Tags for discoverability | | `icon` | Emoji or icon | ## Package Entries Each package in the `packages` array: ```json theme={null} { "packageId": "package-name", "version": "^1.0.0", "required": true, "reason": "Why this package is included" } ``` ### Version Ranges * `^1.0.0` - Compatible with 1.x.x (recommended) * `~1.2.0` - Compatible with 1.2.x * `1.0.0` - Exact version only * `latest` - Always use latest ### Required vs Optional Optional packages can be skipped during installation: ```bash theme={null} prpm install collections/fullstack-nextjs --skip-optional ``` ## Publishing Collections ### Publish All Publish all packages and collections: ```bash theme={null} prpm publish ``` ### Publish Specific Collection Publish only one collection: ```bash theme={null} prpm publish --collection fullstack-nextjs ``` ## Collections with Packages You can define both packages and collections in the same prpm.json: ```json theme={null} { "name": "my-prompts-repo", "author": "Your Name", "license": "MIT", "packages": [ { "name": "@username/typescript-rules", "version": "1.0.0", "description": "TypeScript coding standards", "format": "cursor", "subtype": "rule", "tags": ["typescript"], "files": [".cursor/rules/typescript.mdc"] }, { "name": "@username/react-patterns", "version": "1.0.0", "description": "React best practices", "format": "claude", "subtype": "skill", "tags": ["react"], "files": [".claude/skills/@username/react-patterns/SKILL.md"] } ], "collections": [ { "id": "fullstack-setup", "name": "Full-Stack Setup", "description": "Complete full-stack development setup", "packages": [ { "packageId": "@username/typescript-rules", "version": "^1.0.0", "required": true }, { "packageId": "@username/react-patterns", "version": "^1.0.0", "required": true }, { "packageId": "@prpm/testing-patterns", "version": "^1.0.0", "required": false } ] } ] } ``` This allows you to: 1. Publish your own packages 2. Create collections that bundle your packages with others from the registry ## Collection Categories Common categories: * `development` - General development setups * `testing` - Testing configurations * `deployment` - Deployment workflows * `data-science` - Data science and ML * `devops` - DevOps and infrastructure * `design` - Design and UI/UX * `documentation` - Documentation tools * `security` - Security patterns * `performance` - Performance optimization ## Best Practices ### Use Semantic Version Ranges ```json theme={null} { "packageId": "package-name", "version": "^1.0.0" // ✓ Allows compatible updates } ``` Not: ```json theme={null} { "packageId": "package-name", "version": "1.0.0" // ✗ Too strict } ``` ### Provide Clear Descriptions ```json theme={null} { "description": "Complete Next.js setup with TypeScript, Tailwind, and Vitest testing" } ``` Not: ```json theme={null} { "description": "My stuff" // ✗ Too vague } ``` ### Use Relevant Tags ```json theme={null} { "tags": ["nextjs", "typescript", "testing", "tailwind"] } ``` ### Add Reasons Explain why each package is included: ```json theme={null} { "packageId": "typescript-strict", "version": "^1.0.0", "required": true, "reason": "Enforces strict TypeScript type safety and prevents common errors" } ``` ## Deprecating Collections If you need to deprecate a collection (e.g., it's been superseded by a better alternative), use the `deprecate` command: ```bash theme={null} # Deprecate a collection with a reason prpm collections deprecate my-collection --reason "Use my-new-collection instead" # Remove deprecation status prpm collections deprecate my-collection --undo ``` ### What Happens When You Deprecate * The collection is hidden from search results * Users who have the collection installed will see a deprecation warning * The collection can still be installed directly by name * All versions of the collection are marked as deprecated ### Who Can Deprecate Only the collection owner (or organization members for org-owned collections) can deprecate a collection. Admins can also deprecate any collection. ## Next Steps Complete schema documentation Learn more about publishing # Publishing Guide Source: https://docs.prpm.dev/publishing/getting-started Publish your packages to the PRPM registry # Publishing to PRPM Learn how to publish your AI tool configurations to the PRPM registry. ## Prerequisites 1. **PRPM CLI installed**: `npm install -g prpm` 2. **GitHub account**: Required for authentication 3. **Valid prpm.json**: Package manifest in your repository ## Authentication Login using GitHub: ```bash theme={null} prpm login ``` Check authentication status: ```bash theme={null} prpm whoami ``` ## Publishing Your First Package ### 1. Create prpm.json **Let AI help you create prpm.json!** Install the prpm-json package for expert guidance: ```bash theme={null} # For Claude Code prpm install @prpm/prpm-json-best-practices-skill # For Cursor prpm install @prpm/prpm-json-best-practices ``` The AI will then help you structure your manifest with proper fields, tags, and examples. Create a manifest file in your project root: ```json theme={null} { "name": "my-@username/typescript-rules", "version": "1.0.0", "description": "My TypeScript coding standards and best practices", "author": "Your Name ", "license": "MIT", "repository": "https://github.com/username/repo", "format": "cursor", "subtype": "rule", "tags": ["typescript", "best-practices"], "files": [".cursor/rules/typescript.mdc"] } ``` ### 2. Validate Test your manifest before publishing: ```bash theme={null} prpm publish --dry-run ``` This checks: * ✓ prpm.json syntax is valid * ✓ All required fields are present * ✓ All files exist * ✓ Tags are properly formatted * ✓ Version follows semver ### 3. Publish Publish your package: ```bash theme={null} prpm publish ``` That's it! Your package is now available on the PRPM registry. ## Publishing Multiple Packages For repositories containing multiple packages, use the `packages` array: ```json theme={null} { "name": "my-prompts-repo", "author": "Your Name", "license": "MIT", "packages": [ { "name": "typescript-cursor-rules", "version": "1.0.0", "description": "TypeScript rules for Cursor", "format": "cursor", "subtype": "rule", "tags": ["typescript"], "files": [".cursor/rules/typescript.mdc"] }, { "name": "python-claude-skill", "version": "1.0.0", "description": "Python best practices for Claude", "format": "claude", "subtype": "skill", "tags": ["python"], "files": [".claude/skills/python-expert/SKILL.md"] } ] } ``` Publish all packages: ```bash theme={null} prpm publish ``` Or publish only a specific package: ```bash theme={null} prpm publish --package typescript-cursor-rules ``` ## Versioning Follow [Semantic Versioning](https://semver.org): | Change Type | Version Bump | Example | | --------------------------------- | ------------ | ------------- | | Bug fix, typo | Patch | 1.0.0 → 1.0.1 | | New feature (backward compatible) | Minor | 1.0.0 → 1.1.0 | | Breaking change | Major | 1.0.0 → 2.0.0 | ## Tags Use 3-8 relevant tags per package: **Good tags:** ```json theme={null} { "tags": ["typescript", "type-safety", "best-practices"] } ``` **Bad tags:** ```json theme={null} { "tags": ["code", "stuff", "TypeScript"] // Too generic, wrong case } ``` ## Next Steps Complete prpm.json documentation Create package collections # Manifest Reference Source: https://docs.prpm.dev/publishing/manifest Complete prpm.json documentation # 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: ```bash theme={null} # 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: ```json theme={null} { "name": "my-package", "version": "1.0.0", "description": "Clear description of what this package does", "author": "Your Name ", "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: ```json theme={null} { "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 | | ------------- | --------- | --------------------------------------- | | `name` | string | Package name (kebab-case, unique) | | `version` | string | Semver version (e.g., `1.0.0`) | | `description` | string | Clear description (min 10 chars) | | `author` | string | Author name and optional email | | `license` | string | SPDX license identifier | | `format` | string | Target format (claude, cursor, etc.) | | `subtype` | string | Package type (agent, skill, rule, etc.) | | `files` | string\[] | 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 Values | Format | Description | | ----------- | -------------------------- | | `claude` | Claude Code | | `cursor` | Cursor IDE | | `continue` | Continue.dev | | `windsurf` | Windsurf IDE | | `copilot` | GitHub Copilot | | `kiro` | Kiro AI | | `gemini` | Gemini CLI | | `opencode` | OpenCode AI | | `ruler` | Ruler | | `droid` | Factory Droid | | `agents.md` | Agents.md universal format | | `mcp` | Model Context Protocol | | `generic` | Multi-tool | ### Format Aliases Some formats have aliases for compatibility: * `claude.md` → `claude` * `gemini.md` → `gemini` ## Subtype Values | Subtype | Description | | --------------- | ----------------------------------------------- | | `agent` | Autonomous agents that execute multi-step tasks | | `skill` | Specialized capabilities and knowledge domains | | `rule` | IDE rules and coding standards | | `slash-command` | Executable commands for quick actions | | `prompt` | Reusable prompt templates | | `workflow` | Multi-step automation workflows | | `tool` | Executable utilities, scripts, and MCP servers | | `template` | File and project templates | | `collection` | Curated package collections | | `chatmode` | Chat interface modes and configurations | | `hook` | Event-triggered executable hooks | ### Subtype by Format 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:** ```json theme={null} { "files": [".cursor/rules/typescript.mdc"] } ``` **Wrong:** ```json theme={null} { "files": ["rules/typescript.mdc"] // Missing .cursor/ prefix } ``` ## Tags Use 3-8 kebab-case tags: **Good:** ```json theme={null} { "tags": ["typescript", "best-practices", "type-safety"] } ``` **Bad:** ```json theme={null} { "tags": ["TypeScript", "code_quality"] // Wrong case, wrong separator } ``` ## Optional Fields | Field | Type | Description | | --------------- | --------- | -------------------------------------- | | `repository` | string | GitHub repository URL | | `homepage` | string | Package homepage | | `documentation` | string | Documentation URL | | `organization` | string | Organization name/ID | | `keywords` | string\[] | Additional search keywords | | `private` | boolean | Mark as private (default: false) | | `scripts` | object | 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: ```json theme={null} { "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 | | ---------------- | ----------------------------- | -------------------------------------- | | `prepublishOnly` | Before `prpm publish` | Build TypeScript hooks, compile assets | | `prepublish` | Before publish AND on install | Not recommended - use prepublishOnly | ### prepublishOnly (Recommended) Use `prepublishOnly` to build hooks or compile code before publishing: ```json theme={null} { "scripts": { "prepublishOnly": "cd .claude/hooks/my-hook && npm run build" } } ``` **What happens:** 1. You run `prpm publish` 2. PRPM runs your `prepublishOnly` script 3. If the script succeeds, publishing continues 4. 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 `&&`: ```json theme={null} { "scripts": { "prepublishOnly": "npm test && npm run build && npm run validate" } } ``` ### Example: Building Multiple Hooks ```json theme={null} { "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:** ```json theme={null} { "scripts": { "prepublishOnly": "npm run build" } } ``` **Bad:** ```json theme={null} { "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 Create package collections Publish your packages # Quickstart Source: https://docs.prpm.dev/quickstart Get started with PRPM in 5 minutes ## Installation Install the PRPM CLI globally using npm: ```bash theme={null} npm install -g prpm ``` Verify the installation: ```bash theme={null} prpm --version ``` You can also use `npx prpm` to run commands without installing globally. ## Install Your First Package Search for packages: ```bash theme={null} prpm search typescript ``` Install a package (replace with actual package name from search results): ```bash theme={null} prpm install @username/typescript-best-practices ``` Packages are namespaced by author. The format is `@username/typescript-rules`. List installed packages: ```bash theme={null} prpm list ``` ## Discover More Packages View trending packages: ```bash theme={null} prpm trending ``` Browse collections (curated package bundles): ```bash theme={null} prpm collections --list ``` Install an entire collection: ```bash theme={null} prpm collections web-development --install ``` Collections bundle multiple related packages together for easier setup of common stacks and workflows. ## Publishing Your First Package ### 1. Initialize a Package Use the interactive init command to scaffold a new package: ```bash theme={null} prpm init ``` This will prompt you for: * Package name (format: `@username/typescript-rules`) * Description * Format (cursor, claude, windsurf, etc.) * Subtype (rule, agent, skill, etc.) * Author information * License * Tags It creates: * `prpm.json` - Package manifest * `README.md` - Documentation template * Example files based on your selected format ### 2. Add Your Content Edit the generated files with your rules, prompts, or skills: ```bash theme={null} # For Cursor rules vim .cursorrules # For Claude skills vim .claude/skills/my-skill/SKILL.md # Update the README vim README.md ``` ### 3. Login to PRPM Authenticate with the registry: ```bash theme={null} prpm login ``` ### 4. Publish Test your package first (optional but recommended): ```bash theme={null} prpm publish --dry-run ``` Then publish for real: ```bash theme={null} prpm publish ``` Your package is now live on the PRPM registry! Others can find it with `prpm search` and install it with `prpm install @username/typescript-rules`. ### 5. Update Your Package When you make changes, increment the version in `prpm.json`: ```json theme={null} { "version": "1.1.0" // Was 1.0.0 } ``` Then publish again: ```bash theme={null} prpm publish ``` ## Next Steps Learn more about publishing packages Create collections of packages Explore all CLI commands Complete prpm.json documentation