trace-analysis
Skill0 starsChanged 4 months agoMITView on GitHub
Deep-dive analysis of a single session (cloud or local). Pulls the full trace or transcript, walks through agent decisions, identifies failure modes, and recommends skill/prompt refinements. Trigger on: analyze run, trace audit, why did this run fail, deep dive, trace analysis, analyze session.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- ai-analyst-lab/ai-analysttheir own version, first seen Sep 10, 2026
- gabriellst/codmtheir own version, first seen Aug 26, 2026
- itsmuskanagarwal/effective-agents-labtheir own version, first seen Jul 9, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- ai-analyst-lab/ai-analyst★ 304same name
- gabriellst/codm★ 4same name
- itsmuskanagarwal/effective-agents-lab★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- alpha-miningSkill
- brain-checkSkill
- session-reviewSkill
- context-gatherSkill
- distill-sessionsSkill
- econ-reasoningSkill
- experiment-reportingSkill
- hf-serverSkill
- mining-sessionSkill
- pnl-correlationSkill
- result-analysisSkill
- signal-generationSkill
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 4 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Use this skill when you want to understand WHY a specific session (cloud or local) behaved the way it did — beyond summary metrics.
- Distinctive: line 50
If the trace is expired (0 events), check the HF storage bucket:
- Distinctive: line 65
If the trace is gone entirely, work from the PR body, audit comment, and git diff.
- Distinctive: line 69
Read the transcript JSONL directly:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Trace Analysis — Single-Session Deep Dive
Use this skill when you want to understand WHY a specific session (cloud or local) behaved the way it did — beyond summary metrics.
When to Use
- A cloud-agent PR's audit comment shows a compliance failure.
- A run wasted sim budget with few gate-passers.
- You want to verify whether a skill/prompt change actually changed agent behavior.
- A local session went down an unexpected path and you want to understand why.
Step 1: Identify the target session
The user provides one of:
- A PR number (e.g., "deep dive PR #21")
- A Cursor agent ID (e.g., "analyze bc-7c8329a6-...")
- A local transcript UUID (e.g., "analyze 474c9e21-...")
- A session directory (e.g., "analyze 20260604-001")
- "the latest cloud run" or "the latest session"
Determine session type
| Identifier | Type | Trace source |
bc-* | Cloud | Cursor API SSE stream or HF file storage |
PR number with cloud-agent label | Cloud | Same as above (extract bc-* from PR body) |
| UUID (36 chars with dashes) | Local | agent-transcripts/<uuid>/<uuid>.jsonl |
YYYYMMDD-NNN | Local | data/sessions/<id>/ + find matching transcript by date |
Step 2: Pull the trace
Cloud sessions
uv run python3 scripts/audit_cloud_trace.py \
--agent-id <bc-id> \
--output /tmp/trace.jsonIf the trace is expired (0 events), check the HF storage bucket:
# List available traces in the bucket
hf buckets ls <hf-user>/alpha-mining-traces/traces/Or in Python:
from huggingface_hub import list_bucket_files
for f in list_bucket_files('<hf-user>/alpha-mining-traces', path_prefix='traces/'):
if 'bc-' in f.path:
print(f.path)If the trace is gone entirely, work from the PR body, audit comment, and git diff.
Local sessions
Read the transcript JSONL directly:
TRANSCRIPT="agent-transcripts/<uuid>/<uuid>.jsonl"
wc -l "$TRANSCRIPT" # message countExtract tool calls:
import json
tools = []
with open('<path>.jsonl') as f:
for line in f:
d = json.loads(line)
if d.get('role') == 'assistant':
for item in (d.get('message',{}).get('content',[]) or []):
if isinstance(item, dict) and item.get('type') == 'tool_use':
tools.append({'name': item['name'], 'input': item['input']})
print(f'{len(tools)} tool calls')
for t in tools:
name = t['name']
inp = t['input']
if name == 'Shell':
print(f" Shell: {inp.get('command','')[:120]}")
elif name == 'Read':
print(f" Read: {inp.get('path','')}")
elif name in ('StrReplace', 'Write'):
print(f" {name}: {inp.get('path','')}")
else:
print(f" {name}: {json.dumps(inp)[:120]}")Also read the session artifacts if they exist:
data/sessions/<id>/meta.md— strategy and research questiondata/sessions/<id>/results.md— what was testeddata/sessions/<id>/learnings.md— what the agent concluded
Step 3: Reconstruct the decision timeline
Walk through the trace/transcript chronologically. Focus on:
Context gathering phase:
- What did the agent read first? Did it read
mining-sessionbefore acting? - Did it read
data/knowledge/rules/anddata/knowledge/dead_zones/? - Did it check the current
data/book/for the self-corr baseline? - Did it consult
data/factors/for prior coverage?
Strategy selection:
- What strategy did it choose and why?
- Did it follow the adaptive strategy decision tree in
mining-session?
Signal generation phase:
- How many simulation batches were submitted?
- What families/templates did it explore?
- Did it waste sims on families in
data/knowledge/dead_zones/? - Did it respect the "3 variants same BRAIN failure -> pivot" stop condition?
Polling and results:
- Did it use
hf_poll.pyor ad-hoc--statsloops? - How long did it wait for results?
Verification:
- Did it run
pnl_correlation.py --vs-bookfor every candidate? - Did it correctly interpret
SELF_CORRELATION: PENDINGfrombrain_check? - Did it create
submit-*.mdqueue entries for verified candidates?
Reporting:
- Did it follow the
experiment-reportingtemplate? - Was the diff append-only V2 (cloud) or properly scoped (local)?
Step 4: Classify failure modes
Map each issue to an actionable fix:
| Failure Mode | Fix Category | Action |
| Didn't read a required skill | Prompt gap | Add explicit instruction to dispatcher |
| Read/edited V1 files | Knowledge gap + prompt | Ensure dispatcher forbids V1 |
| Wasted sims on dead family | Knowledge gap | Create/update data/knowledge/dead_zones/ |
| Ignored a stop condition | Skill gap | Strengthen language in mining-session |
| Used ad-hoc polling | Skill gap | Strengthen hf-server skill |
| Didn't verify self-corr | Skill gap | Strengthen result-analysis gate |
| Missing PR metadata | Skill gap | Strengthen experiment-reporting template |
| Tool error / script bug | Tool gap | File a fix (separate PR) |
| Went down a rabbit hole | Context gap | Add a rule or pattern to prevent |
Step 5: Present findings
Summarize the analysis:
- Timeline: what the agent did, in what order, with time estimates
- Budget efficiency: sims used vs gate-passers found
- Failure modes: classified list with recommended fixes
- Proposed changes: specific edits to skills, prompt, or knowledge files
The user decides which fixes to apply. Changes are committed in the current local session.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

