trace-claude-code

trace-claude-code is a skill for Claude Code, Codex from parcadei/Continuous-Claude-v3. It costs 32 tokens per session (1,565 once invoked), scanned C, original, MIT.

A tracing setup for Claude Code, the coding assistant, that records sessions, conversation turns, tool calls, and session summaries in Braintrust, a service for observing AI workflows.

In plain words
What is it for?
Use it to trace session starts and ends, capture tool calls, review conversation turns, and inspect coding-session activity.
Why use it?
It gives you a record of what the assistant did during a coding session, including files read, edits, commands, and responses.

Skill for Claude CodeCodex

Part of the braintrust plugin — 1 skill shipped together

About the project

Continuous-Claude-v3 is a Claude Code development environment that preserves working context between sessions, coordinates specialized agents, and stores project knowledge through ledgers, handoffs, and analysis tools. It is for people using Claude Code on ongoing or complex software work. Its catalogue entries are the skills, agents, hooks, plugin, and setting that provide its workflows and orchestration.

parcadei/Continuous-Claude-v3 · 3,936 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/parcadei/continuous-claude-v3/trace-claude-code
Any agent
npx skills add parcadei/Continuous-Claude-v3 --skill trace-claude-code
Clone the repo
git clone --depth 1 https://github.com/parcadei/Continuous-Claude-v3

Made for: Claude Code, Codex.

Or install braintrust, the plugin that ships this one along with the rest of its 1 skill.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for trace-claude-code

README.md
[![agentmods](https://agentmods.dev/badge/skills/parcadei/continuous-claude-v3/trace-claude-code.svg)](https://agentmods.dev/skills/parcadei/continuous-claude-v3/trace-claude-code)
Your own site
<a href="https://agentmods.dev/skills/parcadei/continuous-claude-v3/trace-claude-code"><img src="https://agentmods.dev/badge/skills/parcadei/continuous-claude-v3/trace-claude-code.svg" alt="Measured on agentmods" height="20"></a>
Per session 32 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,565 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00032 $0.01565
Opus 5 $0.00016 $0.00783
Sonnet 5 $0.00006 $0.00313
Haiku 4.5 $0.00003 $0.00156

Measured 6d ago against content hash b0ad931e0f58, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade C, and why

trace-claude-code scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- **Ubuntu/Debian**: `sudo apt-get install jq`

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

tail -f ~/.claude/state/braintrust_hook.log
.claude/plugins/braintrust-tracing/skills/trace-claude-code/SKILL.md · 248 lines

How it starts

The opening of the file, as written. The whole thing — 248 lines — stays where its author put it; the contents beside it link to each section on GitHub.

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 /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:

{
  "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"
  }
}

Read the full file on GitHub · 248 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 248 lines · 32 tokens per session scan C b0ad931e0f58

Subscribe to this mod's changes

trace-claude-code is a skill published in the GitHub repository parcadei/Continuous-Claude-v3 (3,936 stars, last pushed 7mo ago), licensed MIT. It adds 32 tokens to every session and 1,565 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it C with 2 findings (asks for root, reads agent configuration directories). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.