trace-claude-code
FeaturedAutomatically trace Claude Code conversations to Braintrust for observability. Captures sessions, conversation turns, and tool calls as hierarchical traces.
AI & Automation 3,951 stars
303 forks Updated 2 days ago MIT
Install
Quality Score: 96/100
Stars 20%
Recency 20%
Frontmatter 20%
Documentation 15%
Issue Health 10%
License 10%
Description 5%
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
- 11 months ago
- Last Updated
- 2 days ago
- Language
- Python
- License
- MIT
Integrates with
Similar Skills
Semantically similar based on skill content — not just same category
AI & Automation Featured
braintrust-tracing
Braintrust tracing for Claude Code - hook architecture, sub-agent correlation, debugging
3,951 Updated 2 days ago
parcadei AI & Automation Featured
braintrust-tracing
Braintrust tracing for Claude Code - hook architecture, sub-agent correlation, debugging
552 Updated 6 days ago
vibeeval AI & Automation Listed
braintrust-analyze
Analyze Claude Code sessions via Braintrust
552 Updated 6 days ago
vibeeval