Agent skill

Trace Claude Code

by parcadei in parcadei/Continuous-Claude-v3

Automatically trace Claude Code conversations to Braintrust for observability.

MITAuto-check: notesDevOps & Cloud

Install Trace Claude Code

skills CLI
$ npx skills add parcadei/Continuous-Claude-v3 --skill trace-claude-code -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install parcadei/Continuous-Claude-v3 trace-claude-code --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/parcadei/Continuous-Claude-v3.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.claude/plugins/braintrust-tracing/skills/trace-claude-code .claude/skills/trace-claude-code && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
trace-claude-code
GitHub stars
3.9k
Used in
1 other repo
Token cost
~1.5k tokens
SKILL.md length
381 words
Files
1
Skills in repo
141
Repo updated
First seen
Licence
MIT

At a glance

Automatically trace Claude Code conversations to Braintrust for observability.

  • Works in 3 steps: Go to braintrust.dev → Navigate to your project (e.g.,… → Click Logs to see all traced sessions
  • Tasks that involve Observability
  • SKILL.md covers What you get, How it works, Quick setup and Manual setup, plus 5 more sections
  • Calls brew, claude and bash; needs BRAINTRUST_API_KEY

What it does

Trace Claude Code is an agent skill from parcadei/Continuous-Claude-v3. Automatically trace Claude Code conversations to Braintrust for observability. Captures sessions, conversation turns, and tool calls as hierarchical traces.

Its SKILL.md is about 1.5k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in DevOps & Cloud, covering Observability. The repository describes itself as: Context management for Claude Code. Hooks maintain state via ledgers and handoffs. MCP execution without context pollution. Agent orchestration with isolated context windows. The licence is MIT.

When your agent uses it

  • Tasks that involve Observability

Example prompts

  • “/trace-claude-code”

Requirements

  • A credential in BRAINTRUST_API_KEY

Workflow steps

3 steps, taken from the first numbered list in SKILL.md.

  1. Go to braintrust.dev
  2. Navigate to your project (e.g., claude-code)
  3. Click Logs to see all traced sessions

What it can do on your machine

Read from SKILL.md and the folder at commit d07ff4b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • brew
    • claude
    • bash
    • apt-get

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • braintrust.dev
    • docs.anthropic.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • BRAINTRUST_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Trace Claude Code loads about 1.5k tokens when it runs. Until then it costs about 44 tokens; SKILL.md has 381 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~44
When it runs · the whole SKILL.md, loaded when a task matches
~1.5k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check: notes

The automated check noted patterns worth knowing about, such as sudo or a known installer.

  • NoteRuns commands with sudoSKILL.md:195
    - **Ubuntu/Debian**: `sudo apt-get install jq`

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from parcadei/Continuous-Claude-v3 at commit d07ff4b, republished under its MIT licence (© parcadei). 381 words, ~1,522 tokens.

Download SKILL.mdSave it as .claude/skills/trace-claude-code/SKILL.md (or your agent's skills folder).
name
trace-claude-code
description
Automatically trace Claude Code conversations to Braintrust for observability. Captures sessions, conversation turns, and tool calls as hierarchical traces.
version
1.1.0

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:

HookWhat it captures
SessionStartCreates root trace when you start Claude Code
PostToolUseCaptures every tool call (file reads, edits, terminal commands)
StopCaptures conversation turns (your message + Claude's response)
SessionEndLogs 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
Configuration

Create .claude/settings.local.json in your project directory:

json
{
  "hooks": {
    "SessionStart": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "bash /path/to/hooks/session_start.sh"
          }
        ]
      }
    ],
    "PostToolUse": [
      {
        "matcher": "*",
        "hooks": [
          {
            "type": "command",
            "command": "bash /path/to/hooks/post_tool_use.sh"
          }
        ]
      }
    ],
    "Stop": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "bash /path/to/hooks/stop_hook.sh"
          }
        ]
      }
    ],
    "SessionEnd": [
      {
        "hooks": [
          {
            "type": "command",
            "command": "bash /path/to/hooks/session_end.sh"
          }
        ]
      }
    ]
  },
  "env": {
    "TRACE_TO_BRAINTRUST": "true",
    "BRAINTRUST_API_KEY": "sk-...",
    "BRAINTRUST_CC_PROJECT": "my-project"
  }
}

Replace /path/to/hooks/ with the actual path to this skill's hooks directory.

Environment variables
VariableRequiredDescription
TRACE_TO_BRAINTRUSTYesSet to "true" to enable tracing
BRAINTRUST_API_KEYYesYour Braintrust API key
BRAINTRUST_CC_PROJECTNoProject name (default: claude-code)
BRAINTRUST_CC_DEBUGNoSet to "true" for verbose logging

Viewing traces

After running Claude Code with tracing enabled:

  1. Go to braintrust.dev
  2. Navigate to your project (e.g., claude-code)
  3. Click Logs to see all traced sessions

