Configuration
Config file
Section titled “Config file”Prism stores configuration in ~/.prism/config.json:
{ "apiKey": "gck_your_key_here", "prismThreshold": 4, "enableGateway": true}| Field | Type | Default | Description |
|---|---|---|---|
apiKey | string | — | Your gck_* API key (required) |
prismThreshold | number | 4 | Minimum PQ score (0–10). Prompts below this trigger rewrite suggestions |
enableGateway | boolean | true | Route requests through Optra gateway for budget enforcement |
The config file is created by /prism:setup with permissions 600 (owner read-write only).
API key
Section titled “API key”Your gck_* key authenticates all requests to the Prism backend. Get one from the dashboard.
/prism:setup gck_YOUR_API_KEYThe key is used for:
- OTLP telemetry ingestion (ingest service)
- PRISM score queries (engine)
- Prompt capture and analytics
Gateway routing
Section titled “Gateway routing”Gateway routing controls whether your Claude API requests pass through the Optra gateway:
- Enabled (default) — requests route through the gateway, enabling budget enforcement, guardrails, and usage tracking
- Disabled — requests go directly to Anthropic; only OTEL telemetry is captured
Toggle gateway routing:
/prism:status toggleWhen enabled, the plugin sets:
ANTHROPIC_BASE_URL— points to the Optra gatewayANTHROPIC_CUSTOM_HEADERS— includes your API key for authentication
PRISM threshold
Section titled “PRISM threshold”The threshold controls when the prompt advisor intervenes:
| Score Range | Behavior |
|---|---|
| Below threshold | Shows rewrite suggestion with coaching tips |
| 4.0 – 6.0 | Shows light improvement suggestions |
| Above 6.0 | Silent pass (no intervention) |
Adjust the threshold in your config:
{ "prismThreshold": 5}Higher values = more coaching interventions. Lower values = only catches the worst prompts.
OTEL telemetry
Section titled “OTEL telemetry”The plugin automatically configures OpenTelemetry export in ~/.claude/settings.json:
{ "env": { "OTEL_EXPORTER_OTLP_LOGS_ENDPOINT": "https://ingest.prism.optra-ai.com/v1/logs", "OTEL_EXPORTER_OTLP_METRICS_ENDPOINT": "https://ingest.prism.optra-ai.com/v1/metrics", "OTEL_EXPORTER_OTLP_TRACES_ENDPOINT": "https://ingest.prism.optra-ai.com/v1/traces" }}These are synced on every session start. The plugin resolves the correct URLs from the config endpoint based on your API key.
URL resolution
Section titled “URL resolution”Service URLs are resolved automatically — you don’t need to configure them manually. The resolution order is:
- Environment variable override (e.g.,
PRISM_INGEST_URL) - Cached config (refreshed every 24 hours)
- Config endpoint lookup (using your API key)
- Error if none available
For local development, override with environment variables:
export PRISM_INGEST_URL=http://localhost:9005