Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks. Pi implements the Agent Skills standard, ensuring compatibility with other agent harnesses like Claude Code and OpenAI Codex.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/badlogic/pi-mono/llms.txt
Use this file to discover all available pages before exploring further.
Quick Start
---
name: my-skill
description: Brief description of what this skill does and when to use it. Be specific.
---
# My Skill
## Setup
Run once before first use:
```bash
cd ~/.pi/agent/skills/my-skill && npm install
See the reference guide for details.
How Skills Work
- At startup, Pi scans skill locations and extracts names and descriptions
- The system prompt includes available skills in XML format
- When a task matches, the agent uses the
readtool to load the full SKILL.md - The agent follows the instructions, using relative paths to reference scripts and assets
Skill Structure
A complete skill directory:SKILL.md Format
The only required file. Must include:- YAML frontmatter with
nameanddescription - Markdown content with instructions
Frontmatter Fields
| Field | Required | Description |
|---|---|---|
name | Yes | Max 64 chars. Lowercase a-z, 0-9, hyphens. Must match parent directory. |
description | Yes | Max 1024 chars. What the skill does and when to use it. |
license | No | License name or reference to bundled file. |
compatibility | No | Max 500 chars. Environment requirements. |
metadata | No | Arbitrary key-value mapping. |
allowed-tools | No | Space-delimited list of pre-approved tools (experimental). |
disable-model-invocation | No | When true, skill is hidden from system prompt. Users must use /skill:name. |
Name Rules
- 1-64 characters
- Lowercase letters, numbers, hyphens only
- No leading/trailing hyphens
- No consecutive hyphens
- Must match parent directory name
pdf-processing, data-analysis, code-review
Invalid: PDF-Processing, -pdf, pdf--processing
Description Best Practices
The description determines when the agent loads the skill. Be specific.- Good
- Poor
Complete Example
#!/usr/bin/env node
const query = process.argv[2];
const includeContent = process.argv.includes('--content');
// Search implementation
const results = await searchBrave(query, { includeContent });
console.log(JSON.stringify(results, null, 2));
---
name: brave-search
description: Web search and content extraction via Brave Search API. Use for searching documentation, facts, or any web content.
---
# Brave Search
## Setup
```bash
cd ~/.pi/agent/skills/brave-search && npm install
export BRAVE_API_KEY=your-key
Skill Locations
Pi loads skills from:- Global:
~/.pi/agent/skills/~/.agents/skills/
- Project:
.pi/skills/.agents/skills/incwdand ancestor directories (up to git repo root)
- Packages:
skills/directories orpi.skillsentries inpackage.json - Settings:
skillsarray with files or directories - CLI:
--skill <path>(repeatable)
Using Skills from Other Harnesses
To use skills from Claude Code or OpenAI Codex, add to~/.pi/agent/settings.json:
.pi/settings.json:
Skill Commands
Skills register as/skill:name commands:
User: <args>.
Toggle via /settings or in settings.json:
Relative Paths
Use relative paths from the skill directory:packages/coding-agent/examples/extensions/dynamic-resources/ for a complete example.
Skill Repositories
- Anthropic Skills - Document processing (docx, pdf, pptx, xlsx), web development
- Pi Skills - Web search, browser automation, Google APIs, transcription
Next Steps
- See Building Extensions for custom tools and event handlers
- See Custom Providers for adding LLM providers
- Browse existing skills for inspiration