$npx -y skills add parcadei/Continuous-Claude-v3 --skill braintrust-analyzeAnalyze Claude Code sessions via Braintrust
| 1 | # Braintrust Analysis |
| 2 | |
| 3 | Analyze your Claude Code sessions for patterns, issues, and insights using Braintrust tracing data. |
| 4 | |
| 5 | ## When to Use |
| 6 | |
| 7 | - After completing a complex task (retrospective) |
| 8 | - When debugging why something failed |
| 9 | - Weekly review of productivity patterns |
| 10 | - Finding opportunities to create new skills |
| 11 | - Understanding token usage trends |
| 12 | |
| 13 | ## Commands |
| 14 | |
| 15 | Run from the project directory: |
| 16 | |
| 17 | ```bash |
| 18 | # Analyze last session - summary with tool/agent/skill breakdown |
| 19 | uv run python -m runtime.harness scripts/braintrust_analyze.py --last-session |
| 20 | |
| 21 | # List recent sessions |
| 22 | uv run python -m runtime.harness scripts/braintrust_analyze.py --sessions 5 |
| 23 | |
| 24 | # Agent usage statistics (last 7 days) |
| 25 | uv run python -m runtime.harness scripts/braintrust_analyze.py --agent-stats |
| 26 | |
| 27 | # Skill usage statistics (last 7 days) |
| 28 | uv run python -m runtime.harness scripts/braintrust_analyze.py --skill-stats |
| 29 | |
| 30 | # Detect loops - find repeated tool patterns (>5 same tool calls) |
| 31 | uv run python -m runtime.harness scripts/braintrust_analyze.py --detect-loops |
| 32 | |
| 33 | # Replay specific session - show full sequence of actions |
| 34 | uv run python -m runtime.harness scripts/braintrust_analyze.py --replay <session-id> |
| 35 | |
| 36 | # Weekly summary - daily activity breakdown |
| 37 | uv run python -m runtime.harness scripts/braintrust_analyze.py --weekly-summary |
| 38 | |
| 39 | # Token trends - usage over time |
| 40 | uv run python -m runtime.harness scripts/braintrust_analyze.py --token-trends |
| 41 | ``` |
| 42 | |
| 43 | ## Options |
| 44 | |
| 45 | - `--project NAME` - Braintrust project name (default: agentica) |
| 46 | |
| 47 | ## What You'll Learn |
| 48 | |
| 49 | ### Session Analysis |
| 50 | - Tool usage breakdown |
| 51 | - Agent spawns (plan-agent, debug-agent, etc.) |
| 52 | - Skill activations (/commit, /research, etc.) |
| 53 | - Token consumption estimates |
| 54 | |
| 55 | ### Loop Detection |
| 56 | Find sessions where the same tool was called repeatedly, which may indicate: |
| 57 | - Stuck in a search loop |
| 58 | - Inefficient approach |
| 59 | - Opportunity for better tooling |
| 60 | |
| 61 | ### Usage Patterns |
| 62 | - Which agents you use most |
| 63 | - Which skills get activated |
| 64 | - Daily/weekly activity trends |
| 65 | |
| 66 | ## Examples |
| 67 | |
| 68 | ### Quick Retrospective |
| 69 | ```bash |
| 70 | # What happened in my last session? |
| 71 | uv run python -m runtime.harness scripts/braintrust_analyze.py --last-session |
| 72 | ``` |
| 73 | |
| 74 | Output: |
| 75 | ``` |
| 76 | ## Session Analysis |
| 77 | **ID:** `92940b91...` |
| 78 | **Started:** 2025-12-24T01:31:05Z |
| 79 | **Spans:** 14 |
| 80 | |
| 81 | ### Tool Usage |
| 82 | - Read: 4 |
| 83 | - Bash: 2 |
| 84 | - Edit: 2 |
| 85 | ... |
| 86 | ``` |
| 87 | |
| 88 | ### Find Loops |
| 89 | ```bash |
| 90 | uv run python -m runtime.harness scripts/braintrust_analyze.py --detect-loops |
| 91 | ``` |
| 92 | |
| 93 | ### Weekly Review |
| 94 | ```bash |
| 95 | uv run python -m runtime.harness scripts/braintrust_analyze.py --weekly-summary |
| 96 | ``` |
| 97 | |
| 98 | ## Requirements |
| 99 | |
| 100 | - BRAINTRUST_API_KEY in ~/.claude/.env or project .env |
| 101 | - Braintrust tracing enabled (via braintrust-claude-plugin) |