visualize

A command that opens a local browser-based viewer for PI decision history. It uses saved decision data on the computer and can also start a local development or production server.

In plain words
What is it for?
Use it to view decision history, create an offline HTML report, run a local preview, choose another decisions folder, or use it in headless or CI workflows.
Why use it?
It makes past agent decisions easier to inspect than reading archived files directly, while keeping the data local.

Command

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 commands/share-skills/pi/visualize
Clone the repo
git clone --depth 1 https://github.com/share-skills/pi
Per session 39 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 840 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 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.00039 $0.00840
Opus 5 $0.00019 $0.00420
Sonnet 5 $0.00008 $0.00168
Haiku 4.5 $0.00004 $0.00084

Measured 2d ago against content hash 1e9cc1c2b0d6, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

visualize scanned grade C with 2 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.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

- Else, fail and tell the user to run `curl -fsSL https://raw.githubusercontent.com/share-skills/pi/main/scripts/setup-standalone-visualize.sh | bash`.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

- Else, fail and tell the user to run `curl -fsSL https://raw.githubusercontent.com/share-skills/pi/main/scripts/setup-standalone-visualize.sh | bash`.
commands/visualize.md · 89 lines

How it starts

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

PI Visualize Command

Launch the local PI decision-history visualizer backed by visualize/.

Behavior

  1. Locate the visualizer tool:
    • If ./visualize/package.json exists in the current workspace, use ./visualize.
    • Else if ~/.pi/visualize.sh exists, use that directly.
    • Else if ~/.pi/visualize/visualize exists and contains package.json, use that.
    • Else, fail and tell the user to run curl -fsSL https://raw.githubusercontent.com/share-skills/pi/main/scripts/setup-standalone-visualize.sh | bash.
      • The standalone bootstrap requires git and node/npm.
  2. Install dependencies and build if needed:
    • cd [detected-visualize-dir] && npm install && npm run build
  3. Run the visualizer:
    • Production server: cd [detected-visualize-dir] && npm run server (serves on port 3141)
    • Development mode: cd [detected-visualize-dir] && npm run dev
    • Or if using the wrapper: ~/.pi/visualize.sh [args]
  4. If the user provides additional flags, forward them exactly as provided.
    • Example: /visualize --no-open
  5. On success, report:
    • server URL (default: http://localhost:3141)
    • whether the browser auto-opened
    • session count and warning count from server output

Default behavior

  • source: ~/.pi/decisions
  • server port: 3141
  • browser: auto-open enabled

Live development mode

Use npm run dev when you want hot-reloading during development:

cd visualize && npm run dev
  • Vite dev server starts on an ephemeral port
  • Hot module replacement enabled
  • This is distinct from the production npm run server flow

Installation & Updates

The one-click PI installer now provisions ~/.pi/visualize.sh as a bootstrap launcher. The first run can set up the standalone runtime for you.

For standalone usage (without the full PI skill environment), you can also use the setup script directly:

curl -fsSL https://raw.githubusercontent.com/share-skills/pi/main/scripts/setup-standalone-visualize.sh | bash

Read the full file on GitHub · 89 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. 2d ago First seen · 89 lines · 39 tokens per session scan C 1e9cc1c2b0d6

Subscribe to this mod's changes

visualize is a command published in the GitHub repository share-skills/pi (108 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 39 tokens to every session and 840 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.