add-agent
Skill2 starsChanged 21 days agoMITView on GitHub
Create a new pi-native subagent definition — an .md file in ~/.pi/agent/agents/ (user scope) or .pi/agents/ (project scope) with valid frontmatter and a task-appropriate model role (@smol, @slow, @plan, @task, @designer). Analyzes the agent's intended task to pick model, thinking level, and tool allowlist. Use when asked to add, create, or define a new agent, subagent, or specialist — not for marketplace plugin agents.
9 other projects use a version of this.
Adopted by
Most recently taken up by
- chacosoldier/compabobtheir own version, first seen Oct 23, 2026
- axrmxv/claude-configtheir own version, first seen Oct 13, 2026
- FISHers6/clawBrotheir own version, first seen Oct 8, 2026
- rgoerwit/ai-investment-agenttheir own version, first seen Oct 8, 2026
- mattolson/agent-sandboxtheir own version, first seen Oct 8, 2026
- microsoft/Sicotheir own version, first seen Jun 11, 2026
Used with
Projects with it also use setup.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
VercelSkillsetup
Set up Vercel CLI and project configuration. Use when the user says "set up Vercel", "configure Vercel", "link to Vercel", or "vercel init".
Also in 3 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- microsoft/Sico★ 253same name
- mattolson/agent-sandbox★ 212same name
- BerriAI/litellm-skills★ 84same name
- rgoerwit/ai-investment-agent★ 71same name
- chacosoldier/compabob★ 34same name
- FISHers6/clawBro★ 28same name
- axrmxv/claude-config★ 1same name
- theopengroup/rune-harness★ 1same name
- tjg37/ironclaw★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- AGENTS.mdAGENTS.md
- add-mcp-serverSkill
- add-ruleSkill
- code-reviewSkill
- grill-meSkill
- orchestrateSkill
- pi-upgrade-reviewSkill
The file
We split this skill into the rules it gives an agent
6 rules. 0 are common, 2 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
2
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 42
Every entry in the allowlist MUST name a tool that exists in the discovered set.
- Very specific: line 43
Read-only agents MUST NOT be granted write or edit.
- Very specific: line 64
Don't hardcode model names (e.g.
- Distinctive: line 65
Don't reuse shipped agent names — the first-loaded file wins and routing gets confusing.
- Very specific: line 66
Don't pin a model role that isn't in settings.json — the spawn fails or silently inherits.
- Very specific: line 74
After /reload (or next session), the agent appears in the subagent tool's available set — do a one-line test spawn to confirm it boots and …
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Add a pi agent
When to Use
The user wants a new pi subagent — a reusable specialist the orchestrator can spawn via the subagent tool. Not for Claude-plugin agents (that's the /plugins extension).
Procedure
- Scope — user-global
~/.pi/agent/agents/<name>.md(default) vs project.pi/agents/<name>.md(repo-specific, needsagentScope: "both"). Ask only if genuinely ambiguous; repo-specific specialists go project-local. - Name — lowercase
a-z 0-9 -, ≤64 chars.lsthe target dir first; never collide with existing files or the shipped set (explorer,research,writer,verifier,reviewer,task). Never overwrite an existing agent without explicit confirmation. - Task analysis — classify the agent's job against the model-role table below. Prefer the cheapest role that does the job reliably; pin
thinking: high/xhighonly for genuine reasoning gates (cost scales with it). - Description — one paragraph: what the agent does + when to use it, with concrete trigger phrases ("use for X", "when the user asks Y"). ≤1024 chars. This is what the orchestrator routes on — vague descriptions produce never-invoked agents.
- Body — the agent's system prompt. The spawned child sees ONLY this body plus the task text, so it must be self-contained: role, procedure, constraints, and the expected output format (end with what to return, e.g. "Return your findings as a structured summary.").
- Optional fields —
spawns(child-agent whitelist, or"*"),output(JTD schema for structured output),timeoutMs(bounded tasks). - Write the file, then verify (below). Tell the user to
/reloadto make it invocable in the current session (agents are discovered at session start).
Model-role selection
Roles resolve via ~/.pi/agent/settings.json (smolModel / slowModel / planModel / taskModel / designerModel). Check the key exists before pinning; if the role isn't configured, omit model entirely and let the agent inherit the session model.
| Task profile | model | thinking | tools |
| Fast read-only recon — locate definitions, call sites, file structure ("where is X?") | @smol | low | read, grep, find, ls |
| Code execution from a frozen, fully-decided spec — typing, scaffolding, fix-application | @smol | medium | read, bash, edit, write, grep, find, ls |
| Reasoning gate — verification, code review, deep root-cause analysis; read-mostly | @slow | xhigh | read, bash, grep, find, ls |
| Planning / spec authoring / architecture decisions | @plan | high | read, grep, find, ls |
| Flexible multi-step worker that may fan out to children | @task | medium | read, bash, edit, write, grep, find, ls, subagent + spawns: "*" |
| Design/UI-adjacent general work | @designer | medium | per task |
| Ambiguous or mixed workload | (omit — inherit session default) | — | minimal sufficient set |
Tool allowlist rules (RFC 2119)
The key words MUST, MUST NOT, SHOULD, and MAY are to be interpreted as described in RFC 2119.
- The agent MUST discover the actual set of available tool names before writing the
toolsfield. Discovery sources, in order: (1) the tool names exposed in the current session's system prompt; (2) extension-registered custom tools; (3) MCP tools, which are namedmcp__<server>__<tool>. - The agent MUST NOT invent or assume tool names. Claude-style names (
Bash,Read,Glob,WebFetch) are invalid in pi — the pi names are lowercase (bash,read,find,web_fetch). - Every entry in the allowlist MUST name a tool that exists in the discovered set. If a required capability has no corresponding tool, the agent MUST omit the entry and say so rather than guess.
- Read-only agents MUST NOT be granted
writeoredit. - The agent SHOULD add
bashonly when the task requires running commands. - The allowlist SHOULD be the minimal sufficient set: a missing tool silently caps the agent mid-task, and an extra tool expands its privilege — so the final allowlist MUST be cross-checked against every step of the agent's procedure.
Template
---
name: <name>
description: <what it does + when to use it, with trigger phrases>
tools: <comma-separated allowlist>
model: "@<role>"
thinking: <level>
---
<system prompt: role, procedure, constraints, output format.
End with what the agent must return.>Pitfalls
- Don't hardcode model names (e.g. "running on GLM-5.2") in the description — reference the role (
@smol,@slow). Roles resolve viasettings.jsonand change; hardcoded names go stale and mislead routing. - Don't reuse shipped agent names — the first-loaded file wins and routing gets confusing.
- Don't pin a model role that isn't in
settings.json— the spawn fails or silently inherits. - A
toolsallowlist that omits a needed tool fails mid-task with permission errors, not at spawn time. - The body is the whole system prompt — references to "the conversation above" or orchestrator context don't exist for the child.
Verification
- Frontmatter parses and has
name+description; name matches^[a-z0-9-]{1,64}$. lsthe target dir shows exactly the new file.- After
/reload(or next session), the agent appears in thesubagenttool's available set — do a one-line test spawn to confirm it boots and returns.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

