commands-folder
Loads prompt templates from commands/ folders, treating them identically to pi’s built-in prompts/ folder functionality.
Why it matters: Some workflows prefer organizing reusable prompts as “commands” — a semantic distinction that makes the intent clearer. This extension lets you use ~/.pi/agent/commands/ alongside ~/.pi/agent/prompts/ without any functional difference.
Locations
The extension scans:
| Location | Scope |
|---|---|
~/.pi/agent/commands/*.md | Global (all projects) |
.pi/commands/*.md | Project-local |
Project-local commands take precedence over global ones with the same name.
Usage
Identical to prompt templates:
/deploy staging
# File: .pi/commands/review.md/review --focus securityFormat
Same as prompt templates — Markdown with optional YAML frontmatter:
---description: Deploy to an environmentargument-hint: <environment>---Deploy the current project to $1 environment.
Run the deployment script and verify the health check passes.Argument Substitution
Full support for positional arguments:
| Syntax | Meaning |
|---|---|
$1, $2, … | Positional arguments |
$@ or $ARGUMENTS | All arguments joined |
${@:N} | Arguments from position N to end |
${@:N:L} | L arguments starting at position N |
Example
---description: Create a new componentargument-hint: <name> [features...]---Create a React component named $1 with the following features:
${@:2}
Follow the project's component patterns.Usage: /component Button "click handler" "loading state"