
pi-dev-rules
Authoritative reference for Pi (@earendil-works/pi-coding-agent): install, configure, run, and extend it. Use for the CLI and configuration, providers and models, extensions, skills, MCP, codemode, the SDK/RPC, security and trust, design philosophy, and the pi repository's internals and contribution rules.
- Installs
- 188
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/agents365-ai/365-skills --skill pi-dev-rules- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads pi-dev-rules automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Pi Dev Rules
Pi is a minimal terminal coding harness: lightweight core, extended through TypeScript
customizations. Package: @earendil-works/pi-coding-agent. Maintained by Earendil Inc. (MIT).
This skill mirrors the official docs at https://pi.dev/docs/latest so you can answer Pi questions
and build Pi customizations without re-fetching. Five further bundles describe material the pi.dev
docs site does not hold: the internal monorepo architecture (the Chord typed host runtime, the
durable agent harness with its Pico5 specification, the agent core, telemetry), a Pi Durable
overview curated from the 2026-10-01 Earendil blog post (what the experimental harness is, its
version timeline, and which blog demos were removed in 1.2.0), and the repository's own
development/contribution rules.
When to use this skill
- Installing, authenticating, or launching Pi; explaining CLI flags / slash commands.
- Configuring providers, API keys, custom models (
models.json), or proxies. - Editing
settings.json, keybindings, themes; understanding sessions & compaction. - Understanding the project-trust security model and running Pi in containers/sandboxes.
- Extending Pi: writing extensions, skills, prompt templates, packages, custom providers, TUI UI;
enabling
codemodeor writing its scripts. - Checking Pi's version history / what changed in a recent release.
- Driving Pi programmatically via the SDK, RPC mode, or JSON event-stream mode.
- Setting up Pi on Windows/Termux/tmux/specific terminals, or building it from source.
- Understanding why Pi is designed the way it is: the creator's philosophy (minimal core, 4 tools, YOLO by default; the 2025-11-30 manifesto lists MCP, plan mode, to-dos, and sub-agents as deliberate non-features, and built-in MCP landed later, on 2026-09-29) and how to configure or extend Pi along those lines instead of against them.
- Working inside the pi monorepo: the
@earendil-works/chordtyped host runtime (contracts, hosts and links, hot reload, delta/replicated state), the durable harness (@earendil-works/pi-durable, Pico5), the agent core, and telemetry. The experimentalserver/client/protocolpackages were removed in 1.2.0. - Building on or asking about Pi Durable (
@earendil-works/pi-durable): what the harness is, which version shipped what, where the runnable examples live, or why a blog-post demo path no longer exists.
Reference index: load the file you need
| File | Covers |
|---|---|
references/cli-and-usage.md | Install, auth, launching, how Pi works (agent loop, context assembly, session tree), the full CLI reference (commands, flags, modes), slash commands, message queue, context files, environment variables (incl. bash-tool PI_SESSION_*/PI_MODEL), sessions, keybindings |
references/providers-and-models.md | Subscription & API-key providers (30+), llama.cpp local router, NVIDIA RTX recipe presets, auth.json (+ scoped env), cloud providers (Azure/Bedrock/Vertex/Cloudflare), custom models in models.json, compat, custom-provider extensions |
references/settings-and-compaction.md | Configuration layout (agent directory vs project .pi/, context files), settings.json schema + example, trust/analytics/retry/transport keys, compaction (auto/manual) and branch summarization |
references/extending-pi.md | Extension API (events, tools, commands, UI), Skills (SKILL.md), Prompt Templates, Themes, Packages, virtual models (pi.registerVirtualModel) |
references/mcp.md | Built-in MCP support (2026-09-29): mcp.json global and project servers, stdio vs streamable HTTP, pi mcp add/remove/list, OAuth sign-in, exposure modes (codemode, codemode-deferred, deferred, direct, hidden) with toolExposure, codemode/tool_search tools, resources, permissions, servers from extensions, SDK wiring, and the --no-mcp / mcp__* tool patterns |
references/codemode.md | The codemode tool: script input and the // @options: line, globals (tools.<name>(), text(), image(), console.log(), store()/load(), searchTools(), describeTool()), what tool calls resolve to, classifier and image models, namespaces and the inline budget, limits |
references/tui-components.md | TUI component system for custom extension/tool UIs (components, overlays, theming, custom editor) |
references/security-and-containerization.md | Project-trust model (trust.json, defaultProjectTrust), no built-in sandbox, Gondolin micro-VM, Docker, OpenShell, Docker Sandboxes |
references/session-format.md | Session JSONL schema: versions, content blocks, entry types, tree/context building, SessionManager API, plus the model-facing message types |
references/programmatic.md | SDK, CLI integration (interactive/print/JSON/RPC mode choice, RpcClient, fork-and-rebrand), JSON event-stream mode, RPC protocol, RPC command reference, RPC extension UI |
references/platform-setup.md | Windows, Termux, tmux, per-terminal modified-Enter setup, shell aliases |
references/development.md | Monorepo package list, build-from-source and standalone-binary builds, supply-chain rules, AGENTS.md development rules, the CONTRIBUTING.md gate |
references/philosophy-and-design.md | Creator Mario Zechner's design manifesto (blog, 2025-11-30; manually curated, not auto-built): minimal prompt <1000 tokens, 4 tools, YOLO by default, the non-features it lists (MCP/plan mode/to-dos/sub-agents/background bash) with their intended alternatives and the MCP entry annotated as superseded since 2026-09-29, multi-provider architecture, Terminal-Bench 2.0 results |
references/chord.md | @earendil-works/chord: the typed host runtime (contracts, declarations, registries, principals, handles, hot reload), hosts and links (memoryLinkPair, ipcLink, webSocketLink), and chord/delta replicated latest-value state. Built from packages/chord/{README.md,docs/{guide,spec,tutorial}.md,src/delta/README.md}; Pi Durable uses Chord, but the Pi coding agent does not; the spec describes the current runtime |
references/durable.md | Pi Durable overview, curated from the 2026-10-01 Earendil blog post and the v1.3.0 tree: the harness/conversation/agent/task/execution-environment vocabulary, the positioning (a harness for building agentic applications, not the Pi CLI), the version timeline (1.0.0 with Pi 1.0 → 1.3.0, lockstep versions, breaking changes), install and code shape, the package layout and its 32 runnable examples, and the blog demos deleted in 1.2.0. Start here for status and routing |
references/agent-harness.md | Internal runtime packages: @earendil-works/pi-durable (durable conversation/task/document harness, experimental API, stored before shown), @earendil-works/pi-agent-core (tool calling and state), @earendil-works/pi-telemetry (vendor-neutral telemetry contracts, adapters, typed schemas). Built from the three package READMEs; not user docs, and durable.md is the entry point |
references/durable-spec.md | The normative Pico5 specification behind pi-durable (5352 lines): records and lifetimes, documents and mutation ownership, tasks and the effect sandwich, submissions and inbox, extensions/hooks/tools, telemetry. A design document for an experimental package, not a frozen API; the bundled text is the v1.3.0 spec |
references/changelog.md | Release history: the last 25 versions with their headline change, extracted from packages/coding-agent/CHANGELOG.md (289 release sections; read the file in the checkout for the full text) |
Pi 1.3.0 update notes
sessionShareDestinationselectsauto,gist, orradiusfor/share.- Resumed sessions restore active tools.
--tools +name/-nameadjusts that set. - Ambiguous
--modelmatches prefer a provider with credentials. Otherwise, specify--provider. - Kimi Code now uses Chat Completions. Custom base URLs must include
/v1. - Codemode permits at most two live workers per Pi process, including cancelled workers until exit.
- Pi Durable supports SQLite table prefixes and shared Cloudflare adapter queues.
Starter plugins
Every Pi user should install these three (same author, battle-tested):
pi install npm:pi-subagents # subagents / loop / chain / parallel
pi install npm:pi-lens # real-time LSP diagnostics
pi install npm:pi-web-access # web search, URL fetch, YouTube, PDF
Then pi list to verify, restart Pi. MCP needs no package: it is built in since 2026-09-29 (see
references/mcp.md). An extension that registers /mcp, such as pi-mcp-adapter, replaces the
built-in support instead of adding to it.
Cheat sheet
curl -fsSL https://pi.dev/install.sh | sh # install (pins dependencies)
npm install -g --ignore-scripts @earendil-works/pi-coding-agent # npm alternative (no pinned transitive deps)
export ANTHROPIC_API_KEY=sk-ant-... # or run /login in-session
cd /path/to/project && pi # start interactive (may prompt to trust the project)
pi update # update Pi itself (pi update self / pi update --self are aliases)
pi list # list installed packages
pi -c # continue most recent session
pi -r # browse/resume sessions
pi --session <path|id> # open specific session
pi --fork <path|id> # fork a session
pi --no-session # ephemeral (no save)
pi -a / -na # trust / don't trust project-local files for this run
pi -p "Summarize this codebase" # print mode (non-interactive)
pi @README.md "Summarize this" # attach files/images with @
cat file | pi -p "..." # pipe stdin
pi --provider openai --model gpt-4o "..." # pick provider/model
pi --model sonnet:high "..." # model:thinkingLevel
pi --tools read,grep,find,ls -p "..." # allowlist tools (-xt excludes; +name/-name adjusts defaults)
pi --mode json "..." | jq -c 'select(.type=="message_end")' # JSON stream
pi --mode rpc # JSON-RPC over stdin/stdout
# In-editor: @file (fuzzy), !cmd (run+send), !!cmd (run, hidden), /command, Ctrl+L model, Shift+Tab thinking, Ctrl+X copy
# While the agent runs: Enter queues a steering msg, Alt+Enter a follow-up, Esc aborts + restores
Key locations (global ~/.pi/agent/, project .pi/):
settings.json, auth.json, models.json, keybindings.json, trust.json, AGENTS.md,
SYSTEM.md, extensions/, skills/, prompts/, themes/, sessions/.
Hard rules
- Install package name is exactly
@earendil-works/pi-coding-agent. The pi.dev installer (curl -fsSL https://pi.dev/install.sh | sh) pins dependencies and is the documented install path; a global npm install needs--ignore-scriptsand pins nothing. - Project context file is
AGENTS.md(Pi also readsCLAUDE.md); put it in the project root. - Extensions run with full system permissions: treat them as trusted code; gate dangerous
ops (
rm,sudo, sensitive paths) withctx.ui.confirmor atool_callblock handler. - Project trust is an input-loading guard, not a sandbox. Pi ships no built-in sandbox; a project
is "trusted" only to decide whether to load its
.pi/resources (settings/extensions/skills/ prompts/themes); decisions live in~/.pi/agent/trust.json, governed bydefaultProjectTrust(ask/always/never), overridable per run with--approve/--no-approve. For untrusted repos or unattended runs, isolate with a container/VM (Gondolin/Docker/OpenShell); don't mount host~/.pi/agentunless the sandbox should see host credentials. - MCP is built in since 2026-09-29, configured in
~/.pi/agent/mcp.jsonor a project.pi/ mcp.json; the project file is read only after the project is trusted, because stdio servers run commands. MCP calls go through the tool pipeline, sotool_callhandlers and permission gates apply (codemodecalls carryparentToolCallId). Installing an extension that registers/mcp(pi-mcp-adapter) disables the built-in support; disable it deliberately with"extensions": ["-builtin:mcp"],pi config, or--no-mcpfor one run. - In extension/SDK tools: throw on error, never return an error flag. Pi wraps a thrown error
into an error tool result (
isError: true); the docs defer toToolDefinitioninpackages/coding-agent/src/core/extensions/types.tsfor the exact contract. Limit tool output to ~50KB / 2000 lines (DEFAULT_MAX_BYTES = 50 * 1024). UseStringEnum(from@earendil-works/pi-ai) for LLM-facing enums. - Skill
name: 1–64 chars, lowercasea-z 0-9 -, no leading/trailing or consecutive hyphens;description≤1024 chars and must say when to load it (a skill with no description won't load). chord.md,durable.md,agent-harness.md, anddurable-spec.mddescribe internals, not a stable contract. Chord is application-neutral and used by Pi Durable, not by the Pi CLI.pi-durableis experimental (1.0.0 on 2026-10-01 with Pi 1.0, 1.3.0 on 2026-10-15). Versions follow the monorepo, and earlier releases include breaking changes. The Pico5 spec is a design document. Quote the source tree state (pi@71023aec1), not a promised API.- The Pi Durable blog post is a 2026-10-01 snapshot. Its "Try it" demos
(
packages/coding-agent/src/experimental/{durable,vacation}/) were deleted in 1.2.0 by commit7472cda0d; the durable harness itself is unaffected. Run examples frompackages/durable/test/examples/(00–31) instead, and readdurable.mdfor the version timeline. auth.jsonholds API keys and OAuth tokens: Pi writes it0600, keep it private and out of version control. Credential priority: CLI--api-key→auth.json→ env var → custom-provider keys inmodels.json.- Project settings override agent-directory settings, and resource lists are combined rather than
replaced (per-model objects such as compaction thresholds merge before the model lookup). Use
pi install -lto write a package declaration to.pi/settings.json, which Pi reads only after the project is trusted.
FAQ
What does the pi-dev-rules skill do?
Authoritative reference for Pi (@earendil-works/pi-coding-agent): install, configure, run, and extend it. Use for the CLI and configuration, providers and models, extensions, skills, MCP, codemode, the SDK/RPC, security and trust, design philosophy, and the pi repository's internals and contribution rules.
How do I install pi-dev-rules?
Run npx skills add https://github.com/agents365-ai/365-skills --skill pi-dev-rules in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/pi-dev-rules/ (personal) or .claude/skills/pi-dev-rules/ (project).
Which AI agents can use pi-dev-rules?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is pi-dev-rules safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains pi-dev-rules?
It is published by agents365-ai in agents365-ai/365-skills. It has 188 recorded installs.
More from agents365-ai/365-skills
drawio-skill
agents365-ai/365-skills
Create, edit, synchronize, inspect, test, and publish editable draw.io diagrams. Use when the user explicitly requests draw.io/diagrams.net, needs a polished architecture, ERD, UML, sequence, C4, SysML, BPMN, network, swimlane, ML, or infrastructure diagram, wants code/IaC/SQL/OpenAPI/AsyncAPI/Protobuf converted into a diagram, or wants an existing diagram queried, reviewed, diffed, restyled, kept in sync, or made interactive. Prefer Mermaid/PlantUML elsewhere when the requested artifact is diagrams-as-code rather than an editable draw.io file.
excalidraw
agents365-ai/365-skills
Use when user requests diagrams, flowcharts, architecture charts, or visualizations. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Generates .excalidraw files and exports to PNG/SVG via Kroki API or locally using excalidraw-brute-export-cli.
creating-mermaid-diagrams
agents365-ai/365-skills
Generate Mermaid diagrams (.mmd) and export to PNG/SVG/PDF using mmdc CLI or Kroki API. USE THIS SKILL when user mentions diagram, flowchart, sequence diagram, class diagram, ER diagram, state machine, architecture, visualize, git graph, 画图, 架构图, 流程图, 时序图. PROACTIVELY USE when explaining ANY system with 3+ components, API flows, authentication sequences, class hierarchies, database schemas, or state machines. Supports 11+ diagram types with fully automatic layout.
plantuml-skill
agents365-ai/365-skills
Use when user requests diagrams, flowcharts, sequence diagrams, class diagrams, component diagrams, ER diagrams, architecture charts, or visualizations — including generating a diagram from existing source code, or rendering/extracting PlantUML embedded in a Markdown file to images (e.g. preparing docs for Confluence/Notion). Also use proactively when explaining systems with 3+ components, APIs, data flows, or class hierarchies. Generates .puml files and exports to PNG/SVG via Kroki API (no local install required).
tldraw-skill
agents365-ai/365-skills
Use when user requests diagrams, flowcharts, architecture charts, or visualizations. Also use proactively when explaining systems with 3+ components, complex data flows, or relationships that benefit from visual representation. Generates .tldr JSON files and exports to PNG/SVG locally using @kitschpatrol/tldraw-cli.
paper-fetch
agents365-ai/365-skills
Use whenever the user wants to obtain, download, or fetch a paper's PDF — given a DOI, an arXiv id, a paper title, a citation, or a list of DOIs. Trigger on phrases like "download this paper", "find the PDF for [DOI]", "grab me the [Nature/bioRxiv/arXiv] paper on X", "get the open-access version", "I need this article", or any bulk/batch paper download request, even when the user doesn't explicitly say "PDF" or "DOI". Resolves via Unpaywall → Semantic Scholar → arXiv → PubMed Central → bioRxiv/medRxiv → publisher direct (institutional opt-in) → Sci-Hub mirrors as last-resort fallback.
Popular ai & agents skills
google-agents-cli-publish
google/agents-cli
This skill should be used when the user wants to "publish an agent", "publish my ADK agent", "register an agent with Gemini", "publish to Gemini" (formerly Gemini Enterprise), or needs guidance on the agents-cli publish gemini command. Also use when the user wants to "manage agents in Agent Registry", "list/update/delete registered agents", or "register an MCP server". Covers ADK vs A2A registration modes, programmatic and interactive usage, flag reference, auto-detection from deployment metadata, Agent Registry fleet management, and troubleshooting. Part of the agents-cli skills suite. Do NOT use for deployment (use google-agents-cli-deploy).
google-agents-cli-eval
google/agents-cli
This skill should be used when the user wants to "run an evaluation", "evaluate my agent", "evaluate my ADK agent", "write an eval dataset", "analyze eval failures", "compare eval results", "optimize agent", or needs guidance on the Gemini platform eval methodology and the Quality Flywheel. Covers eval metrics, dataset schema, LLM-as-judge scoring, and common failure causes. Applies to any agents-cli project, whatever framework the agent is written in. Do NOT use for agent API code patterns (ADK: use google-agents-cli-adk-code), deployment (use google-agents-cli-deploy), or project scaffolding (use google-agents-cli-scaffold).
skill-creator
anthropics/skills
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.
codex-pet
prime-skills/runcomfy-agent-skills
Codex Pet generator on RunComfy. Build a Codex-compatible Codex Pet spritesheet.webp + pet.json from a single reference image, drop it into ${CODEXHOME:-$HOME/.codex}/pets/ / and Codex picks it up as a custom Codex Pet next to the 8 built-ins. This skill produces the exact Codex Pet atlas Codex expects (1536x1872 PNG/WebP, 8 cols x 9 rows, 192x208 cells, 9 animation states — idle, running-right, running-left, waving, jumping, failed, waiting, running, review). Calls OpenAI GPT Image 2 edit ONCE via the local RunComfy CLI as runcomfy run openai/gpt-image-2/edit to produce a canonical Codex Pet pose, then assembles all 9 animation rows programmatically with ImageMagick micro-transforms — no Codex Pro, no $imagegen, no OPENAIAPIKEY required, only RUNCOMFYTOKEN. Triggers on "codex pet", "create codex pet", "make codex pet", "hatch codex pet", "/hatch image", "desktop pet codex", "codex pets", "spritesheet.webp", or any explicit ask to build a custom pet for OpenAI Codex.
full-output-enforcement
leonxlnx/taste-skill
Overrides default LLM truncation behavior. Enforces complete code generation, bans placeholder patterns, and handles token-limit splits cleanly. Apply to any task requiring exhaustive, unabridged output.
executing-plans
obra/superpowers
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available