K-Dense-AI/scientific-agent-skills/skills/pi-agent/SKILL.md
pi-agent
Build with and use Pi, the minimal terminal coding harness. Use for installing Pi, configuring providers/models/settings/environment variables, creating Pi skills/extensions/packages/themes/prompt templates, embedding Pi through the SDK, integrating over RPC or JSON event streams, parsing sessions, running local models through the llama.cpp router, developing custom Pi providers and TUI components, or using ecosystem packages such as pi-subagents (delegation/orchestration), pi-mcp-adapter (MCP s
- Source repository stars
- 31,966
- Declared platforms
- 0
- Static risk flags
- 3
- Last source update
- 2026-07-28
- Source checked
- 2026-07-28
Decision brief
What it does—and where it fits
Use this skill when the user wants to operate Pi or build on top of Pi. Pi is a minimal terminal coding harness extended through TypeScript extensions, skills, prompt templates, themes, packages, custom models/providers, SDK integrations, RPC mode, JSON event streams, and TUI co…
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/K-Dense-AI/scientific-agent-skills --skill "skills/pi-agent"Inspect the Agent Skill "pi-agent" from https://github.com/K-Dense-AI/scientific-agent-skills/blob/e7ac42510774624f327003c95b6650e2883bc01d/skills/pi-agent/SKILL.md at commit e7ac42510774624f327003c95b6650e2883bc01d. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
First Decision
Pick the reference before answering or coding:
Pick the reference before answering or coding: - 02
Build-On-Pi Defaults
Prefer the SDK for Node/TypeScript apps that need type safety, direct state access, in-process custom tools/extensions, or custom resource loading. Use createAgentSession() for a single stable session; use createAgentSessionRuntime() when the app must replace sessions through ne…
Prefer the SDK for Node/TypeScript apps that need type safety, direct state access, in-process custom tools/extensions, or custom resource loading. Use createAgentSession() for a single stable session; use createAgentSe…Prefer RPC mode when the client is not Node.js, needs process isolation, or wants a language-agnostic JSONL protocol. Start with pi --mode rpc --no-session for stateless subprocess integration, then add session flags wh…Prefer JSON mode for one-shot command-line pipelines that only need streamed events, not bidirectional control: pi --mode json "prompt". - 03
Safety Defaults
Pi is local and not sandboxed by default. Treat extensions, packages, skills, shell commands, and project-local .pi resources as code with the permissions of the Pi process. Project trust only guards which project inputs load — it is not a sandbox. For untrusted repos or unatten…
Pi is local and not sandboxed by default. Treat extensions, packages, skills, shell commands, and project-local .pi resources as code with the permissions of the Pi process. Project trust only guards which project input…Do not store secrets in project files. Prefer env vars, /.pi/agent/auth.json, OAuth via /login, or command-backed secret lookups in models.json/provider config. - 04
Common Commands
Review the “Common Commands” section in the pinned source before continuing.
Review and apply the “Common Commands” source section. - 05
Source Coverage
These references summarize the Pi documentation at https://pi.dev/docs/latest and every docs page found under it as of this skill version, plus the package pages for pi-subagents, pi-mcp-adapter, pi-interview, and pi-web-access at https://pi.dev/packages/. Package details were c…
These references summarize the Pi documentation at https://pi.dev/docs/latest and every docs page found under it as of this skill version, plus the package pages for pi-subagents, pi-mcp-adapter, pi-interview, and pi-we…
Permission review
Static risk signals and limitations
Network access
The documentation includes network, browsing, or remote request actions.
| Web search, URL/PDF/repo fetching, video understanding | `references/pi-web-access.md` |Runs scripts
The documentation asks the agent to run terminal commands or scripts.
npm install -g --ignore-scripts @earendil-works/pi-coding-agentReads files
The documentation asks the agent to read local files, directories, or repositories.
pi --tools read,grep,find,ls -p "Review this repository"Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 73/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 31,966 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- K-Dense-AI/scientific-agent-skills
- Skill path
- skills/pi-agent/SKILL.md
- Commit
- e7ac42510774624f327003c95b6650e2883bc01d
- License
- MIT
- Collected
- 2026-07-28
- Default branch
- main
View the original SKILL.md
Pi Agent
Use this skill when the user wants to operate Pi or build on top of Pi. Pi is a minimal terminal coding harness extended through TypeScript extensions, skills, prompt templates, themes, packages, custom models/providers, SDK integrations, RPC mode, JSON event streams, and TUI components.
First Decision
Pick the reference before answering or coding:
| User intent | Read |
|---|---|
| What Pi is, docs map, install methods | references/overview.md |
| Install, authenticate, first run | references/quickstart.md |
| Day-to-day CLI usage, commands, modes, flags, project trust | references/usage.md |
| Provider auth, API keys, cloud provider setup | references/providers.md |
| Custom model entries, local models, proxies, compat flags | references/models.md |
Local llama.cpp router, /llama, model download/load | references/llama-cpp.md |
| Settings keys and defaults | references/settings.md |
PI_* and other environment variables | references/environment-variables.md |
| Extension development, custom tools, events, commands | references/extensions.md |
| Custom provider implementation, OAuth, custom streaming | references/custom-provider.md |
| Embed Pi in Node/TypeScript | references/sdk.md |
| Integrate from another process/language | references/rpc.md |
| Consume JSONL event output | references/json.md |
| Build terminal UI components | references/tui.md |
| Package extensions/skills/prompts/themes | references/packages.md |
| Delegate to subagents, chains, parallel runs, orchestration | references/pi-subagents.md |
| Connect MCP servers, MCP tool discovery/config | references/pi-mcp-adapter.md |
| Interactive interview forms, structured user input | references/pi-interview.md |
| Web search, URL/PDF/repo fetching, video understanding | references/pi-web-access.md |
| Author Pi skills | references/skills.md |
| Prompt templates or themes | references/prompt-templates.md, references/themes.md |
| Sessions, branching, compaction, parsing JSONL | references/sessions.md, references/compaction.md, references/session-format.md |
| Security, sandboxing, trust | references/security.md, references/containerization.md |
| Keyboard or terminal issues | references/keybindings.md, references/terminal-setup.md, references/tmux.md, references/windows.md, references/termux.md, references/shell-aliases.md |
| Working on Pi itself | references/development.md |
Build-On-Pi Defaults
Prefer the SDK for Node/TypeScript apps that need type safety, direct state access, in-process custom tools/extensions, or custom resource loading. Use createAgentSession() for a single stable session; use createAgentSessionRuntime() when the app must replace sessions through new/resume/fork/clone/import flows. Auth and model lookup go through ModelRuntime.create().
Prefer RPC mode when the client is not Node.js, needs process isolation, or wants a language-agnostic JSONL protocol. Start with pi --mode rpc --no-session for stateless subprocess integration, then add session flags when persistence matters. Split records on \n only — Node readline is not protocol-compliant.
Prefer JSON mode for one-shot command-line pipelines that only need streamed events, not bidirectional control: pi --mode json "prompt".
Use extensions for Pi-native behavior: custom tools, command handlers, event hooks, provider registration, custom compaction, path protection, project trust policy, UI prompts, widgets, and TUI components.
Use packages when sharing or installing reusable extensions, skills, prompt templates, or themes across machines or projects.
Safety Defaults
Pi is local and not sandboxed by default. Treat extensions, packages, skills, shell commands, and project-local .pi resources as code with the permissions of the Pi process. Project trust only guards which project inputs load — it is not a sandbox. For untrusted repos or unattended automation, isolate with Docker, OpenShell, Gondolin, a VM, or a remote sandbox.
Do not store secrets in project files. Prefer env vars, ~/.pi/agent/auth.json, OAuth via /login, or command-backed secret lookups in models.json/provider config.
Common Commands
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
pi
pi -p "Summarize this codebase"
pi --mode json "List files"
pi --mode rpc --no-session
pi --provider anthropic --model claude-sonnet-4-5
pi --model sonnet:high "Solve this complex problem"
pi --tools read,grep,find,ls -p "Review this repository"
pi install npm:pi-subagents
pi update --all
Source Coverage
These references summarize the Pi documentation at https://pi.dev/docs/latest and every docs page found under it as of this skill version, plus the package pages for pi-subagents, pi-mcp-adapter, pi-interview, and pi-web-access at https://pi.dev/packages/. Package details were cross-checked against the published npm READMEs (pi-web-access 0.14.0, pi-mcp-adapter 2.15.0, pi-subagents 0.37.0, pi-interview 0.9.0). When exact API behavior matters, prefer the cited reference page and inspect installed TypeScript definitions under node_modules/@earendil-works/pi-coding-agent/dist/ and node_modules/@earendil-works/pi-ai/dist/.
Alternatives
Compare before choosing
coreyhaines31/marketingskills
ab-testing
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
event4u-app/agent-config
design-intelligence
Grounded design brief from the adopted corpus — style, WCAG-checked color tokens, typography, layout pattern, anti-patterns. Use on ui-design-brief or any which-style/palette/font/chart decision.
event4u-app/agent-config
existing-ui-audit
Use BEFORE writing or editing any non-trivial UI — inventories components, design tokens, shadcn primitives, and reusable patterns into state.ui_audit. Hard gate for the ui directive set.
event4u-app/agent-config
testing-anti-patterns
Use BEFORE writing/changing tests, adding mocks, or test-only methods on production classes — vs mocking-the-mock, production pollution, partial mocks, and overfit/tautological assertions