trace-claude-code
Automatically trace Claude Code conversations to Braintrust for observability. Captures sessions, conversation turns, and tool calls as hierarchical traces.
npx skills add parcadei/Continuous-Claude-v3 --skill trace-claude-code --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# 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 scrip
- What you get
- How it works
- Quick setup
- Manual setup
- Prerequisites
- Configuration
- Environment variables
- Viewing traces
- Trace structure
- Troubleshooting
- No traces appearing
- Permission errors
- Missing jq command
- State issues
bash /path/to/skills/trace-claude-code/setup.sh tail -f ~/.claude/state/braintrust_hook.log chmod +x /path/to/hooks/*.sh rm ~/.claude/state/braintrust_state.json Follow logs in real-time View last 50 lines tail -50 ~/.claude/state/braintrust_hook.log Clear logs
What does the trace-claude-code skill do?
Automatically trace Claude Code conversations to Braintrust for observability. Captures sessions, conversation turns, and tool calls as hierarchical traces.
How do I install it?
Run `npx skills add parcadei/Continuous-Claude-v3 --skill trace-claude-code --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From parcadei/Continuous-Claude-v3, a repository with 3,879 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.