agentleFS
fritzprixfritzprix/libr-agent/.agents/skills/trace-analyzer/SKILL.md

trace-analyzer

Skill11 starsChanged 19 days agoMITView on GitHub

Analyzes LibrAgent agent session trace files (.trace.json) to understand what an AI agent actually did during a session. Use when a user shares a .trace.json file, asks "what did the agent do?", wants to debug agent behavior, investigate tool call patterns, validate concurrency limits, or review session results. The trace file is the raw conversation record between the agent and its tools.

The file

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    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
  1. Distinctive:

    Run the bundled script against the trace file:

    line 12
  2. Distinctive:

    Every tool call with truncated args

    line 21
  3. Distinctive:

    Every tool result (first line, success ✓ or error ✗)

    line 22
  4. Distinctive:

    Every assistant text turn

    line 23
  5. Distinctive:

    If M < expected spawn count → gate is throttling correctly ✅

    line 32

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Trace Analyzer

Analyzes .trace.json files produced by LibrAgent agent sessions.

Quick Start

Run the bundled script against the trace file:

python .agents/skills/trace-analyzer/scripts/trace_dump.py <path-to-.trace.json>

The script outputs:

  • Message count by role (user / assistant / tool)
  • Every tool call with truncated args
  • Every tool result (first line, success ✓ or error ✗)
  • Every assistant text turn

What to Look For

Concurrency Gate Validation

listProcesses results during a load test reveal the active slot count:

  • Found N processes (M running, K finished) — M should never exceed active_process limit (default: 10)
  • If M < expected spawn count → gate is throttling correctly ✅

Common Agent Errors

PatternMeaning
✗ Unknown tool: <name>Agent hallucinated a non-existent tool name
✗ Timeout waiting for processwaitForProcess default 30s expired; agent used wrong timeout
✗ Process '<id>' not found in sessionCross-session ID leak or stale ID from prior session
✗ Scratchpad item ... already existsAgent tried duplicate scratchpad write

Planning Behavior

Good agents: createGoal → addTodo → work → checkTodo → clearGoal
Confused agents: repeated addTodo for same item, getCurrentState spam, never clearGoal

Tool Call Frequency

High pauseAndThink / getCurrentState ratio relative to actual work calls = agent overthinking.
Healthy ratio: ≤1 planning call per 3 work calls.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.