Skip to main content
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.

Quick Start

How Skills Work

  1. At startup, Pi scans skill locations and extracts names and descriptions
  2. The system prompt includes available skills in XML format
  3. When a task matches, the agent uses the read tool to load the full SKILL.md
  4. The agent follows the instructions, using relative paths to reference scripts and assets
This is progressive disclosure: only descriptions are always in context, full instructions load on-demand.

Skill Structure

A complete skill directory:

SKILL.md Format

The only required file. Must include:
  1. YAML frontmatter with name and description
  2. Markdown content with instructions

Frontmatter Fields

Name Rules

  • 1-64 characters
  • Lowercase letters, numbers, hyphens only
  • No leading/trailing hyphens
  • No consecutive hyphens
  • Must match parent directory name
Valid: 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.

Complete Example

Skill Locations

Pi loads skills from:
  • Global:
    • ~/.pi/agent/skills/
    • ~/.agents/skills/
  • Project:
    • .pi/skills/
    • .agents/skills/ in cwd and ancestor directories (up to git repo root)
  • Packages: skills/ directories or pi.skills entries in package.json
  • Settings: skills array 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:
For project-level Claude Code skills, add to .pi/settings.json:

Skill Commands

Skills register as /skill:name commands:
Arguments after the command are appended to the skill content as User: <args>. Toggle via /settings or in settings.json:

Relative Paths

Use relative paths from the skill directory:
See 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