trace-claude-code

Solid

Automatically trace Claude Code conversations to Braintrust for observability. Captures sessions, conversation turns, and tool calls as hierarchical traces.

AI & Automation 3,795 stars 297 forks Updated 4 months ago MIT

Install

View on GitHub

Quality Score: 86/100

Stars 20%
100
Recency 20%
50
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Trace Claude Code to Braintrust Automatically send Claude Code conversations to Braintrust for tracing and observability. Get full visibility into your AI coding sessions with hierarchical traces showing sessions, turns, and every tool call. ## What you get ``` Claude Code Session (root trace) ├── Turn 1: "Add error handling" │ ├── Read: src/app.ts │ ├── Edit: src/app.ts │ └── Response: "I've added try-catch..." ├── Turn 2: "Now run the tests" │ ├── Terminal: npm test │ └── Response: "All tests pass..." └── Turn 3: "Great, commit this" ├── Terminal: git add . ├── Terminal: git commit -m "..." └── Response: "Changes committed..." ``` ## How it works Four hooks capture the complete workflow: | Hook | What it captures | |------|------------------| | **SessionStart** | Creates root trace when you start Claude Code | | **PostToolUse** | Captures every tool call (file reads, edits, terminal commands) | | **Stop** | Captures conversation turns (your message + Claude's response) | | **SessionEnd** | Logs session summary when you exit | ## Quick setup Run the setup script in any project directory where you want tracing: ```bash bash /path/to/skills/trace-claude-code/setup.sh ``` The script prompts for your API key and project name, then configures all hooks automatically. ## Manual setup ### Prerequisites - [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) installed - [Braintrust API key](https://www.braintrust.dev/app/settings/api-...

Details

Author
parcadei
Repository
parcadei/Continuous-Claude-v3
Created
5 months ago
Last Updated
4 months ago
Language
Python
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category