@diegopetrucci/pi-extensions

中文文档
0.1.86发布于 2026/11/11MIT AND Apache-2.0构建来源已验证近 30 天下载 3028

A collection of pi extensions and skills for annotation UIs, context management, workflow audits, contrarian review, review-comment triage, notifications, brrr push alerts, safety guards, GitHub research, repo-local knowledge, todos, tool rendering, model

原始使用文档
文档目录10 节
  1. Subagents
  2. Providers
  3. UI
  4. / Slash commands
  5. Context management
  6. Safety
  7. Quality of life
  8. Deprecated
  9. Install
  10. Development

pi-extensions

Total npm downloads

A collection of pi agent extensions I made. (Btw, I am also building my own harness on top of pi. Have a look if that sounds interesting!)

Subagents

  • code-reviewer: Adds a code_reviewer subagent tool with read-only built-in tools plus configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4) that reviews local changes for ticket fit, diff mismatches, correctness, security, simplicity, and validation gaps without implementing fixes, auto-selects a contrarian-style opposite-provider review model when available, and clamps requested thinking to the chosen model's capabilities.
  • contrarian: Adds a contrarian tool with read-only built-in tools plus configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4) that spins up an isolated subprocess to stress-test plans, designs, assumptions, bug hypotheses, and conclusions by steelmanning the strongest opposing case.
  • developer: Adds a developer subagent tool that implements one task in an isolated child agent using the current session model and thinking, with read, write, edit, grep, find, ls, unrestricted bash, and configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4); write/edit are limited to the checkout.
  • diff-summarizer: Adds a read-only diff_summarizer subagent tool that summarizes a diff or the current local changes and highlights review risk using the current session model at medium thinking, with read, grep, find, ls, guarded read-only bash (direct git/gh/pwd only), and configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4).
  • librarian: Adds a GitHub research scout with a local repo checkout cache disabled by default under the OS user cache directory, toggleable with /librarian-cache, configurable subagent model/thinking defaults via /librarian-config, cached repos expiring after 7 days of non-use, and configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4).
  • oracle: Adds an Amp-style oracle tool with read-only built-in tools plus configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4) that auto-selects the strongest reasoning model on the current provider/subscription, supports persisted /oracle model/thinking defaults, requests xhigh reasoning by default and clamps to model capabilities, and shows live status while running.
  • repo-scout: Adds a read-only repo_scout subagent tool that scans a repository and reports stack, conventions, commands, and hotspots using the current session model at medium thinking, with read, grep, find, ls, guarded read-only bash (direct git/gh/pwd only), and configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4).
  • test-runner: Adds a test_runner subagent tool that runs exact validation shell commands in order in an isolated child agent using the current session model at low thinking, stops at the first failure, and reports PASS/FAIL per step; tools are unrestricted bash and configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4).
  • web-scout: Adds a read-only web_scout subagent tool that researches a question on the web via the hosted Exa MCP endpoint (no API key required; optional EXA_API_KEY for higher limits) and returns citation-backed findings using the current session model at medium thinking, with web_search, fetch_url (http(s) only), read, grep, find, ls, and configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4).

Providers

  • fast: Adds /fast plus the session-only /ultrafast toggle for supported direct OpenAI API, OpenAI Codex, and Anthropic Claude models; Ultrafast is limited to API-key gpt-6-astra or gpt-6.1-sol on OpenAI's canonical Responses endpoint.

UI

  • git-footer: Adds TLH-style git dirty counts, ahead/behind, and optional PR number to pi's built-in footer status area. This package is standalone-only and is not auto-loaded by the @diegopetrucci/pi-extensions collection package.
  • minimal-footer: Replaces pi's built-in footer with a minimal configurable two-line layout: branch plus cached git dirty/ahead/PR status and repo on the first line, context/model on the second, optional DUMB ZONE, optional xp marker, plus OpenAI Codex usage windows labeled from their reported durations.
  • quiet-tools: Always renders collapsed built-in tool rows and mcp__* rows as a one-line invocation plus an expand hint without changing model-visible tool results; inspect status with /quiet-tools status.

/ Slash commands

  • agent-workflow-audit: Adds /agent-workflow-audit, which runs an isolated repo workflow audit subagent with configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4) and returns only the final distilled report to the main session.
  • annotate-git-diff: Adds /annotate-git-diff, a native Glimpse UI where explicit Submit sends structured feedback to the agent and close recovery keeps an unsent draft in the editor.
  • annotate-last-message: Adds /annotate-last-message, a native Glimpse UI for annotating the latest assistant reply and sending planning-oriented feedback directly to the agent.
  • review: Adds /review and /end-review for interactive code reviews of local changes, commits, PRs, and selected paths.
  • triage-comments: Adds /triage-comments and a triage_comments subagent tool with read-only built-in tools plus configured MCP tools (run without confirmation, may have side effects, Pi >=1.0.4) that can auto-detect the current branch's PR, filter resolved/outdated inline comments, classify selected review comments with evidence, and suggest handling options without implementing changes

