pi

A task runner that lets one coding agent send work or validation requests to Pi CLI, another command-line coding agent. It chooses whether to delegate work or ask for a second opinion based on the prompt.

In plain words
What is it for?
Use it to offload coding tasks, cross-check implementation plans, or review architecture with Pi.
Why use it?
It reduces the need to rely on one agent for code, plans, or architecture decisions. It also checks which models Pi can use at runtime.

Skill for Claude CodeCodex

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.

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

Made for: Claude Code, Codex.

Per session 78 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 235 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00078 $0.00235
Opus 5 $0.00039 $0.00118
Sonnet 5 $0.00016 $0.00047
Haiku 4.5 $0.00008 $0.00023

Measured 2d ago against content hash 4b22d38bdde0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

pi/SKILL.md · 28 lines

What it actually says

Cross-Agent Task Runner — Pi CLI

Procedures

Step 1: Self-Call Detection

  1. Check for PI_AGENT environment variable or pi in process ancestry.
  2. If detected, stop and inform the user: "Cannot invoke Pi from within Pi. Use a different target CLI."

Step 2: Execute Shared Procedure

  1. Read references/shared-procedure.md for the core workflow (mode inference, context gathering, prompt construction, result presentation).
  2. Read references/cli-pi.md for Pi-specific flags, model selection heuristics, and version compatibility matrix.
  3. Follow the shared procedure using the Pi-specific details.
Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 2d ago First seen · 28 lines · 78 tokens per session scan A 4b22d38bdde0

Subscribe to this mod's changes

pi is a skill published in the GitHub repository darshitpp/x-agent (2 stars, last pushed 23d ago), licensed MIT. It adds 78 tokens to every session and 235 once invoked, about $0.0004 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-31.

Related

Other skills, from other repositories

cocobehavior

Cortex-specific behavioral guidelines — always-on inner constraint layer for all CocoPlus personas.

Snowflake-Labs/cocoplus · 22 tokens

skill-enhance

Full enhancement pipeline for an existing Lattice skill — rewrites a molecule or atom to modern-capable-model grade: restores degraded grammar, deduplicates, hardens gates and branching to one-unambiguous-action precision, verifies zero behavioral loss against a pre-capture diff, then runs the combined QA gate…

techygarg/lattice · 198 tokens

skill-forge

Create a new Lattice skill — atom, molecule, or refiner — following all framework conventions. Writing skill files manually almost always produces convention violations: wrong section order, missing confirmation gates, defaults.md without the right structure. This skill knows all of that and guides you through it. Use…

techygarg/lattice · 139 tokens

skill-tighten

Audit any Lattice SKILL.md for language compliance — removes rationale prose, converts soft language to imperatives, adds STOP: gates on hard rules, and cuts redundant repetition. Complements skill-review (which finds behavioral gaps) by fixing phrasing that causes agents to skip or underweight instructions at…

techygarg/lattice · 123 tokens

skill-validate

Validate any Lattice SKILL.md against all tier conventions — atoms, molecules, and refiners. Catches structural errors, broken cross-references, and convention violations before they reach the repo. If you just wrote or modified a Lattice skill file and haven't run this yet, run it now — manual review consistently…

techygarg/lattice · 143 tokens

folded-memory-implementation

Developer implementation guide for building hierarchical (folded) memory into an Agent. Three-layer architecture where recent turns stay detailed, older content compresses into episodes, and the oldest distills into durable semantic facts. Use when compact-memory-implementation is not retaining enough, or when agents…

simbajigege/book2skills · 70 tokens