bridge-agent-log-analyzer
Skill430 starsChanged 6 months agoMITView on GitHub
Analyze Bridge agent execution logs from ~/.bridge/sessions, reconstruct the agent's actual runtime behavior, and explain tool execution, failures, retries, and artifacts from persisted session files.
In this repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- macos/AGENTS.mdAGENTS.md
- sandbox-vm/AGENTS.mdAGENTS.md
- web/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- macos/CLAUDE.mdCLAUDE.md
- sandbox-vm/CLAUDE.mdCLAUDE.md
- app-store-changelogSkill
- gh-issue-fix-flowSkill
- githubSkill
- react-component-performanceSkill
- swift-concurrency-expertSkill
- swift-concurrencySkill
- swift-testing-expertSkill
- swiftui-expert-skillSkill
- swiftui-performance-auditSkill
- swiftui-ui-patternsSkill
- swiftui-view-refactorSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 6 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈6
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 27
Read only the raw files needed to explain the behavior:
- Distinctive: line 75
Use workspace files only when the agent explicitly read or referenced them in logs.
- Very specific: line 88
Use context.json as the main execution timeline.
- Distinctive: line 129
Only mention skill usage when there is concrete evidence such as:
- Distinctive: line 138
Do not output agent thinking.
- Distinctive: line 142
do not decode or summarize hidden reasoning
- Distinctive: line 148
Default to a concise Markdown report with:
≈ “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
Bridge Agent Log Analyzer
Overview
Inspect one persisted Bridge session and turn its on-disk logs into a behavior report.
This skill is for analyzing the agent itself:
- what it tried to do
- which tools it called
- which calls ran in the background
- where it failed
- how it recovered or retried
- which artifacts it read or produced
This skill is not for UI reconstruction. Ignore frontend display behavior unless the user explicitly asks for it.
Default Workflow
- Identify the target session or log identifier.
- Run
scripts/inspect_bridge_session.pyfirst. - Read only the raw files needed to explain the behavior:
session-meta.jsonagent/history.jsonagent/context.jsonagent/state.jsonagent/toolcalls/*/meta.jsonagent/toolcalls/*/output.log- subagent equivalents under
agents/<subagent-id>/agent/
- Reconstruct the execution chronologically.
- Separate direct evidence from inference.
Quick Start
Inspect the most recent session:
python3 .agents/skills/bridge-agent-log-analyzer/scripts/inspect_bridge_session.pyInspect a specific session directory ID:
python3 .agents/skills/bridge-agent-log-analyzer/scripts/inspect_bridge_session.py --session-id <session-id>Inspect using any UUID or identifier that appears inside that session's logs:
python3 .agents/skills/bridge-agent-log-analyzer/scripts/inspect_bridge_session.py --session-id <message-or-toolcall-id>The helper script is the index. Use it to find the real session directory, runtime toolcalls, failures, and likely recovery paths before opening raw files.
Primary Evidence Sources
history.json- user-visible messages and task state transitions
context.json- assistant decision points, tool calls, and tool results
toolcalls/*/meta.json- runtime command, async promotion, exit code, timing, environment
toolcalls/*/output.log- actual command output, error text, tracebacks, downloads, progress
state.json- model, reasoning effort, last-round token and step summary
session-meta.json- session title, environments, created/updated timestamps
Use workspace files only when the agent explicitly read or referenced them in logs.
What To Extract
Session overview
- real session directory ID
- whether the requested identifier was a direct session ID or a reverse lookup hit
- environment labels
- effective start/end time based on history and toolcall timestamps
Behavior timeline
Use context.json as the main execution timeline.
- one assistant message is one decision point
- assistant content is a visible reply or intermediate narration
- assistant
tool_callsare intended actions - later
toolmessages are immediate tool results toolcalls/*supplies runtime metadata for those tool calls
Tool execution
Summarize:
- tool name
- order of invocation
- arguments or command preview
- runtime status
- sync vs async/background execution
- exit code
- duration
- output preview
Failures and recovery
Focus on:
- failed toolcalls
- error-like tool results
- retries of the same tool
- diagnostics between a failure and a retry
- mismatches between summary files and raw logs
Artifacts and final state
Extract:
- files the agent explicitly read
- result files written and later inspected
- final kept state when the logs make it clear
Skill evidence
Only mention skill usage when there is concrete evidence such as:
- a tool opening a
SKILL.md - a command explicitly targeting a skill path
Report this as inferred skill usage.
Privacy Boundary
Do not output agent thinking.
- ignore
reasoning - ignore
encrypted_reasoning - do not decode or summarize hidden reasoning
This skill explains behavior from logs, not hidden chain-of-thought.
Reporting Format
Default to a concise Markdown report with:
Session overviewBehavior timelineTool execution summaryFailures and recoveryArtifacts and final stateInferred skill usageGaps and uncertainty
For each important step, include:
- trigger or input
- assistant action
- tools called
- outcome
- evidence source
Failure Modes
- Missing
history.json: rely oncontext.json,toolcalls/*, andstate.json - Missing
context.json: restrict to user-visible history plus runtime toolcalls if present - Missing
toolcalls/*: fall back tocontext.jsontool results - Missing tool result for a
tool_call_id: report it as unmatched, not failed - Sessions with subagents: analyze each agent separately, then combine
Resources
scripts/inspect_bridge_session.py- behavior-focused summary for one session
references/log-sources.md- artifact map and evidence grading
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.

