Skip to content

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

Configuration

Prism stores configuration in ~/.prism/config.json:

{
"apiKey": "gck_your_key_here",
"prismThreshold": 4,
"enableGateway": true
}
FieldTypeDefaultDescription
apiKeystringYour gck_* API key (required)
prismThresholdnumber4Minimum PQ score (0–10). Prompts below this trigger rewrite suggestions
enableGatewaybooleantrueRoute requests through Optra gateway for budget enforcement

The config file is created by /prism:setup with permissions 600 (owner read-write only).

Your gck_* key authenticates all requests to the Prism backend. Get one from the dashboard.

Terminal window
/prism:setup gck_YOUR_API_KEY

The key is used for:

  • OTLP telemetry ingestion (ingest service)
  • PRISM score queries (engine)
  • Prompt capture and analytics

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:

Terminal window
/prism:status toggle

When enabled, the plugin sets:

  • ANTHROPIC_BASE_URL — points to the Optra gateway
  • ANTHROPIC_CUSTOM_HEADERS — includes your API key for authentication

The threshold controls when the prompt advisor intervenes:

Score RangeBehavior
Below thresholdShows rewrite suggestion with coaching tips
4.0 – 6.0Shows light improvement suggestions
Above 6.0Silent pass (no intervention)

Adjust the threshold in your config:

{
"prismThreshold": 5
}

Higher values = more coaching interventions. Lower values = only catches the worst prompts.

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.

Service URLs are resolved automatically — you don’t need to configure them manually. The resolution order is:

  1. Environment variable override (e.g., PRISM_INGEST_URL)
  2. Cached config (refreshed every 24 hours)
  3. Config endpoint lookup (using your API key)
  4. Error if none available

For local development, override with environment variables:

Terminal window
export PRISM_INGEST_URL=http://localhost:9005