> ## Documentation Index
> Fetch the complete documentation index at: https://docs.prpm.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# 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
```

<Note>
  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.
</Note>

**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
```

<Note>
  Teaches AI how to create Cursor slash commands using plain markdown (NO frontmatter), descriptive filenames, and clear actionable instructions.
</Note>

#### 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
```

<Note>
  Teaches AI how to create Claude Code skills with proper frontmatter, CSO optimization, when to trigger, and real examples.
</Note>

**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
```

<Note>
  Teaches AI how to create Claude Code agents with persona definition, allowed-tools, model selection, and long-running assistant patterns.
</Note>

**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
```

<Note>
  Teaches AI how to create Claude Code slash commands with optional frontmatter (allowed-tools, argument-hint, description, model, disable-model-invocation).
</Note>

**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
```

<Note>
  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.
</Note>

#### Other Formats

**Continue Rules:**

```bash theme={null}
prpm install @prpm/creating-continue-packages-skill
```

<Note>
  Teaches AI how to create Continue rules with required frontmatter (name field is required), globs, regex, and alwaysApply behavior.
</Note>

**Windsurf Rules:**

```bash theme={null}
prpm install @prpm/creating-windsurf-packages-skill
```

<Note>
  Teaches AI how to create Windsurf rules using plain markdown with 12K character limit, hierarchical structure, and minimalist approach.
</Note>

**GitHub Copilot:**

```bash theme={null}
prpm install @prpm/creating-copilot-packages-skill
```

<Note>
  Teaches AI how to create GitHub Copilot instructions and chatmodes in `.github/` directory with markdown format.
</Note>

**Kiro Steering:**

```bash theme={null}
prpm install @prpm/creating-kiro-packages-skill
```

<Note>
  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.
</Note>

**Agents.md:**

```bash theme={null}
prpm install @prpm/creating-agents-md-skill
```

<Note>
  Teaches AI how to create agents.md files using plain markdown (NO frontmatter) with comprehensive project context documentation.
</Note>

### 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
```

<Note>
  Comprehensive guidance for Claude Code slash commands with multiple reference files (SKILL.md, EXAMPLES.md, FRONTMATTER.md, PATTERNS.md).
</Note>

**Agent Builder (`@prpm/agent-builder-skill`):**

```bash theme={null}
prpm install @prpm/agent-builder-skill
```

<Note>
  Comprehensive guidance for Claude Code subagents with system prompt design, tool access, model selection, and delegation patterns.
</Note>

## 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)
