session-transcript-analyzer
БесплатноЗапускает вложенные скриптыНе проверенParses and merges Claude .jsonl transcripts with debug logs to generate a timeline heuristics report of API limits, context overflows, hook blocks, and tool…
от oimiragieo★ 48 звёзд на GitHubОб этом скилле
Session Transcript Analyzer
Step 1: Locate the transcript
Determine the target session. Two modes:
- Explicit session ID: pass
--session <uuid>to scan~/.claude/projects/<project-dir>/for a.jsonlfile whose name contains the UUID. - Auto-detect (no
--session): scan the project directory (derived fromprocess.cwd()) for the most recently modified.jsonlfile. Fall back to a global scan of~/.claude/projects/if the project directory does not exist.
Project folder name derivation: replace the drive colon+backslash with --, then replace remaining path separators with -.
Example: C:\dev\projects\agent-studio → C--dev-projects-agent-studio.
Step 2: Pair with a debug log
Once the session ID is extracted from the transcript filename (<uuid>.jsonl), look for a matching debug log at ~/.claude/debug/<uuid>.txt. If not found, do a prefix/contains scan of the debug directory. Warn but continue if no debug log is found.
Step 3: Parse the JSONL transcript
Read the file line by line. Skip blank or malformed lines. For each valid JSON object:
- Count user messages:
event.type === 'user'whereevent.message.content[0].type === 'text' - Count tool invocations: content blocks with
type === 'tool_use'; accumulate per-tool counts in a frequency map - Collect tool failures: content blocks with
type === 'tool_result'andis_error === true
Step 4: Parse the debug log
Read line by line. Collect lines that match any of:
[ERROR]orerror:— general errorsBLOCKED— hook blocks (router lockdown, creator guard)prompt is too long— context-length API errorsSyntaxError: Unterminated string in JSON— hook JSON parse failures
Step 5: Run heuristics and generate report
Build a Markdown report with these sections:
- Overview Metrics: user turns, tool invocations, tool errors, debug log error count
- Tool Usage Summary: sorted frequency table of tool names
- Heuristic Findings (flag each category if count > 0):
- Router Protocol Violations (
ROUTER-LOCKDOWN,TASK-CREATE VIOLATION) - Context Length Exceeded (
prompt is too long) - Hook JSON Parse Failures (
Unterminated string in JSON) - If none triggered: print a clean-system message
- Router Protocol Violations (
- Top Tool Failures: first 5 tool_result errors with truncated content (150 chars)
Step 6: Write report
Default output path: .tmp/transcript-analysis-<first-8-chars-of-uuid>.md (create .tmp/ if needed).
If --out <path> was supplied, write there instead.
- Tolerate malformed lines: wrap
JSON.parse()in try/catch per line; never abort on a single bad line. - Warn, don't fail, on missing debug log: the transcript alone provides useful metrics; missing debug log loses only heuristic signal.
- Truncate tool failure content to 150 chars to keep the report readable; collapse newlines to spaces.
- Derive project dir from
process.cwd()not from a hardcoded path — supports running from any agent-studio checkout location. - Show only the first 5 tool failures in the report; full data is in the transcript for deeper inspection.
node scripts/analyze-session-transcript.mjs
# or
pnpm debug:analyze
Analyze a specific session by UUID:
node scripts/analyze-session-transcript.mjs --session f1326443-490f-486b-bb67-01c72bf42408
Write report to a custom path:
node scripts/analyze-session-transcript.mjs --out .claude/context/reports/backend/session-analysis-2026-03-10.md
Typical report output structure:
# Session Analysis Report: f1326443-490f-486b-bb67-01c72bf42408
Generated: 2026-03-10T12:00:00.000Z
## Overview Metrics
- **User Turns:** 14
- **Tool Invocations:** 87
- **Tool Errors:** 3
- **Debug Log Errors:** 2
## Tool Usage Summary
- `Read`: 34 times
- `Edit`: 18 times
- `Bash`: 15 times
- `Write`: 12 times
- `TaskUpdate`: 8 times
## Heuristic Findings
#
Установить session-transcript-analyzer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadWriteBashВложенные файлы
FAQ
Что делает скилл session-transcript-analyzer?
Parses and merges Claude .jsonl transcripts with debug logs to generate a timeline heuristics report of API limits, context overflows, hook blocks, and tool failures.
Как установить скилл session-transcript-analyzer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл session-transcript-analyzer запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic