Architecture
How it works
Section titled “How it works”flowchart LR
A["🖥️ Claude Code\n+ Prism Plugin"] -- "telemetry\n& prompts" --> B["☁️ Optra Cloud"]
B -- "scores, insights\n& analytics" --> C["📊 Dashboard"]
style A fill:#4a9eff,stroke:#2b7de9,color:#fff
style B fill:#8b5cf6,stroke:#7c3aed,color:#fff
style C fill:#ec4899,stroke:#db2777,color:#fff
- The Prism plugin runs inside Claude Code and captures telemetry and prompt text as you work
- Data is sent securely to Optra Cloud, where it’s analyzed, scored, and stored
- You view results in the Dashboard — PRISM scores, usage analytics, waste detection, and recommendations
What the plugin captures
Section titled “What the plugin captures”The plugin sends two types of data, authenticated with your gck_* API key:
- Telemetry — token counts, response times, model usage, tool calls (via OpenTelemetry)
- Prompt text — your actual prompts, used for PRISM scoring and coaching
What happens in the cloud
Section titled “What happens in the cloud”Once your data arrives, Optra automatically:
- Scores your sessions using the PRISM framework (5 dimensions, 10 metrics)
- Detects waste patterns — retry storms, context bloat, model overkill, and more
- Identifies throttling — rate limits, elevated latency, request gaps
- Generates recommendations — model rightsizing, prompt improvements, budget tips
- Produces coaching notes — specific tips for your weakest dimension
What you see
Section titled “What you see”Results appear in two places:
In Claude Code (plugin commands)
Section titled “In Claude Code (plugin commands)”/prism:score— your PRISM profile with coaching tips/prism:cost— session token usage/prism:report— 30-day comprehensive review- Real-time prompt coaching on every submit
In the Dashboard
Section titled “In the Dashboard”- PRISM scores with radar chart and dimension drilldowns
- Token and cost analytics with daily trends
- Waste and throttle detection with savings estimates
- Actionable recommendations
- Session explorer with turn-by-turn detail
How it flows
Section titled “How it flows”sequenceDiagram
participant Dev as You
participant Plugin as Prism Plugin
participant Cloud as Optra Cloud
participant Dash as Dashboard
Dev->>Plugin: Write a prompt
Plugin->>Plugin: Score prompt quality
Plugin-->>Dev: Coaching tip (if PQ is low)
Dev->>Plugin: Continue coding...
Plugin->>Cloud: Send telemetry & prompts
Cloud->>Cloud: Analyze, score & detect patterns
Dev->>Dash: Check your analytics
Dash-->>Dev: Scores, insights & recommendations
Authentication
Section titled “Authentication”All communication uses your gck_* API key:
- The plugin includes your key on every request
- Optra validates the key and associates data with your organization
- Dashboard access uses your Supabase login (email/password or OAuth)
Your key is stored locally in ~/.prism/config.json with restricted file permissions.