@isr4el-silv4/persona
Manage Personas for Pi Coding Agent
Package details
Install @isr4el-silv4/persona from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@isr4el-silv4/persona- Package
@isr4el-silv4/persona- Version
1.0.8- Published
- Jul 6, 2026
- Downloads
- 818/mo · 22/wk
- Author
- isr4el-silv4
- License
- Apache-2.0
- Types
- extension
- Size
- 49.3 KB
- Dependencies
- 0 dependencies · 4 peers
Pi manifest JSON
{
"extensions": [
"./index.ts"
],
"image": "https://i.postimg.cc/L8zZgntL/persona.jpg"
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
persona
A Pi extension that lets you create reusable personas — configurations that restrict which tools the agent can use and inject custom system prompts. Think of them as specialized modes for your Pi agent.
📦 Installation
pi install npm:@isr4el-silv4/persona
🎭 What Are Personas?
Personas let you constrain and customize the agent's behavior. Each persona defines:
- A subset of tools — restrict the agent to only the tools it needs
- A system prompt — custom instructions that shape how the agent behaves
- A scope — global (all projects), project-local, or ephemeral (one session only)
💡 Example Personas
- Scout — only
read,grep,find,lsfor fast codebase exploration - Reviewer — only
readandgrepfor reading and reviewing code - Architect — full tool access with a system prompt focused on design decisions
- Bug Hunter — restricted tools with instructions to focus on debugging
⚙️ Script Tools Exception
Tools registered via pi-script-tools (shell scripts with the _sh suffix, such as status_sh, deploy_sh, etc.) are always available regardless of the persona's tool restrictions. This exception ensures that project scripts remain accessible in every persona without needing to be listed explicitly in each persona's tools: field.
🌐 Browser Tools Exception
Tools registered via pi-web-ui (browser tools with the browser_ prefix, such as browser_list_tabs, browser_get_page_html, etc.) are always available regardless of the persona's tool restrictions. This exception ensures that browser automation capabilities remain accessible in every persona without needing to be listed explicitly in each persona's tools: field.
🚀 Usage
✨ Create a Persona
/persona create
Starts an interactive wizard that walks you through:
- Name — e.g.,
scout(lowercase, hyphens for spaces) - Description — short summary shown in the UI
- Tools — pick which tools the persona can use (checkbox list)
- System prompt mode —
replace(overwrite Pi's default) orappend(add to it) - Inherit project context — include project-level instructions
- Interactive — allow the agent to ask you questions
- System prompt — the actual instructions for the agent
- Scope — global, project, or ephemeral
▶️ Activate a Persona
/persona scout
The agent will now use only the tools and instructions defined by that persona. A badge appears in the UI showing the active persona.
📋 List Available Personas
/persona list
Shows all personas with their scope (🌍 global, 📁 project, ⚡ ephemeral).
✏️ Edit a Persona
/persona edit scout
Re-opens the wizard pre-filled with the persona's current values. Change anything and save.
🗑️ Delete a Persona
/persona delete scout
Removes the persona from disk.
🔄 Clear Active Persona
/persona none
Returns the agent to its default tool set and system prompt.
🌐 Scopes
| Scope | Where It's Stored | When To Use |
|---|---|---|
| Global | ~/.pi/agent/personas/ |
Personas you use across all projects |
| Project | .pi/personas/ |
Personas specific to the current project |
| Ephemeral | In-memory only | Quick one-off personas that disappear after the session |
📝 System Prompt Modes
replace— Your prompt completely replaces Pi's default system prompt. Use this for focused personas that shouldn't know about general-purpose behavior.append— Your prompt is added to the end of Pi's default. Use this to add constraints or instructions on top of the default behavior.
💎 Tips
- Use ephemeral scope to experiment with a persona before saving it permanently
- Name personas with short, descriptive names — you'll type them often
- Use
appendmode when you want the agent to keep its general capabilities while adding new constraints - Use
replacemode when you want a tightly focused agent with no extra behavior
