pi-multi-agent-skill
AGENTS.md9 starsChanged 16 days agoMITView on GitHub
Write in plain, simple language everywhere: code comments, docs, SKILL.md, the references, commit messages and explanations to the user. Use complete sentences, and say what a thing does instead of coining a name for it. Commit messages use Conventional Commits (feat:, fix:, docs:, ...). The text in the repo must read as the final, clean version. It should carry no trace of the back and forth it took to get there, as if it had never been written any other…
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,774 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- multi-agentSkill
The file
We split this AGENTS.md into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 3
Write in plain, simple language everywhere: code comments, docs, SKILL.md, the references, commit messages and explanations to the user.
- Very specific: line 6
Commit messages use Conventional Commits (feat:, fix:, docs:, ...).
- Distinctive: line 30
Prefer one small mechanism the kernel enforces (a lock, a pipe, a socket) over state that several processes reconstruct from files and pids.
- Distinctive: line 32
Leave out what an agent can do itself, such as worktrees or scheduling.
- Very specific: line 35
KEEP SKILL.md AND references/ CONCISE.
- Very specific: line 42
After changing SKILL.md or the references, run make token-count from the repo root to check token counts.
- Very specific: line 45
After changing Python code, including tests, run make check from the repo root and fix any failures.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Writing
Write in plain, simple language everywhere: code comments, docs, SKILL.md,
the references, commit messages and explanations to the user. Use complete
sentences, and say what a thing does instead of coining a name for it.
Commit messages use Conventional Commits (feat:, fix:, docs:, ...).
Code, Comments & Docstrings
The text in the repo must read as the final, clean version. It should carry no trace of the back and forth it took to get there, as if it had never been written any other way. Describe only the current state:
- Describe only current behavior in code, docstrings, inline comments, SKILL.md and the references. Do not mention what changed or contrast it with earlier behavior.
- The only place where contrasting new behavior with earlier behavior is acceptable is commit messages and plans, where readers have the relevant context.
Designing features
This project is a minimal CLI wrapper around pi --mode rpc. pi already
loads extensions, MCP servers, skills, settings, models and sessions; the
script starts pi, passes it a prompt, relays steer and abort, and keeps each
job's result under a name. Keep new features at that size:
- Reuse what pi already does. If pi has a flag or an RPC command for it, use that.
- Prefer one small mechanism the kernel enforces (a lock, a pipe, a socket) over state that several processes reconstruct from files and pids.
- Leave out what an agent can do itself, such as worktrees or scheduling.
- Stay harness agnostic: SKILL.md and the references name no specific extension, harness tool or permission mode.
- KEEP SKILL.md AND
references/CONCISE. State only what an agent needs to use the skill. DO NOT explain familiar syntax, implementation details, or repeat information. Put necessary details in references, not SKILL.md, and update them with the behavior they describe. - Stdlib only, Python 3.9 or later.
After changing SKILL.md or the references, run make token-count from the
repo root to check token counts.
After changing Python code, including tests, run make check from the
repo root and fix any failures. Run make check-full before committing to
also test Python 3.9.
Notes and Rabbit Holes
Knowledge the code does not show. When adding a note, describe the problem and the outcome to preserve, not a step-by-step patch.
- The plans are history.
.plans/completed/explains past decisions, but parts are out of date. The script and the references are current. - pi must keep a reader on its stdout until it exits. pi exits on the first failed stdout write, before its shutdown runs, and the agent's commands keep running. That is why the foreground command and the runner are separate processes, and why nothing should SIGKILL a runner.
- Use
--session-id, never--session.--sessionmatches by prefix, soresume explorecould openexplore-2's session. - Every dialog must be answered. Extensions often wait on a dialog with no timeout, so an unanswered one hangs the agent.
- Agents do not get
APPEND_SYSTEM.md, by decision.--append-system-promptmakes pi skip it; working around that costs more than the file is worth. - Do not bring pid checks back into liveness. Pid,
/procandpschecks caused most past bugs; the runner's lock is the only signal. - Accepted limits. SIGKILL to a runner orphans its pi for a few seconds.
A stuck runner is not killed automatically. An
abortthat reaches pi before the agent starts is ignored until the settle deadline. - Tests.
make checkruns the suite on the current Python.make check-fullalso runs it on Python 3.9.
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.

