Agent skill · AI & Agents

braintrust-tracing

Braintrust tracing for Claude Code - hook architecture, sub-agent correlation, debugging

parcadeigithub.com/parcadeiGitHub ↗
claude-codeMIT
Install
npx skills add parcadei/Continuous-Claude-v3 --skill braintrust-tracing --agent claude-code

Same command for any agent — swap --agent for codex, cursor, copilot.

Facts
Files in the skill folder: 1
SKILL.md size: 13 KB
Bundled scripts: none
Path: .claude/skills/braintrust-tracing/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 3,879
Language: Python
Read our review of the source →

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# Braintrust Tracing for Claude Code Comprehensive guide to tracing Claude Code sessions in Braintrust, including sub-agent correlation. ## Architecture Overview ``` PARENT SESSION +---------------------+ | SessionStart | | (creates root) | +----------+----------+ | +----------v----------+ | UserPromptSubmit | | (creates Turn) | +----------+----------+ | +--------------------+--------------------+ | | | +---------v--------+ +--------v--------+ +--------v--------+ | PostToolUse | | PostToolUse | | PreToolUse | | (Read span) | | (Edit span) | | (Task - inject) | +------------------+ +-----------------+ +--------+--------+ | +----------v----------+ | SUB-AGENT | | SessionStart | | (NEW root_span_id)| +----------+----------+ | +----------v----------+ | SubagentStop | | (has session_id) | +---------------------+ ``` ## Hook Event Flow | Hook | Trigger | Creates | Key Fields | |------|---------|---------|------------| | **SessionStart** | Session begins | Root span | `session_id`, `root_span_id` | | **UserPromptSubmit** | User sends prompt | Turn span | `prompt`, `turn_number` | | **PreToolUse** | Before tool runs | (modifies Task prompts) | `tool_input.prompt` | | **PostToolUse** | Afte

What's inside
Steps it walks through
  1. Architecture Overview
  2. Hook Event Flow
  3. Trace Hierarchy
  4. Sub-Agent Tracing: What Works and What Doesn't
  5. What Doesn't Work
  6. What DOES Work
  7. The Correlation Pattern
  8. State Management
  9. Per-Session State Files
  10. Global State
  11. Debugging Commands
  12. Check if Tracing is Active
  13. Query Braintrust Directly
  14. Debug Hook Execution
Commands it runs
PreToolUse hook injects:
View hook logs in real-time
tail -f ~/.claude/state/braintrust_hook.log
Check if session has state
cat ~/.claude/state/braintrust_sessions/*.json | jq -s '.'
Verify environment
echo "TRACE_TO_BRAINTRUST=$TRACE_TO_BRAINTRUST"
echo "BRAINTRUST_API_KEY=${BRAINTRUST_API_KEY:+set}"
List recent sessions
uv run python -m runtime.harness scripts/braintrust_analyze.py --sessions 5
More from Continuous-Claude-v3
All skills →
About this skill
What does the braintrust-tracing skill do?

Braintrust tracing for Claude Code - hook architecture, sub-agent correlation, debugging

How do I install it?

Run `npx skills add parcadei/Continuous-Claude-v3 --skill braintrust-tracing --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.

Keep going