Records Claude Code sessions as agent trajectories in cxdb
npx claudepluginhub prime-radiant-inc/claude-plugin-cxdb-integrationAutomatic tracing of Claude Code sessions to Arize AX or Phoenix with OpenInference spans. Supports 9 hooks for comprehensive observability.
Session analytics hook for Claude Code — 15 configurable sections (models, cost, cache, tools, files, git diff, RTK savings...)
Debug logger for cctop — logs full hook event payloads to per-session JSONL files for troubleshooting and feature ideation.
Efficient skill management system with progressive discovery — 410+ production-ready skills across 33+ domains
Open-source, local-first Claude Code plugin for token reduction, context compression, and cost optimization using hybrid RAG retrieval (BM25 + vector search), reranking, AST-aware chunking, and compact context packets.
Matches all tools
Hooks run on every tool call, not just specific ones
Share bugs, ideas, or general feedback.
Records every Claude Code session as structured turns in cxdb — a turn-DAG context store for AI agent trajectories. Browse full session histories, tool calls, token usage, and reasoning in the cxdb UI.
In the cxdb repo:
make dev-docker-up
Starts cxdb in Docker. Frontend at http://localhost:9080 · API at http://localhost:9010
git clone https://github.com/prime-radiant-inc/claude-plugin-cxdb-integration
cd claude-plugin-cxdb-integration
make install
Sessions started after installation are recorded automatically. Open http://localhost:9080 to watch them appear in real time.
Seven Claude Code hooks record the full session lifecycle:
| Hook | cxdb item_type | Notes |
|---|---|---|
SessionStart | system (info) | Creates context, publishes type bundle, writes ContextMetadata + Provenance |
UserPromptSubmit | user_input | Captures user message text (async) |
PostToolUse | (buffered) | Buffers tool call + result to session state — no cxdb write yet |
Stop | assistant_turn | Flushes buffered tool calls; parses transcript for text + token metrics |
SubagentStop | handoff | Records agent-to-agent handoffs for Task tool calls |
PreCompact | system (warning) | Notes when context window compaction occurs (async) |
Notification | system (info) | Records Claude Code notifications (async) |
Tool call results are captured per tool type — each tool's response has a different structure:
| Tool | Content captured |
|---|---|
Bash | stdout (+ stderr if non-empty) |
Read | File contents (capped at 4000 chars) |
Glob | Matched file paths |
Grep | Matched file paths or content lines |
Edit | "Edited <filepath>" |
Task | Subagent's final text output (capped at 4000 chars) |
WebFetch / WebSearch | Generic fallback |
All cxdb writes are fire-and-forget — if cxdb is unreachable, your Claude Code session continues normally.
Create ~/.claude/cxdb-observability.local.md with YAML frontmatter:
url: http://cxdb.your-tailnet.ts.net:9010
Or set the CXDB_URL environment variable before starting Claude Code.
URL resolution order:
$CXDB_URL environment variableurl: field in ~/.claude/cxdb-observability.local.mdhttp://localhost:9010 (default)Each session produces a chain of cxdb.ConversationItem turns:
system (info) ← Session Started, with ContextMetadata + Provenance
user_input ← "Write a function that..."
assistant_turn ← Text + tool calls (Bash, Read, Edit, ...) + token metrics
user_input ← "looks good, now add tests"
assistant_turn
...
Provenance fields captured per session:
make install # registers plugin in ~/.claude/plugins/installed_plugins.json
make uninstall # removes it
Apache 2.0 — see LICENSE.
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge.
Sign in to claim