pi

pi is a skill for Claude Code, Codex from znlgis/opengis-skills. It costs 35 tokens per session (1,371 once invoked), scanned A, original, MIT.

A small, extensible terminal-based AI coding agent and runtime written in TypeScript. A monorepo is one repository containing several related packages, which this project uses.

In plain words
What is it for?
Use it for multi-step coding tasks in a terminal, building custom agents, adding extensions or skills, switching model providers, and running the project in isolated environments.
Why use it?
It provides one place to understand the agent’s packages, setup, build checks, model connections, and extension system.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for multi-step coding tasks in a terminal, building custom agents, adding extensions or skills, switching model providers, and running the project in isolated environments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/znlgis/opengis-skills/pi
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add znlgis/opengis-skills --skill pi
Clone the repo
git clone --depth 1 https://github.com/znlgis/opengis-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pi

README.md
[![agentmods](https://agentmods.dev/badge/skills/znlgis/opengis-skills/pi/github.svg)](https://agentmods.dev/skills/znlgis/opengis-skills/pi)
Your own site
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/pi"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/pi/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pi

Your own site · 80×15
<a href="https://agentmods.dev/skills/znlgis/opengis-skills/pi"><img src="https://agentmods.dev/badge/skills/znlgis/opengis-skills/pi.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 35 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,371 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00035 $0.01371
Opus 5 $0.00017 $0.00685
Sonnet 5 $0.00007 $0.00274
Haiku 4.5 $0.00003 $0.00137

Measured 11d ago against content hash fb7f5b7ead6d, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

pi scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 11d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

ai/pi/SKILL.md · 165 lines

How it starts

The opening of the file, as written. The whole thing — 165 lines — stays where its author put it; the contents beside it link to each section on GitHub.

项目地址: https://github.com/earendil-works/pi

官网 / 文档: https://pi.devhttps://pi.dev/docs/latest

最新发布: 参见 GitHub Releases

许可证: MIT 最新版本: 参见 npm

概述

Pi 是一个面向工程化场景的 Agent Harness,不仅是单一 CLI。

  • @earendil-works/pi-coding-agent:交互式终端编码 Agent
  • @earendil-works/pi-agent-core:Agent 运行时(工具调用 + 状态管理)
  • @earendil-works/pi-ai:统一多模型 Provider API
  • @earendil-works/pi-tui:终端 UI 渲染库

适用场景:

  • 终端内多步代码任务(读改代码、执行命令、追踪上下文)
  • 自建可扩展 Agent(Extensions / Skills / Prompt Templates)
  • 需要模型供应商可替换、可审计、可容器化的团队环境

环境与安装

前置要求

  • Node.js >=22.19.0
  • npm(或等价 Node 包管理器)

常用安装方式

# 全局安装 coding agent CLI
npm install -g @earendil-works/pi-coding-agent

# 验证版本
pi --version

如需源码开发:

git clone https://github.com/earendil-works/pi.git
cd pi
npm install --ignore-scripts
npm run build

上游仓库是 monorepo,官方开发流程以 npm install --ignore-scriptsnpm run buildnpm run check 为主。


核心能力速览

能力 说明
多模型统一接入 OpenAI / Anthropic / Google 等 Provider 统一抽象
Agent 运行时 工具调用、会话状态、任务分解与执行
CLI + TUI 终端交互式编码体验,适配日常研发流程
可扩展机制 Extensions、Skills、Prompt 模板、主题
容器化方案 Gondolin / Docker / OpenShell 等隔离模式
工程化发布 Monorepo + release 流程 + 依赖锁定策略

命令参考

Pi 是最小化的 Agent Harness,CLI 主要用于验证安装。以下为基本探测命令:

pi --help
pi --version

开发仓库常用校验命令(在 pi 源码目录):

npm run build
npm run check
npm run test

典型工作流

1) 本地终端编码助手

  1. 在项目目录启动 pi
  2. 让 Agent 分析需求并分步执行
  3. 审阅改动与命令输出
  4. 人工确认后提交

2) 团队扩展能力

  1. 基于 Extensions 定义团队工具接入方式
  2. 把可复用提示流程沉淀为 Skills
  3. 在仓库内版本化管理配置,确保团队一致性

3) 强隔离执行

  1. 对高权限任务采用容器/沙箱模式
  2. 将内置工具与 ! 命令路由到隔离环境
  3. 保留宿主机 Provider 凭据与审计链路

安全与最佳实践

Pi 默认继承启动进程权限,不自带强制权限沙箱。生产建议:

  • 对不受信任的任务启用容器化(Docker / Gondolin / OpenShell)
  • 将敏感凭据放在最小权限环境变量中
  • 固定依赖版本并审查 lockfile 变更
  • 在 CI 中执行 npm ci --ignore-scripts + 安全审计

常见问题(FAQ)

Read the full file on GitHub · 165 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 11d ago First seen · 165 lines · 35 tokens per session scan A fb7f5b7ead6d

Subscribe to this mod's changes

pi is a skill published in the GitHub repository znlgis/opengis-skills (60 stars, last pushed yesterday), licensed MIT. It adds 35 tokens to every session and 1,371 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.