@realchendahuang: I've put together a comprehensive configuration scheme for Pi Agent, including 17 plugins, 18 global Skills, 2 MCP servers, with a one-click install script. Pi out of the box only has four functions: read and write files and run commands. This configuration is not simply stacking plugins; it's a complete design built around the actual coding process...
Summary
A practical complete configuration scheme for Pi Coding Agent, including 17 plugins, 18 global Skills, and 2 MCP servers, with a one-click install script, aimed at turning it into a powerful terminal coding agent.
View Cached Full Text
Cached at: 07/25/26, 02:08 PM
I have compiled a complete configuration scheme for Pi Agent, featuring 17 plugins, 18 global Skills, and 2 MCP servers, along with a one-click install script. Out of the box, Pi only has four capabilities: reading/writing files and running commands. This configuration is not simply stacking plugins; it is a complete design centered around actual coding workflows.
At the task orchestration level, I’ve installed sub-agent delegation, goal-driven, and planning modes. Complex tasks can be split across multiple sub-agents to run serially or in parallel, or you can first produce a plan before executing, avoiding making changes to the code prematurely.
At the code understanding level, I’ve installed AST-level search/replace, LSP diagnostics, symbol navigation, and context management. Pi can understand code structure, not just text matching. The context-mode can summarize large outputs: reading 47 files directly consumes ~700KB of context, but using it returns only ~3.6KB. Cross-session memory allows Pi to remember previous project conventions even when opening a new window next time.
For external access, I’ve installed web search, Playwright browser automation, an MCP adapter, and two MCP servers: Context7 and Chrome DevTools. It can look up the latest documentation, remotely debug web pages, and capture network packets.
Additionally, I’ve configured a todo overlay, status bar enhancement, GitHub PR viewing, code review, prompt templates, and themes. Each plugin has been selected based on actual usage; tool switches are finely configured — commonly unused ones are set to inactive by default, and MCP servers are set to lazy start for on-demand loading.
Repo URL: https://github.com/realchendahuang/pi-config
realchendahuang/pi-config
Source: https://github.com/realchendahuang/pi-config
My Pi Coding Agent Configuration
Pi (https://pi.dev)
GitHub stars (https://github.com/realchendahuang/pi-config/stargazers) Last Commit (https://github.com/realchendahuang/pi-config/commits) Source (https://github.com/realchendahuang/pi-config)
██████╗ ██╗ ██████╗ ██████╗ ███╗ ██╗███████╗██╗ ██████╗ ██╔══██╗██║ ██╔════╝██╔═══██╗████╗ ██║██╔════╝██║██╔════╝ ██████╔╝██║ ██║ ██║ ██║██╔██╗ ██║█████╗ ██║██║ ███╗ ██╔═══╝ ██║ ██║ ██║ ██║██║╚██╗██║██╔══╝ ██║██║ ██║ ██║ ██║ ╚██████╗╚██████╔╝██║ ╚████║██║ ██║╚██████╔╝ ╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═══╝╚═╝ ╚═╝ ╚═════╝ 17 plugins · 18 global skills · 2 MCP servers · one-line installer
A ready-to-replicate configuration for Pi, shared as a tutorial. Includes 17 plugins, 18 global Skills, 2 MCP servers, and a one-click install script.
Everything in this repo has been filtered through real-world use. The goal is to turn Pi into a versatile terminal coding agent capable of multi-agent collaboration, token savings, and browser automation.
1. What is Pi?
Pi (npm package @earendil-works/pi-coding-agent) is an open-source terminal AI coding agent. You give it a task, and it reads/writes files, runs commands, and calls tools on your local project to get the job done.
If you haven’t installed Pi yet, first run:
bash npm install -g @earendil-works/pi-coding-agent
Then run pi to enter the interactive interface. All plugins in this repo assume you already have a working Pi installation.
2. Pi’s Overall Architecture
Understanding the architecture helps you choose and write plugins. Pi is a plugin-driven agent loop, with the following core layers:
┌─────────────────────────────────────────────────────┐ │ TUI / RPC / Print ← User interaction layer │ │ (terminal UI / API) │ ├─────────────────────────────────────────────────────┤ │ Agent Loop ← Agent loop: receive prompt → call │ │ model → execute tools → return │ ├─────────────────────────────────────────────────────┤ │ Providers / Models ← Multi-model abstraction: │ │ OpenAI / Anthropic / local / │ │ custom provider │ ├─────────────────────────────────────────────────────┤ │ Tools ← Tools callable by the model: │ │ bash/read/edit/web_search/mcp/custom │ ├─────────────────────────────────────────────────────┤ │ Extensions ← TypeScript modules that can │ │ subscribe to events, register │ │ tools/commands/keybindings/themes │ ├─────────────────────────────────────────────────────┤ │ Skills / Prompts ← Markdown "procedural │ │ knowledge", injected into │ │ model context on demand │ ├─────────────────────────────────────────────────────┤ │ Themes ← JSON color schemes │ ├─────────────────────────────────────────────────────┤ │ Packages ← Distribution units for the above │ │ (npm / git / local path) │ └─────────────────────────────────────────────────────┘
Key Concepts:
- Extension: TypeScript modules, the most powerful way to modify. Can subscribe to lifecycle events (e.g.,
tool_callcan intercept/modify/block tool calls), register custom tools, register commands, modify system prompts, and customize rendering. - Skill: A
SKILL.mdfile describing “how to do a certain type of task”. Loaded on demand by the model, persists across sessions. Pi implements the Agent Skills standard, so skills from Claude Code / OpenAI Codex can be used directly. - Prompt: Reusable
.mdtemplates, invoked via/template. - Theme: JSON color scheme file.
- Package: Packages the above into a distributable unit via npm / git / local path.
pi installinstalls a package.
General flow of the agent loop:
- User inputs a prompt
before_agent_startevent (extensions can inject messages / modify system prompts)- Enter turn loop: call model → model may call tools →
tool_callevent (can intercept) → execute tool →tool_resultevent (can modify result) → pass back to model - Model stops calling tools →
agent_end→agent_settled
Extensions can hook into any of these stages.
3. Pi Ecosystem & Package Marketplace
Package Marketplace (pi.dev/packages)
Pi has an official package marketplace. Any npm package with the pi-package keyword in its package.json automatically appears there. Each package page shows version, downloads, dependencies, repo link, and even demo videos/screenshots.
You can also search packages directly in Pi: ``bash
Using the pi-marketplace extension (already installed in this repo)
Or via command line:
pi install npm:@some/package ``
Three Package Sources
| Source | Format | Description |
|---|---|---|
| npm | npm:@scope/[email protected] | Most common, version can be pinned |
| git | git:github.com/user/repo@v1 | Suitable for private/unpublished packages, SSH/HTTPS both work |
| local path | /abs/path or ./rel/path | For development and debugging |
Configuration File Locations
| File | Purpose |
|---|---|
~/.pi/agent/settings.json | Global settings: package list, theme, default model, etc. |
~/.pi/agent/tools.json | Tool toggle: which tools are active/inactive |
~/.pi/agent/models.json | Provider and model definitions |
~/.pi/agent/extensions/*.ts | Global custom extensions (auto-discovered, supports /reload) |
~/.agents/skills/ | Global custom skills |
~/.config/mcp/mcp.json | MCP server configuration |
.pi/settings.json | Project-level settings (can be shared with team) |
.pi/extensions/ | Project-level extensions |
4. How to Modify / Extend Pi
Pi provides three levels of modification, from light to heavy. Choose according to your needs:
Lightweight: Write a Skill
The simplest extension. Write a markdown file at ~/.agents/skills/my-skill/SKILL.md describing the standard process for a certain type of task. The model will load it on demand. The chrome-devtools skill in this repo is in this form.
Suitable for: Codifying process knowledge like “how to debug a certain framework” or “how to release a version”, zero code.
Medium: Install / Write an MCP Server
MCP (Model Context Protocol) is a cross-agent tool protocol. You write an MCP server (any language), register it in ~/.config/mcp/mcp.json, and Pi connects its tools via pi-mcp-adapter. The two MCP servers in this repo (context7, chrome-devtools) are connected this way.
Suitable for: Accessing external services (databases, APIs, browsers, documentation sources), tools reusable across agents.
Heavyweight: Write an Extension
The most powerful modification. Create ~/.pi/agent/extensions/my-ext.ts:
``typescript import type { ExtensionAPI } from “@earendil-works/pi-coding-agent”; import { Type } from “typebox”;
export default function (pi: ExtensionAPI) { // Intercept dangerous commands pi.on(“tool_call”, async (event, ctx) => { if (event.toolName === “bash” && event.input.command?.includes(“rm -rf”)) { const ok = await ctx.ui.confirm(“Danger!”, “Allow rm -rf?”); if (!ok) return { block: true, reason: “User cancelled” }; } });
// Register a custom tool
pi.registerTool({
name: “greet”,
label: “Greet”,
description: “Greet someone by name”,
parameters: Type.Object({
name: Type.String()
}),
async execute(_id, params) {
return { content: [{ type: “text”, text: Hello, ${params.name}! }] };
},
});
// Register a command pi.registerCommand(“hello”, { description: “Say hello”, handler: async (_args, ctx) => ctx.ui.notify(“Hello!”, “info”), }); } ``
Test with pi -e ./my-ext.ts; for production use, place it in ~/.pi/agent/extensions/ and run /reload.
Suitable for: permission gates, git checkpoints, custom compaction, external integrations, stateful tools. Subscribable events cover the full lifecycle of session / agent / message / tool / model / provider.
Packaging & Distribution
After writing, add a package.json with the pi manifest and pi-package keyword, publish to npm:
json { "name": "my-pi-ext", "keywords": ["pi-package"], "pi": { "extensions": ["./extensions"], "skills": ["./skills"] } }
Then pi install npm:my-pi-ext — others can use your extension.
5. Quick Start (3 Steps)
``bash
1. Clone this repo
git clone https://github.com/realchendahuang/pi-config.git cd pi-config
2. One-click install (install 17 plugins + merge MCP config)
bash install.sh
3. Restart Pi to activate all plugins and MCP servers
``
The script will automatically install the 17 plugins using pi install and merge the configuration of the 2 MCP servers into ~/.config/mcp/mcp.json (if that file already exists, it will preserve your existing servers and only add the new ones).
After installation, you still need to configure the model provider/key yourself via
pi config— that part varies per user and is outside the scope of this repo.
6. Plugin Directory (17 plugins, grouped by purpose)
Below is a detailed explanation of each plugin: what it does, why it was chosen, and a link to its repo for deeper exploration.
🤖 Agent Orchestration & Workflow
pi-subagents
Sub-agent delegation framework. Allows the main agent to delegate tasks to sub-agents with five operation modes:
- single: A single sub-agent completes a task independently
- chain: Multiple sub-agents form a pipeline, output of one feeds into the next
- parallel: Multiple sub-agents run the same type of task in parallel
- async: Execute in background asynchronously, notify when done
- forked-context: Fork an independent context from the parent session
Ideal for complex workflows like “let one agent research, another implement, and a third review.” Comes with a pi-subagents skill that teaches the model how to orchestrate.
- 📦 Repo:
@narumitw/pi-goal
Goal-driven mode. Set a goal with /goal, and Pi will autonomously work towards it until completion. If blocked, it actively stops and waits for you. Great for long tasks like “finish this feature.”
- 📦 Repo:
@narumitw/pi-plan-mode
Read-only planning mode (similar to Codex’s read-only collaboration). The model first produces a plan, discusses it with you, then proceeds to execution. Prevents random code changes.
- 📦 Repo:
🔍 Code Intelligence & Context Management
pi-lens
Pi’s “IDE eyes.” Adds AST-level code understanding:
- ast-grep based structural search/replace (more precise than plain-text grep)
- tree-sitter based syntax rule checking
- LSP diagnostics: check type errors before building
- Symbol search, module reporting, reading symbol bodies — “cheap code reading” tools
Comes with 4 skills: pi-lens-ast-grep, pi-lens-lsp-navigation, pi-lens-write-ast-grep-rule, pi-lens-write-tree-sitter-rule (teaches you to write custom rules).
- 📦 Repo:
context-mode
Core token-saving plugin. Routes large outputs (logs, build results, web content, git diffs, etc.) into a sandbox, processes them with code, and returns only a summary to the model. Includes an FTS5 full-text search knowledge base that can index documents, web pages, and historical sessions for later retrieval.
Effect: Analyzing 47 source files via direct read would consume ~700KB of context; using context-mode returns only ~3.6KB. Comes with 8 skills (ctx-search / ctx-index / ctx-stats / ctx-purge / ctx-insight / ctx-doctor / ctx-upgrade / context-mode itself).
- 📦 Repo:
pi-hermes-memory
Cross-session memory. Lets Pi remember things you’ve told it before (your preferences, project conventions, past pitfalls), even in new sessions. Memory is categorized as user / memory / project / failure, and is searchable. Default policy-based token-aware memory with SQLite FTS5 retrieval and automatic compaction.
- 📦 Repo:
🌐 Browsing, Search & External Access
pi-web-access
Web access all-in-one:
- web_search: Multi-engine web search (OpenAI / Brave / Exa / Tavily / Perplexity / Gemini)
- fetch_content: Fetch URL content and convert to markdown; supports YouTube transcripts, GitHub repo cloning, PDF extraction, local video frame extraction
- Includes
librarianskill: library research with permanent GitHub links, ideal for deep-diving into internal implementations of open-source libraries - 📦 Repo:
pi-playwright
Playwright browser automation. Lets Pi open a browser, fill forms, click buttons, take screenshots, inspect console/network. Comes with playwright-browser skill. Great for testing web apps and end-to-end automation.
- 📦 Repo:
pi-mcp-adapter
MCP (Model Context Protocol) adapter. Allows Pi to connect to any MCP server and use its tools. The 2 MCP servers in this repo work through it. Supports OAuth, security reviews, and lazy loading on demand.
- 📦 Repo:
pi-marketplace
Pi package marketplace entry point. Search, view details, security audit, and install pi packages from npm directly in Pi. Includes tools: marketplace_search, marketplace_detail, marketplace_audit, marketplace_install. Very convenient for discovering new plugins.
- 📦 Repo:
✨ Utilities & Themes
@juicesharp/rpiv-todo
A to-do list for the model, rendered as a live overlay that survives /reload and session compaction. Visual progress tracking for multi-step tasks, preventing the model from going off track.
- 📦 Repo:
@narumitw/pi-statusline
Enhanced status bar. Replaces Pi’s default footer, displaying model info, context usage, git status, and more — a quick glance tells you the current state.
- 📦 Repo:
@narumitw/pi-github-pr
View GitHub PR reviews, checks, and comment statuses inside Pi without switching to the browser.
- 📦 Repo:
pi-simplify
Reviews recently changed code, giving suggestions from clarity, consistency, and maintainability perspectives. Run after making changes to clean up code smells.
- 📦 Repo:
@firstpick/pi-prompts-git-pr
A set of reusable prompt templates: commit messages, PR descriptions, PR review workflows. Invoke with / followed by the template name, saving you from writing them each time.
- 📦 Repo:
@firstpick/pi-skill-deep-research
Includes the deep-research skill: a two-stage rigorous research workflow with schema/policy validation. Suitable for high-stakes research requiring multi-source evidence and fact-checking.
- 📦 Repo:
@victor-software-house/pi-curated-themes
A curated collection of dark terminal themes (ported from iTerm2-Color-Schemes), including the one I use, github-dark-colorblind. Also includes the adapt-ghostty-theme-to-pi skill: converts a Ghostty terminal theme into a Pi theme.
- 📦 Repo:
7. Global Skill List (18 skills)
All skills are global — once installed, they are available everywhere, regardless of the current project.
| Category | Skills | Source Package |
|---|---|---|
| Research/Browsing | librarian, deep-research, chrome-devtools | pi-web-access / @firstpick / custom |
| Browser | playwright-browser | pi-playwright |
| Context/KB | context-mode, ctx-search, ctx-index, ctx-stats, ctx-purge, ctx-insight, ctx-doctor, ctx-upgrade | context-mode |
| Code Intelligence | pi-lens-ast-grep, pi-lens-lsp-navigation, pi-lens-write-ast-grep-rule, pi-lens-write-tree-sitter-rule | pi-lens |
| Agent Orchestration | pi-subagents | pi-subagents |
| Themes | adapt-ghostty-theme-to-pi | @victor-software-house |
The
chrome-devtoolsskill is a custom global skill I placed in~/.agents/skills/, not in any npm package. You’ll need to create it yourself (refer to “Write a Skill” in section 2).
8. MCP Servers (2)
Configuration is in mcp.json; the install script merges it into ~/.config/mcp/mcp.json.
context7
Upstash’s Context7 MCP. Fetches the latest documentation for third-party libraries in real time, preventing the model from using outdated training knowledge when writing code.
json { "command": "npx", "args": ["-y", "@upstash/context7-mcp@latest"], "lifecycle": "lazy" }
chrome-devtools
Chrome DevTools remote control, with 29 tools (click, screenshot, network capture, performance analysis, etc.). Works well with the chrome-devtools skill for debugging web pages.
This server requires a local binary called
chrome-devtools-mcp. The path inmcp.jsonis hardcoded; please change it to your own path when using on a different machine.
Both are set with "lifecycle": "lazy" — they start on demand, not permanently, saving resources.
9. Repository Contents
| File | Description |
|---|---|
install.sh | One-click install script: install 17 plugins + merge MCP configuration |
config.json | Machine-readable full configuration (plugins / globalSkills / mcpServers / UI / tools) |
mcp.json | MCP server configuration, can be directly placed into ~/.config/mcp/mcp.json |
README.md | This file |
10. After Installation, How to Use
- Configure the model: Run
pi configand add your own provider and model. This repo does not cover that part. - Restart Pi: To activate all newly installed plugins and MCP servers.
- Try skills: In Pi, simply describe a task, and the model will automatically match the appropriate skill. You can also use slash commands like
/context-mode:ctx-statsto invoke skills manually. - Adjust tool toggles (optional): Pi’s
tools.jsonallows you to set infrequently used tools to inactive, keeping the tool list clean. My personal practice is to setast_grep_*/grep/find/ls/lsp_navigationto inactive, and usepi_lens_activate_toolson demand.config.jsoncontains my full tools configuration for reference.
11. Star Trend
The repo is newly created; the curve will update in real time as stars grow. Click the image to go to the interactive star-history page.
12. Contribution Activity Line Chart
The following ASCII line chart is generated from the real git log of this repo (commits binned by hour), drawn with monospaced block characters — it serves both as a contribution trend visualization and a test of GitHub’s monospace rendering.
Hourly commit distribution (2026-07-25) 4 │ ●─ │ ●─ │ ●─ │ ●─ │ ╱ ●─ │ ●─ ●─ └┴───┴─── 17:00 18:00 Total commits: 5 | Time span: 17:34 → 18:13
As commits increase, this chart will auto-redraw by hour/day. The generation script idea:
git log --pretty=format:%ad→ bin by hour → draw with●/╱/─.
License
MIT
Similar Articles
@9hills: After several weeks of exploration and various attempts, the configuration of pi agent is basically stable. I posted a list before without explanation, which wasn't very friendly. This time I'm posting a full version with comments. Warning: If you need an out-of-box Coding Agent, don't use Pi; Claude Code/Codex is more suitable…
The author shares the stable configuration of pi agent (full version with comments), and warns that if you need an out-of-box Coding Agent, Claude Code/Codex is more suitable.
@yibie: oh-my-pi: Someone turned Pi into the most powerful terminal coding agent --- Pi is a terminal coding agent made by Armin Ronacher (author of Flask). Someone forked it and created oh-my-pi. 4,796 stars...
oh-my-pi is an enhanced terminal coding agent based on Pi, supporting hash-anchored edits, dual engines, LSP integration, and more. It's open-source and highly customizable.
@WWTLitee: Many coding agents easily get stuck when they touch real engineering environments like editors, browsers, and LSP. oh-my-pi takes a different path. Instead of keeping the agent in the terminal chatting, it directly integrates hash anchor editing, LSP, Python, browser, subagents...
oh-my-pi is an open-source coding agent that integrates hash anchor editing, LSP, Python, browser, subagents and other capabilities into a single workspace, providing out-of-the-box complete IDE integration. It currently has 5.8k stars.
@binghe: I've recently become a heavy user of Pi Agent... The more I use it, the more I like it. Pi can chain multiple skills to complete complex tasks, and the local Agent has more practical value! Pi Agent's system prompt is less than 1500 characters, only about 1/13 of Claude Code's...
The user shares their in-depth experience with Pi Agent, noting that its prompts are short, responses fast, and token consumption low, outperforming Claude Code.
Opinionated and Easy Pi.dev Configuration
LazyPi offers a one-command setup for Pi coding agent that installs 60+ community skills, 67 themes, MCP support, sub-agent support, and more, providing a curated starting point to avoid research and configuration overhead.