Commands Reference
/prism:setup
Section titled “/prism:setup”Configure your API key and activate telemetry.
/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 projectWhat it does:
- Writes
apiKey,prismThreshold(default4), andenableGateway: trueto~/.prism/config.json(owner-only). - Fetches service URLs (ingest, gateway) from the server and caches them in
~/.prism/config-cache.json. - Detects the current config scope (
user,project,both, ornone). - Writes the OTEL env vars — including the
gck_*-embeddedOTEL_EXPORTER_OTLP_HEADERS— to the selected scope’s settings file:user→~/.claude/settings.jsonproject→$CLAUDE_PROJECT_DIR/.claude/settings.local.json(gitignored)
- 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.
/prism:status
Section titled “/prism:status”Show connection health, scope, and toggles.
/prism:statusDisplays:
- API key prefix (e.g.
gck_abc12…), or a setup prompt if missing. - Config scope —
user,project,both, ornone. Warns if OTEL vars appear in the shared.claude/settings.json, which indicates agck_*key may have been committed. - Gateway routing —
Gateway(default) orDirect, with the current gateway URL. - Status line — whether the submit hook prints a
[Prism]summary before each prompt (showStatusLinein 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.
/prism:cost
Section titled “/prism:cost”Show the current session’s turn count and duration, with a couple of inline tips.
/prism:costDisplays:
- Number of turns in this session
- Session duration (time since start)
- A
/compactreminder if turn count > 10 - A
/model sonnettip 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.
/prism:score
Section titled “/prism:score”View your PRISM profile with coaching, pulled from the latest insights report.
/prism:scoreIf 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):
- Composite score — the
compositeScoreandproficiencyLevelfrom the report. - 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.
- Bar chart — horizontal bars (
█/░) for every dimension, sorted low to high. - 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”; “
/compactevery 2–3 tasks”).
Ends with a dashboard link for trends and history.
/prism:report
Section titled “/prism:report”Comprehensive PRISM review pulled from the latest insights report.
/prism:reportData 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):
- Overview — period start/end, total sessions, total messages, active days, composite score, proficiency level.
- Trends — when the report has a time-series, shows first-vs-last deltas for
prismComposite,frictionRate,firstTryRate, andcostUsd, labeled improving / slow / stable / declining. - Strengths & weaknesses — dimensions with score > 7.0 (strengths) and < 5.0 (weaknesses).
- Habits — first-try rate (target > 70%) and top 3 recurring friction categories with mitigations.
- Worst prompts — the 5 lowest-scoring turns, with session ID, turn index, and a preview.
- 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.
/prism:advisor
Section titled “/prism:advisor”In-session prompt review. Works in any language — the advice is written back in the language of your prompt.
/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:
| Aspect | What it checks |
|---|---|
| Specificity | File paths, function names, line numbers, error text, expected behavior |
| Decomposition | One well-scoped task vs. bundled multi-task prompts |
| Iteration efficiency | Pattern of prior turns — convergence, constraint-adding, retry storms |
| Context hygiene | Turn 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.
/prism:help
Section titled “/prism:help”List all /prism:* commands grouped by category.
/prism:helpOutput 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.
/prism:uninstall
Section titled “/prism:uninstall”Remove the plugin, configuration, and telemetry settings.
/prism:uninstallSteps:
- Asks for confirmation.
- Removes OTEL env vars from both user and project config scopes (
~/.claude/settings.jsonand$CLAUDE_PROJECT_DIR/.claude/settings.local.json). - Deletes
~/.prism/(config, cache), the plugin cache, and the marketplace data. - Unregisters the marketplace (
claude plugin marketplace remove grumatic/optra-prism-plugin). - Reminds you to restart Claude Code.
After uninstalling, telemetry export stops and all plugin hooks deactivate. Your dashboard data is unaffected.