trace-claude-code

Automate tracing Claude Code sessions and tool calls to Braintrust.

2|Updated Jan 9, 2026
One-click install
npx skills add https://github.com/MitchellkellerLG/claude-workspace-template --skill trace-claude-code-mitchellkellerlg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: trace-claude-code
Source: https://github.com/MitchellkellerLG/claude-workspace-template/tree/main/.claude/plugins/braintrust-tracing/skills/trace-claude-code
Command: npx skills add https://github.com/MitchellkellerLG/claude-workspace-template --skill trace-claude-code-mitchellkellerlg

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enables you to capture and centralize visibility for Claude Code sessions by sending them to Braintrust. It creates hierarchical traces for sessions, turns, and tool calls, helping you diagnose performance and observability issues.

Core Features & Use Cases

  • Session tracing: Automatically creates a root trace for Claude Code sessions.
  • Turn-level detail: Captures each user‑assistant exchange and associated tool calls.
  • Handoffs and workflows: Structures traces to support debugging across tasks and project work.
  • Use Case: You want end-to-end visibility of a coding session to identify where delays occur or which tool calls are most expensive.

Quick Start

Run the setup script to enable tracing in a Claude Code project: bash /path/to/skills/trace-claude-code/setup.sh. Then start Claude as usual and observe Braintrust logs.

Frequently Asked Questions about trace-claude-code

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I trace Claude Code sessions to Braintrust for observability?

You can trace Claude Code sessions by running the included setup script in your project directory. This automatically instruments session starts, turns, and tool calls, emitting hierarchical traces directly to Braintrust for enhanced observability and debugging.

What level of detail is captured when tracing Claude Code tool calls?

Tracing captures hierarchical detail including root session starts, individual user-assistant turns, and associated tool calls. This structure helps you diagnose performance bottlenecks and identify which specific tool calls are most expensive during a coding workflow.

Can I use Braintrust tracing across different Claude Code projects?

Yes, session tracing works across projects by running the setup script in each applicable Claude Code project directory. It captures development workflows involving code edits and tool usage regardless of the specific project context.

Does tracing Claude Code to Braintrust require any external dependencies?

No external dependencies are required to enable tracing. The Skill operates without additional component packages, relying solely on the setup script to bridge Claude Code sessions directly to Braintrust for observability.

What is the best way to debug performance delays in Claude Code sessions?

The best way is to enable session tracing to Braintrust, which provides end-to-end visibility of coding sessions. The hierarchical traces identify exactly where delays occur and which tool calls are most expensive during task handoffs and workflows.