Pi Deep Dive — Development skill for Claude Code
Pi coding agent (v1.5) 架构解析中文教程:设计思想与核心链路.
How to install Pi Deep Dive
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open wutongyuonce/pi-deep-dive and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Pi Deep Dive does
Pi coding agent (v1.5) 架构解析中文教程:设计思想与核心链路.
Alternatives in Development
- Root Cause Tracing — Use when errors occur deep in execution and you need to trace back to find the original trigger 102.5k ★
- Management Deep Dive — 管理层纵深研究:买股票就是买人 15.9k ★
- Deep Research Tracker — 深度研究追踪 Prompt 6.3k ★
README
Pi Deep Dive
本项目是开源项目 [Pi](https://github.com/earendil-works/pi) 的中文解析教程仓库。教程已对齐 **v1.5.0**(2026-11-02,[f9a2636](https://github.com/earendil-works/pi/commit/f9a26365568127461c47a07a37dcb42c140a3ac5))。
**在线阅读:[Pi Deep Dive 教程网站](https://wutongyuonce.github.io/pi-deep-dive/)**(用 [mdBook](https://github.com/rust-lang/mdBook) 构建,GitHub Pages 托管)
关于 Pi
[Pi](https://pi.dev) 是一个用 TypeScript 写的"极简、可扩展的 Agent Harness",采用 npm workspace monorepo。核心是三层库加一个终端 UI 库,运行时都在同一个 Node 进程里:
pi-tui 终端 UI 库:差分渲染、组件、编辑器 ← 零内部依赖
pi-ai 统一 LLM 调用层:模型目录、Provider 适配、流式事件 ← 零内部依赖
pi-agent-core Agent Runtime:双层 Agent Loop、工具执行、事件与 Hook ← 依赖 pi-ai
pi-coding-agent Coding Agent CLI:会话、资源、工具、压缩、扩展、多种运行模式 ← 依赖以上
1.x 还新增了一些外围包:`pi-durable`(持久化的会话/任务运行时)、`pi-mcp` 与 `pi-codemode`(MCP 客户端与"让模型写 JS 调工具")、`pi-schema`(工具参数的 JSON Schema 校验)、`chord`(可热重载插件的宿主运行时)、`pi-telemetry` 等。
Pi 奉行近乎激进的可扩展性,不替你规定工作流。许多在别的工具中"内建"的能力,在这里都通过 extensions、skills 或第三方 Pi packages 实现。这样既能让核心保持精简,又能让你按自己的工作方式塑造 Pi。
不设 sub-agents。可借助 tmux 启动多个 Pi 实例,或用 extensions 自行搭建,亦可安装按你思路实现的软件包。
不弹 permission popups。Pi 默认以启动它的用户权限运行;需要更强的边界时,在容器中运行,或通过 extensions 构建与自身环境及安全要求相匹配的确认流程。
不设 plan mode。计划可直接写入文件,或借助 extensions 自行实现,或安装相应软件包。
不内置 to-dos。它们容易让模型困惑。请使用 TODO.md,或用 extensions 自定义。
不提供后台 bash。请使用 tmux:全程可观测,交互更直接。
早期 Pi 也明确"不做 MCP",理由是 MCP 会把大量工具 schema 塞进上下文。1.0 前夕(0.99)Pi 以内置扩展的形式加入了 MCP 客户端,并用 Codemode 化解这个顾虑:MCP 工具默认不直接声明给模型,而是让模型写一段 JavaScript 搜索并调用工具,只有脚本输出进入上下文。详见教程中的 [MCP 与 Codemode](tutorials/pi-coding-agent/模块/mcp-and-codemode.md)。
[OpenClaw](https://github.com/OpenClaw/OpenClaw) 是 Pi 官方 README 推荐的真实集成案例,它通过 SDK / RPC 的方式把 `pi-coding-agent` 嵌入自己的系统。
教程目录
教程只讲设计思想、职责边界和核心链路,不逐行解读源码,面向建立整体理解和准备面试。每篇开头都有一段可以直接在面试里说的 TL;DR。
- Pi 总览:从 LLM 调用到 Coding Agent Harness:全书精简版,半小时读完
- pi-ai
- [pi-
Related Skills
How Claude Code Works
Deep dive into Claude Code internals — architecture, agent loop, context engineering, and more. / 深入解析 Claude
Native Feel Skill
An Agent Skill for designing cross-platform desktop apps that feel native — distilled from Raycast's 2.0 deep-
Claude Reviews Claude
Claude reads its own source code — 17-chapter architectural deep-dive into Claude Code v2.1.88. EN/ZH bilingua
Build Code Agent
从零构建 Code Agent:Claude Code 源码深度解析 Build a Code Agent from Scratch: Deep Dive into Claude Code Source
Deep Dive Claude Code
《深入理解 Claude Code 源码》— 系统剖析 Anthropic Claude Code CLI 的架构设计、工程实践与编程哲学 25 chapters, 101 Mermaid diagrams, 467 c
Learn Real Claude Code
Deep dive into Claude Code source — 512K lines of industrial-grade TypeScript agent architecture
Related Agents
Deep Dive
Use this agent when you need comprehensive analysis, investigation, or exploration of code, architecture, or t
Research Analyzer
The research equivalent of codebase-analyzer. Use this subagent_type when wanting to deep dive on a research t
Documents Analyser
The research equivalent of documents-analyser. Use this subagent_type when wanting to deep dive on a research