prime

prime is a command for Claude Code from disler/pi-agent-observability. It costs 21 tokens per session (992 once invoked), scanned A, original, MIT.

A context-loading command for a project that includes a coding-agent observability system and a Steelman product demo. It reads the project structure, documentation, and task commands so the agent understands how the parts fit together.

In plain words
What is it for?
Use it at the beginning of a task in this project. It prepares context about the observability extension, Bun server, browser interface, and Steelman application.
Why use it?
It avoids starting work without knowing the project’s architecture, current status, or standard commands. This gives the agent the background needed to work across both applications.

Command for Claude Code

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/disler/pi-agent-observability/prime
Clone the repo
git clone --depth 1 https://github.com/disler/pi-agent-observability

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 prime

README.md
[![agentmods](https://agentmods.dev/badge/commands/disler/pi-agent-observability/prime.svg)](https://agentmods.dev/commands/disler/pi-agent-observability/prime)
Your own site
<a href="https://agentmods.dev/commands/disler/pi-agent-observability/prime"><img src="https://agentmods.dev/badge/commands/disler/pi-agent-observability/prime.svg" alt="Measured on agentmods" height="20"></a>
Per session 21 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 992 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.00021 $0.00992
Opus 5 $0.00010 $0.00496
Sonnet 5 $0.00004 $0.00198
Haiku 4.5 $0.00002 $0.00099

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

Security

Grade A, and why

prime 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 4d 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.

.claude/commands/prime.md · 20 lines

How it starts

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

Purpose

Build foundational understanding of two cooperating projects in one tree: a Pi coding-agent observability framework (extension → Bun HTTP+SSE+SQLite server → vanilla-JS UI with Form/Function modes, agent subnav, swimlane), and apps/steelman — a Bun + Vue product app that embeds a Pi agent in --mode rpc with two extensions and renders chat-linked investment-analysis artifacts.

Workflow

  1. Run git ls-files 2>/dev/null || find . -type f -not -path '*/node_modules/*' -not -path '*/dist/*' -not -path '*/.playwright-cli/*' -not -path '*/storage/runs/*' -not -path '*/.sessions/*' -not -path '*/backups/*' -not -path '*/ai_docs/*' -not -path '*/images/*' -not -name 'obs*.db*' -not -name '*.log' | sort using the Bash tool to see the file tree
  2. Read README.md and docs/V3-STATUS.md using the Read tool (top-level architecture, quick-start, shipped v3 state, validation posture, build credits)
  3. Read justfile using the Read tool (canonical service-boot orchestration grouped OBSERVABILITY / STEELMAN / AGENTS / EXTRA: obs, all (optional watch arg → bun --watch), steelman-server, steelman-server-watch, steelman-web, agent, validate-steelman, build-steelman-web — recipes use exec env so SIGTERM cleanup hits real PIDs)
  4. Read shared/types.ts using the Read tool (canonical observability wire format — ObsEvent envelope + 16 event types incl. compaction / branch_nav; AssistantMessagePayload carries latency_ms / prefill_ms / generation_ms / output_tps / usage.{input,output,cache_read,cache_write,total_tokens,cost_total})
  5. Read extension/pi-observability.ts, apps/observability/server.ts, and apps/observability/db.ts using the Read tool (Pi event subscriptions incl. message_update for TTFT, ingestion, SQLite persistence, REST /sessions/:id/{events,stats} + SSE /events/stream)
  6. Read apps/observability/public/index.html, apps/observability/public/app.js, and apps/observability/public/swimlane.js using the Read tool (vanilla-JS UI — body.layout-form vs layout-function mode CSS lives in index.html, including the Form-mode pill-emoji map; app.js owns STATE, single-mode rendering, agent subnav with cost/tokens/cache/TPS/prefill/context; swimlane.js owns multi-lane rendering with sticky-to-bottom MutationObserver + 250ms re-anchor interval)
  7. Read apps/steelman/README.md, then skim apps/steelman/extension/steelman-product.ts, apps/steelman/extension/STEELMAN_AGENT_SYSTEM_PROMPT.md, apps/steelman/server/src/server.ts, apps/steelman/web/src/App.vue, and apps/steelman/web/src/markdown.ts using the Read tool (product demo: Pi RPC defaulting to gemini-3.5-flash with both observability + product extensions; the agent's behavior contract lives in the externalized STEELMAN_AGENT_SYSTEM_PROMPT.md — loaded at runtime — covering aggressive inline citations and 8 steelman_emit_artifact kinds text/table/bar-chart/pie-chart/trend/scorecard/risk-map/html with dark-theme rules for html; steelman_research captures source URLs that render as a collapsed per-response "References" proof; Vue two-pane UI renders markdown chat with clickable @refs (via markdown.ts marked extension) and the artifacts pane; STEELMAN_OBS_VIEW deep-link control)
  8. Read scripts/validate-swimlane.ts and apps/steelman/scripts/validate-steelman.ts using the Read tool (T1–T4 SSE resync + DOM stress + URL state regression suite, and Steelman mock-mode end-to-end validation)
  9. Summarize your understanding of the project: purpose, stack, structure, key files, entry points (via just …), validation commands, and how the observability framework and Steelman product app work together through coordinated extension loading

Read the full file on GitHub · 20 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. 4d ago First seen · 20 lines · 21 tokens per session scan A 1d575e90847c

Subscribe to this mod's changes

prime is a command published in the GitHub repository disler/pi-agent-observability (143 stars, last pushed 3mo ago), licensed MIT. It adds 21 tokens to every session and 992 once invoked, about $0.0001 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.