Each trace shows:

  • Session root: The overall Claude Code session
  • Turns: Each conversation exchange (user input → assistant response)
  • Tool calls: Individual operations (file reads, edits, terminal commands)
Show full SKILL.md (152 more words)Show less

Trace structure

Traces are hierarchical:

  • Session (root span)

    • span_attributes.type: "task"
    • metadata.session_id: Unique session identifier
    • metadata.workspace: Project directory
  • Turn (child of session)

    • span_attributes.type: "llm"
    • input: User message
    • output: Assistant response
    • metadata.turn_number: Sequential turn number
  • Tool call (child of turn or session)

    • span_attributes.type: "tool"
    • input: Tool input (file path, command, etc.)
    • output: Tool result
    • metadata.tool_name: Name of the tool used

Troubleshooting

No traces appearing
  1. Check hooks are running:

    bash
    tail -f ~/.claude/state/braintrust_hook.log
  2. Verify environment variables in .claude/settings.local.json:

    • TRACE_TO_BRAINTRUST must be "true"
    • BRAINTRUST_API_KEY must be valid
  3. Enable debug mode:

    json
    {
      "env": {
        "BRAINTRUST_CC_DEBUG": "true"
      }
    }
Permission errors

Make hook scripts executable:

bash
chmod +x /path/to/hooks/*.sh
Missing jq command

Install jq:

  • macOS: brew install jq
  • Ubuntu/Debian: sudo apt-get install jq
State issues

Reset the tracing state:

bash
rm ~/.claude/state/braintrust_state.json
Hook logs

View detailed hook execution logs:

bash
# Follow logs in real-time
tail -f ~/.claude/state/braintrust_hook.log

# View last 50 lines
tail -50 ~/.claude/state/braintrust_hook.log

# Clear logs
> ~/.claude/state/braintrust_hook.log

File structure

hooks/
├── common.sh          # Shared utilities (logging, API, state)
├── session_start.sh   # Creates root trace span
├── post_tool_use.sh   # Captures tool calls
├── stop_hook.sh       # Captures conversation turns
└── session_end.sh     # Finalizes trace

Alternative: SDK integration

For programmatic use with the Claude Agent SDK, use the native Braintrust integration:

typescript
import { initLogger, wrapClaudeAgentSDK } from "braintrust";
import * as claudeSDK from "@anthropic-ai/claude-agent-sdk";

initLogger({
  projectName: "my-project",
  apiKey: process.env.BRAINTRUST_API_KEY,
});

const { query, tool } = wrapClaudeAgentSDK(claudeSDK);

See Braintrust Claude Agent SDK docs for details.

© parcadei, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .claude/plugins/braintrust-tracing/skills/trace-claude-code of parcadei/Continuous-Claude-v3.

Open the folder on GitHubat commit d07ff4b

Used in 1 other repository

We found 2 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 1 other GitHub owner. This page covers the copy in parcadei/Continuous-Claude-v3, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Trace Claude Code next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Trace Claude Code compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Trace Claude Code this skillparcadei/Continuous-Claude-v33.9k1 repos~1.5kAutomated safety check: NotesMIT
Vercel Optimize Auditvercel-labs/agent-skills32k9 repos~4.3kAutomated safety check: PassNone
Kubeshark Installerkubeshark/kubeshark12k—~3.6kAutomated safety check: NotesApache-2.0
Kubeshark KFL2 Filter Referencekubeshark/kubeshark12k—~3.6kAutomated safety check: PassApache-2.0
KubeSphere ServiceMesh Managerkubesphere/kubesphere17k—~2.4kAutomated safety check: PassCustom licence
Kubernetes Network Root Cause Analysiskubeshark/kubeshark12k—~5.3kAutomated safety check: PassApache-2.0

Similar skills

  • Vercel Optimize Audit

    vercel-labs/agent-skills

    Official

    Runs a metrics-first audit of a deployed Vercel project, gating investigations on real signals to produce ranked, citation-backed cost and performance recommendations.

    32k GitHub starsUsed in 9 repos~4.3k tokens
    DevOps & CloudAuto-check passed
  • Kubeshark Installer

    kubeshark/kubeshark

    Installs and configures Kubeshark on a Kubernetes cluster, choosing between the quick CLI path and a Helm install with custom values.

    12k GitHub stars~3.6k tokensUpdated today
    DevOps & CloudAuto-check: notes
  • Syntax reference for KFL2, the CEL-based display filter language used to search Kubernetes network traffic captured by Kubeshark, loaded before any filter is written.

    12k GitHub stars~3.6k tokensUpdated today
    DevOps & CloudAuto-check passed
  • KubeSphere ServiceMesh Manager

    kubesphere/kubesphere

    Installs, checks and troubleshoots the KubeSphere ServiceMesh extension (Istio, Kiali, Jaeger), including grayscale release, sidecar injection, topology and tracing issues.

    17k GitHub stars~2.4k tokensUpdated 2 mo ago
    DevOps & CloudAuto-check passed
  • Investigates past Kubernetes incidents from Kubeshark traffic snapshots: takes captures, dissects API calls, extracts PCAPs and compares traffic over time.

    12k GitHub stars~5.3k tokensUpdated today
    DevOps & CloudAuto-check passed
  • Caveman Gateway Setup

    JuliusBrussee/caveman

    Routes every LLM call in a repository through the Caveman Cloud gateway in record mode, so requests and costs are measured without changing behavior.

    110k GitHub starsUsed in 1 repo~2.6k tokens
    DevOps & CloudAuto-check: warnings

More from parcadei/Continuous-Claude-v3

All 141 skills in this repo
  • Tldr Deep

    parcadei/Continuous-Claude-v3

    Full 5-layer analysis of a specific function. An agent skill from parcadei/Continuous-Claude-v3.

    3.9k GitHub starsUsed in 2 repos~677 tokens
    Auto-check passed
  • Compound Learnings

    parcadei/Continuous-Claude-v3

    Transform session learnings into permanent capabilities (skills, rules, agents).

    3.9k GitHub starsUsed in 1 repo~1.6k tokens
    Auto-check: notes
  • Gradient Methods

    parcadei/Continuous-Claude-v3

    Problem-solving strategies for gradient methods in optimization

    3.9k GitHub starsUsed in 3 repos~1k tokens
    Auto-check: notes
  • Debug Hooks

    parcadei/Continuous-Claude-v3

    Systematic hook debugging workflow. An agent skill from parcadei/Continuous-Claude-v3.

    3.9k GitHub starsUsed in 1 repo~863 tokens
    Auto-check: notes
  • Math

    parcadei/Continuous-Claude-v3

    Unified math capabilities - computation, solving, and explanation.

    3.9k GitHub starsUsed in 3 repos~1.6k tokens
    Auto-check: notes
  • Math Model Selector

    parcadei/Continuous-Claude-v3

    Routes problems to appropriate mathematical frameworks using expert heuristics

    3.9k GitHub starsUsed in 3 repos~841 tokens
    Auto-check passed

Categories

Questions about Trace Claude Code

What does Trace Claude Code do?

Automatically trace Claude Code conversations to Braintrust for observability. Trace Claude Code is an agent skill from parcadei/Continuous-Claude-v3. Automatically trace Claude Code conversations to Braintrust for observability.

When should I use Trace Claude Code?

Trace Claude Code fits situations like: tasks that involve Observability.

How do I install Trace Claude Code in Claude Code?

Run `npx skills add parcadei/Continuous-Claude-v3 --skill trace-claude-code -a claude-code`. Or copy the skill folder (.claude/plugins/braintrust-tracing/skills/trace-claude-code in parcadei/Continuous-Claude-v3) into .claude/skills/trace-claude-code in your project. Claude Code loads it when a task matches its description.

How do I install Trace Claude Code in Codex?

Run `npx skills add parcadei/Continuous-Claude-v3 --skill trace-claude-code -a codex`. Or copy the skill folder (.claude/plugins/braintrust-tracing/skills/trace-claude-code in parcadei/Continuous-Claude-v3) into .agents/skills/trace-claude-code in your project. Codex loads it when a task matches its description.

Can I use Trace Claude Code in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add parcadei/Continuous-Claude-v3 --skill trace-claude-code -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/trace-claude-code, .gemini/skills/trace-claude-code, .github/skills/trace-claude-code and .opencode/skills/trace-claude-code in your project.

What does Trace Claude Code need to run?

Going by SKILL.md and its folder, Trace Claude Code needs the command-line tools its instructions call (brew, claude, bash and apt-get) and credentials named BRAINTRUST_API_KEY. Our summary lists: A credential in BRAINTRUST_API_KEY.

Does Trace Claude Code access the network?

SKILL.md names 2 domains. As links in the text: braintrust.dev and docs.anthropic.com. This is read from the text; nothing was executed.

Is Trace Claude Code safe to install?

Our automated static check of SKILL.md found notes only (runs commands with sudo), nothing it rates as a warning. It is not a guarantee. Review the folder before installing.

What licence does Trace Claude Code use?

Trace Claude Code is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Trace Claude Code use?

About 1.5k tokens (SKILL.md is roughly 6.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Trace Claude Code?

Skills that share tags, products or a category with Trace Claude Code: Vercel Optimize Audit (vercel-labs/agent-skills, 32k stars), Kubeshark Installer (kubeshark/kubeshark, 12k stars), Kubeshark KFL2 Filter Reference (kubeshark/kubeshark, 12k stars) and KubeSphere ServiceMesh Manager (kubesphere/kubesphere, 17k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Trace Claude Code?

parcadei (a GitHub user) maintains it in parcadei/Continuous-Claude-v3, which has 3,940 GitHub stars. The repository holds 141 skills in this directory. The repository was last updated on January 26, 2026.

Source: parcadei/Continuous-Claude-v3 on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.