pi-plan

pi-plan is a command for Claude Code from tznthou/claude-prism. It costs 78 tokens per session (3,260 once invoked), scanned B, original, MIT.

A planning command for complex implementation work that gathers architectural views from Codex and Gemini. It is intended for decisions with several reasonable approaches.

In plain words
What is it for?
Use it for architecture decisions, technology selection, migrations, and other implementation plans where outside perspectives may help.
Why use it?
It helps compare technical options before committing to a design, migration path, or technology choice.

Command for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: reads .claude/ paths; mentions subagents; names the AskUserQuestion tool.

Good fit Use it for architecture decisions, technology selection, migrations, and other implementation plans where outside perspectives may help.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/tznthou/claude-prism/pi-plan
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.

Clone the repo
git clone --depth 1 https://github.com/tznthou/claude-prism

Made for: Claude Code.

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-plan

README.md
[![agentmods](https://agentmods.dev/badge/commands/tznthou/claude-prism/pi-plan/github.svg)](https://agentmods.dev/commands/tznthou/claude-prism/pi-plan)
Your own site
<a href="https://agentmods.dev/commands/tznthou/claude-prism/pi-plan"><img src="https://agentmods.dev/badge/commands/tznthou/claude-prism/pi-plan/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-plan

Your own site · 80×15
<a href="https://agentmods.dev/commands/tznthou/claude-prism/pi-plan"><img src="https://agentmods.dev/badge/commands/tznthou/claude-prism/pi-plan.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 78 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,260 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe.
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.00078 $0.03260
Opus 5 $0.00039 $0.01630
Sonnet 5 $0.00016 $0.00652
Haiku 4.5 $0.00008 $0.00326

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

Security

Grade B, and why

pi-plan scanned grade B with 1 finding 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 9d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

cat > ".claude/pi-plans/<slug>.md" << 'PLAN_EOF'
commands/pi-plan.md · 234 lines

How it starts

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

Plan Generation

Analyze the codebase and generate a structured implementation plan with cross-provider architectural consultation. Use this when multiple viable approaches exist and external perspectives add value — not for simple task breakdown.

Execution

Dispatch rules (v0.13.0+): For parallel provider consultation, use the Agent tool with subagent_type: "general-purpose" to spawn two parallel sub-agents — NOT two Bash tool calls in a single main-conversation response. Main-conversation Bash is a structural FIFO queue: the second Bash waits for the first to finish (delta ≈ first_exec precisely, measured N=7 across two capacity slots), which defeats the parallel intent. Sub-agent fan-out dispatches Bash calls truly in parallel (median delta 2.8s, N=13), saving roughly 28% wall-clock on a two-provider call.

Inside each sub-agent, run call-codex.sh / call-gemini.sh in foreground synchronous mode with timeout: 600000 (Bash tool's 10-minute ceiling). Do not use &, nohup, or run_in_background: true — Claude Code 2026-04+ has an auto-background child-lifecycle regression that silently kills the child (output file stays 0 bytes). If a sub-agent's Bash returns empty stdout, the Bash template below falls back to reading the caller-owned $OUT_PATH file (v0.14.3+, wrapper tees here via CLAUDE_PRISM_OUT_TMP).

1. Parse arguments

$ARGUMENTS is the task description. If it's too vague (less than ~10 words and no clear objective), use AskUserQuestion to clarify:

  • What is the desired end state?
  • Are there constraints (tech stack, scope)?
  • Should external providers be consulted? (default: yes if available)

2. Analyze the codebase

Use Read, Glob, and Grep tools to understand the current state:

  • Project structure and key directories
  • Relevant existing code (files related to the task)
  • Dependencies and configuration
  • Existing tests and CI setup

3. Detect domain

If there are existing files that will be modified, detect the domain:

Read the full file on GitHub · 234 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. 9d ago First seen · 234 lines · 78 tokens per session scan B 7f4181894b49

Subscribe to this mod's changes

pi-plan is a command published in the GitHub repository tznthou/claude-prism (10 stars, last pushed today), licensed MIT. It adds 78 tokens to every session and 3,260 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.