Pi is designed to adapt to your workflow through prompt templates, skills, themes, and shareable packages. All customizations can be project-specific or global.
<!-- ~/.pi/agent/prompts/review.md -->---description: Code review with security focus---Review this code for:- Security vulnerabilities- Performance issues- Best practices violationsFocus areas: $ARGUMENTSProvide specific line numbers and suggested fixes.
2
Use Template
# In Pi:/review authentication, input validation# Or with file reference:/review @src/auth.ts "session management"
<!-- SKILL.md -->---name: api-testingdescription: Test REST APIs with comprehensive validation---# API Testing SkillUse this skill when the user asks to test an API endpoint.## Steps1. Read the API documentation or code2. Identify endpoints, methods, and expected responses3. Use bash tool to send requests with curl4. Validate: - HTTP status codes - Response schema - Error handling - Edge cases5. Generate test report## Example```bash# Test authentication endpointcurl -X POST http://localhost:3000/api/auth/login \ -H "Content-Type: application/json" \ -d '{"username":"test","password":"test123"}'
---name: my-skill # Must match directory namedescription: What it does # Required, shown to the modeldisable-model-invocation: false # If true, only /skill:name works---
name: Lowercase, hyphens only, max 64 chars
description: Max 1024 chars, tells model when to use skill
> "Test the /api/users endpoint"> Model sees api-testing skill in available_skills> Model uses read tool to load skill> Model follows skill instructions
Load skill explicitly:
/skill:api-testing
Useful for:
Skills with disable-model-invocation: true
Forcing skill usage
Testing skills
# Load specific skillpi --skill ~/.pi/agent/skills/api-testing# Load directory of skillspi --skill ./project-skills/# Disable auto-discoverypi --no-skills --skill ./custom-skill/
<!-- ~/.pi/agent/skills/db-migration/SKILL.md -->---name: db-migrationdescription: Create and manage database migrations safely---# Database Migration SkillUse when the user needs to modify database schema.## Pre-flight Checks1. Read current schema from `./prisma/schema.prisma` or `./migrations/`2. Understand existing tables, columns, relationships3. Check for: - Data loss risks (dropping columns/tables) - Constraint violations - Index requirements## Migration Creation1. Generate migration file in `./migrations/` with timestamp2. Include both `up` and `down` SQL3. Add comments explaining changes4. Handle data transformations if needed## Safety Rules- **NEVER** drop columns without user confirmation- **ALWAYS** use transactions when possible- **ALWAYS** create backups for destructive changes- **TEST** with sample data first## Example Migration```sql-- migrations/20250303_add_user_email.sql-- UPBEGIN;ALTER TABLE users ADD COLUMN email VARCHAR(255);CREATE UNIQUE INDEX idx_users_email ON users(email);COMMIT;-- DOWNBEGIN;DROP INDEX idx_users_email;ALTER TABLE users DROP COLUMN email;COMMIT;
Security Notice: Pi packages run with full system access. Extensions execute arbitrary code, and skills can instruct the model to perform any action. Review source code before installing third-party packages.