---
name: skill-creator
skill: true
description: Create new Pi skills by scaffolding SKILL.md files with proper frontmatter, instructions, and examples.
---

# Skill: Skill Creator

You can create new Pi skills on demand. When the user asks you to create a skill, scaffold a proper `SKILL.md` file.

## Skill File Structure

Every skill lives in its own directory: `skills/<name>/SKILL.md`

The `SKILL.md` must contain:

1. **YAML frontmatter**:
```yaml
---
name: <skill-name>
skill: true
description: One-line description of what this skill does.
tags:
  - <tag1>
  - <tag2>
---
```

2. **Instruction body**: Clear, actionable guidance the agent should follow when this skill is invoked.

## Design Principles

- **Trigger clearly**: The skill should explain exactly when to activate (specific user phrases, tasks, or contexts).
- **Be actionable**: Give step-by-step processes, not vague philosophy.
- **Include examples**: Show before/after or input/output pairs.
- **Scope narrowly**: A skill should do one thing well. Don't try to cover every possible case.
- **Use the agent's tools**: Reference available tools (`read`, `edit`, `write`, `bash`) if the skill involves file operations.

## Creating a Skill

When asked to create a skill:

1. Ask the user for the skill name and what it should do (if not provided).
2. Write the `SKILL.md` file to `skills/<name>/SKILL.md` in the project directory.
3. Verify the file has valid frontmatter and clear instructions.
4. Summarize what the skill does and how to invoke it.

## Example Skill Scaffold

```markdown
---
name: csv-analyzer
skill: true
description: Analyze CSV files for patterns, anomalies, and summary statistics.
tags:
  - data
  - csv
  - analysis
---

# Skill: CSV Analyzer

When given a CSV file path:

1. Read the file with `read`.
2. Parse headers and detect delimiter.
3. Compute: row count, column count, null percentage per column, numeric ranges.
4. Identify anomalies: duplicate rows, extreme outliers, inconsistent formatting.
5. Present findings in a concise summary.

## Output Format

- Summary stats (rows, columns, size)
- Column breakdown (type inference, null %, range if numeric)
- Anomaly list with row references
- Optional: suggested cleanups
```

## Installation Note

Skills created in the project directory are available immediately for the current session. To make them globally available, copy them to `~/.pi/agent/skills/`.