Context management

  • context-cap: Caps effective model context windows at 350k tokens by default so pi avoids the dumb zone; toggle temporarily with /context-cap.
  • context-inspector: Adds /context, a local self-contained HTML dashboard that breaks down where the current session context is going, with category overview, top offenders, and drilldown search.
  • dynamic-context-pruning: Automatically prunes duplicate tool results, stale errored inputs, and superseded file-op outputs from long sessions behind a cache-aware net-benefit gate, with a /prune picker and /context-pruning status/control commands.

Safety

  • confirm-destructive: Confirms before destructive session actions like clear, switch, and fork.
  • dirty-repo-guard: Prompts before new sessions, session switches, or forks when the current git repo has uncommitted changes.
  • permission-gate: Prompts for confirmation before dangerous bash commands and protected write/edit targets like .git, node_modules, and secret-bearing .env files; rejects named powershell tool calls as unsupported.

Quality of life

  • brrr: Sends brrr push notifications when pi finishes an agent turn and is ready for input, with optional macOS idle gating.
  • gnosis: Exposes the gn repo-local knowledge base CLI as an agent tool for searching and recording durable project decisions, constraints, and intent.
  • illustrations-to-explain-things: Adds a skill for generating clean, absurd Xiaohei-style article illustrations, shot lists, image edits, and visual metaphors.
  • inline-bash: Expands !{command} snippets in user prompts by running them through bash before the prompt reaches the agent.
  • notify: Sends configurable terminal, desktop, bell, and sound notifications when pi finishes and is ready for input, including tmux-aware terminal notifications.
  • project-mcp-json: Reads a Claude Code-style .mcp.json from the project working directory and registers the configured MCP servers with pi via pi.registerMcpServer. Requires a trusted project and follows Pi's project trust semantics — run /trust in the project to enable loading.
  • todo: Adds a branch-aware todo tool for the agent and a /todos viewer for users..

Deprecated

  • claude-fast: Deprecated standalone leftover. It no longer changes provider requests; use fast.
  • openai-fast: Deprecated standalone leftover. It no longer changes provider requests; use fast.

Install

Full collection:

pi install npm:@diegopetrucci/pi-extensions

Or a specific extension:

pi install npm:@diegopetrucci/pi-quiet-tools

Then reload pi:

/reload

Development

Run npm run format for the supported source and test files; CI runs npm run format:check.

The shared Glimpse implementation and declarations live in shared/glimpse/, and the canonical git footer backend lives in shared/footer/git-status.ts. Edit canonical files only, then run npm run sync:shared to update the generated package-local copies in the annotate and footer extensions. npm run sync:shared:check verifies that every allowlisted copy is present and current without writing; CI runs this check. To undo a canonical edit, restore the file under shared/glimpse/ or shared/footer/ and run the sync command again. To undo only generated output, restore the package-local copies without editing them directly. To reverse the footer extraction, restore each consumer's local backend and imports first, keep the standalone git-status.ts files and manifest entries until no consumer imports them, then remove the footer allowlist entries and canonical source; do not leave either standalone package without its runtime source.

版本与发布记录

@diegopetrucci/pi-extensions 共发布 79 个版本,首次发布于 2026/04/16;过去 12 个月发布了 79 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.86latest2026/11/111 天前
0.1.852026/11/075 天前
0.1.832026/11/048 天前
0.1.822026/11/0210 天前
0.1.812026/10/2616 天前
0.1.802026/10/2518 天前

其他发布通道:backfill → 0.1.41。

关于 @diegopetrucci/pi-extensions 的常见问题

@diegopetrucci/pi-extensions 是什么?

A collection of pi extensions and skills for annotation UIs, context management, workflow audits, contrarian review, review-comment triage, notifications, brrr push alerts, safety guards, GitHub research, repo-local knowledge, todos, tool rendering, model

如何安装 @diegopetrucci/pi-extensions?

在项目目录运行 npm install @diegopetrucci/pi-extensions,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:typebox(*)、@earendil-works/pi-ai(*)、@earendil-works/pi-tui(*)、@earendil-works/pi-coding-agent(*)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@diegopetrucci/pi-extensions 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/diegopetrucci__pi-extensions 是否存在。

@diegopetrucci/pi-extensions 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.19.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@diegopetrucci/pi-extensions 可以商用吗?

@diegopetrucci/pi-extensions 使用 MIT AND Apache-2.0 许可。声明的许可为 MIT AND Apache-2.0,请阅读许可原文确认使用条件。以上为概括,不构成法律意见,请以许可原文为准。

@diegopetrucci/pi-extensions 的下载量有多少?

根据 npm 官方下载统计,@diegopetrucci/pi-extensions 在 2026/10/12 – 2026/11/10 这 30 天内被下载 3,028 次,日均约 101 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@diegopetrucci/pi-extensions 还在维护吗?

最新版本 0.1.86 发布于 2026/11/11(1 天前);至今共发布 79 个版本,其中过去 12 个月发布了 79 个;首次发布于 2026/04/16。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。