Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Commands Reference

Configure your API key and activate telemetry.

Terminal window
/prism:setup gck_YOUR_API_KEY
/prism:setup gck_YOUR_API_KEY --user # activate everywhere (default)
/prism:setup gck_YOUR_API_KEY --project # activate only in this project

What it does:

  1. Writes apiKey, prismThreshold (default 4), and enableGateway: true to ~/.prism/config.json (owner-only).
  2. Fetches service URLs (ingest, gateway) from the server and caches them in ~/.prism/config-cache.json.
  3. Detects the current config scope (user, project, both, or none).
  4. Writes the OTEL env vars — including the gck_*-embedded OTEL_EXPORTER_OTLP_HEADERS — to the selected scope’s settings file:
    • user~/.claude/settings.json
    • project$CLAUDE_PROJECT_DIR/.claude/settings.local.json (gitignored)
  5. Prompts before migrating if the requested scope differs from the current one (e.g. “Switching to user scope will enable telemetry in every project. Continue?”).

See Installation Scopes for the full scope rules.

Restart Claude Code afterwards — OTEL env vars are read at process start, so a running session won’t pick them up.


Show connection health, scope, and toggles.

Terminal window
/prism:status

Displays:

  • API key prefix (e.g. gck_abc12…), or a setup prompt if missing.
  • Config scopeuser, project, both, or none. Warns if OTEL vars appear in the shared .claude/settings.json, which indicates a gck_* key may have been committed.
  • Gateway routingGateway (default) or Direct, with the current gateway URL.
  • Status line — whether the submit hook prints a [Prism] summary before each prompt (showStatusLine in config).
  • Endpoints — ingest URL, gateway URL, OTEL logs/metrics endpoints (read from the cached config, not env vars).
  • Active features — OTEL telemetry, PRISM gate (with threshold), prompt capture, gateway routing (if on).
  • Session — turn count and duration, if a session state file exists.

Conversational toggles:

  • Say “toggle gateway” or “switch routing” → flips enableGateway. Restart Claude Code to apply.
  • Say “toggle status line”, “hide status line”, or “show status line” → flips showStatusLine. Restart Claude Code.

Show the current session’s turn count and duration, with a couple of inline tips.

Terminal window
/prism:cost

Displays:

  • Number of turns in this session
  • Session duration (time since start)
  • A /compact reminder if turn count > 10
  • A /model sonnet tip if you’re using Opus on simple tasks
  • A link to the dashboard (/my-usage) for a detailed cost breakdown — model mix, token efficiency, and per-session spend live there, not in this command.

If no session state exists yet, the command tells you data isn’t available until the first response in a session has completed.


View your PRISM profile with coaching, pulled from the latest insights report.

Terminal window
/prism:score

If you want to score a specific prompt, use /prism:advisor instead — this command is for the server-side profile across recent sessions.

Data source: GET /v1/insights/report (via the ingest proxy). If no report has been generated yet, the command tells you to run /prism:report (which triggers generation) or open the dashboard.

Displays (four sections):

  1. Composite score — the compositeScore and proficiencyLevel from the report.
  2. Weakest dimension with coaching — the lowest-scoring dimension with 2–3 coaching tips (preferring those with before/after examples). Also calls out the strongest dimension.
  3. Bar chart — horizontal bars (/) for every dimension, sorted low to high.
  4. Optimization advice — 2–3 concrete tips based on your profile (e.g. “reference exact file paths in every prompt”; “add constraints upfront to avoid correction turns”; “/compact every 2–3 tasks”).

Ends with a dashboard link for trends and history.


Comprehensive PRISM review pulled from the latest insights report.

Terminal window
/prism:report

Data source: GET /v1/insights/report. If no report exists, the command offers to generate one (POST /v1/insights/report/generate, runs up to ~120 seconds) and re-fetches when done.

Displays (six sections):

  1. Overview — period start/end, total sessions, total messages, active days, composite score, proficiency level.
  2. Trends — when the report has a time-series, shows first-vs-last deltas for prismComposite, frictionRate, firstTryRate, and costUsd, labeled improving / slow / stable / declining.
  3. Strengths & weaknesses — dimensions with score > 7.0 (strengths) and < 5.0 (weaknesses).
  4. Habits — first-try rate (target > 70%) and top 3 recurring friction categories with mitigations.
  5. Worst prompts — the 5 lowest-scoring turns, with session ID, turn index, and a preview.
  6. Cost optimization — total cost, wasted cost, potential savings, plus the top 3 rightsizing or waste actions from the report.

Ends with a single focus-area recommendation (from atAGlance.quickWins or the weakest dimension’s coaching) and a link to the full dashboard report.


In-session prompt review. Works in any language — the advice is written back in the language of your prompt.

Terminal window
/prism:advisor "your prompt text here"

If you don’t pass a prompt, the command offers to review your most recent turn or asks you to paste one.

Scope: this is a conceptual in-session read, not a rubric-graded score. It’s Claude-side and doesn’t call the server. The server-side scored version lives under /prism:score and /prism:report.

Displays:

  • A 0–10 Prompt Efficiency score with four aspect sub-scores
  • A bar chart of the four aspects
  • Weakest and strongest aspect with a coaching tip
  • Your original prompt
  • A concrete suggested rewrite using real file paths from the project
  • One or two sentences on why the rewrite is better

The four aspects scored:

AspectWhat it checks
SpecificityFile paths, function names, line numbers, error text, expected behavior
DecompositionOne well-scoped task vs. bundled multi-task prompts
Iteration efficiencyPattern of prior turns — convergence, constraint-adding, retry storms
Context hygieneTurn count, token growth, and model choice for the task

These are the terms the plugin uses in-session; they map loosely to the server-side PES dimensions (Context Leverage, Information Density, Turn Economy, Ambiguity Cost) but are not the same rubric.

Proficiency scale (plugin display): 9.0+ Elite · 7.0–8.9 Expert · 5.0–6.9 Proficient · 3.0–4.9 Practitioner · <3.0 Novice.

Anti-patterns flagged: retry storms, context dumping, multi-task bundling, blind acceptance, no planning, missing CLAUDE.md.

The command tailors its advice with your recent session metrics (turn count, token growth, response times, model mix), which the submit hook writes to ~/.prism/advisor-context.json. If that file is missing, it still works from the conversation alone.


List all /prism:* commands grouped by category.

Terminal window
/prism:help

Output is grouped into Setup & Config, During a Session, After a Session, and Automatic (hooks — no command needed), followed by a short getting-started block and links to the dashboard setup page and docs.


Remove the plugin, configuration, and telemetry settings.

Terminal window
/prism:uninstall

Steps:

  1. Asks for confirmation.
  2. Removes OTEL env vars from both user and project config scopes (~/.claude/settings.json and $CLAUDE_PROJECT_DIR/.claude/settings.local.json).
  3. Deletes ~/.prism/ (config, cache), the plugin cache, and the marketplace data.
  4. Unregisters the marketplace (claude plugin marketplace remove grumatic/optra-prism-plugin).
  5. Reminds you to restart Claude Code.

After uninstalling, telemetry export stops and all plugin hooks deactivate. Your dashboard data is unaffected.