session-analyzer
БесплатноЗапускает вложенные скриптыНе проверенDebug and teach agentic coding: a deterministic-first session timeline + cost report, with optional narrative polish and a standalone JSX visualiser.
от bobmatnyc★ 160 звёзд на GitHubОб этом скилле
Session Analyzer
Produce a deterministic-first session report for debugging and teaching agentic coding with Claude MPM. The report reconstructs an entire session's timeline — every PM turn, subagent call, skill use, MCP call, the model behind each call, tokens in/out (plus cache), and a TOTAL estimated cost at public rack rates — directly from Claude Code's JSONL transcripts.
The core data is generated with zero LLM inference. Inference is an optional, opt-in polish step that only rewrites human-readable prose; the machine-readable data is never touched by a model.
When to use this skill
- Post-session debugging — understand what the PM actually did: which subagents ran, what they reported back, where time and tokens went, which MCP calls were made and how they responded.
- Teaching effective MPM usage — turn a real session into a readable, annotated timeline that shows good (and bad) delegation, skill use, and cost patterns.
- Cost analysis — see per-model and per-call token/cost breakdowns and a grand-total estimate at rack rates, split into PM vs. subagent cost.
The hybrid workflow
The workflow has three stages. Stages 1 and 3 are fully deterministic. Stage 2 is the only place inference is allowed, and it is entirely optional.
1. Extract (deterministic, no inference)
Run the offline reporter to parse the JSONL transcripts and emit the canonical Markdown report. This stage alone produces a complete, valid, usable report — token, cost, model, agent, skill, and MCP data, all with zero LLM inference.
# Most-recent session for the current project directory
claude-mpm session-report
# A specific session
claude-mpm session-report --session <UUID>
# Custom output path (use - for stdout)
claude-mpm session-report --session <UUID> --output /tmp/report.md
# A different project directory
claude-mpm session-report --project /path/to/project
Equivalent module form: uv run python -m claude_mpm.cli session-report ...
Flags:
--session <id>— session UUID; defaults to the most recent session for the project.--project <path>— project directory whose transcripts to read; defaults to the current directory.-o, --output <file.md>— output path;-writes to stdout.
Default output path: docs/reporting/session-tracker/{session_id}.md
The generated file has two parts: a YAML frontmatter block (session metadata
and cost totals) and a ## Timeline section with one ####-headed entry per
event. Each entry carries a machine-readable <!-- meta: ... --> comment that
holds the canonical per-call data (model, tokens, cost, type, attribution).
2. Optional narrative polish (opt-in inference)
This is the only non-deterministic stage, and it is optional — skipping it yields a fully valid report.
If you want a more teachable, readable report, you may edit the Markdown in place to rewrite each entry's prose:
- the
#### HH:MM · {actor} · {title}heading text (the{title}), - the entry's
{detail}body prose, - the
**Outcome:**line.
Hard constraints — do not break these:
- Never alter the
<!-- meta: ... -->comment on any entry. It is the canonical machine data the JSX renderer and downstream tooling read. - Never alter the frontmatter totals (
model_breakdown,grand_total_cost_usd,pm_cost_usd,subagent_cost_usd,autonomy,stat_cards,has_pricing_fallback, etc.). - Only rephrase human-facing prose. Do not invent facts not present in the transcript.
3. Render (deterministic)
Convert the canonical Markdown into a standalone React/JSX timeline:
python scripts/session_timeline_to_jsx.py docs/reporting/session-tracker/<session_id>.md \
-o docs/reporting/session-tracker/<session_id>.jsx
The script is bundled at scripts/session_timeline_to_jsx.py relative to this
skill directory. An identical copy also lives at scripts/session_timeline_to_jsx.py
in the repo root (used by the CLI render path and the test suite — do not delete
the root copy).
The renderer reads the frontmatter + events structure parsed from the
report and produces an interactive timeline dashboard. Because it consumes the
<!-- meta: ... --> data, it works on both raw (stage 1) and polished
(stage 2) reports identically — the polish only changes the prose it displays.
What each captured data point means
- Timeline entry — one event: a user prompt, a PM turn, an
Agentcall, aSkillcall, an MCP call, or an outcome. Headed#### HH:MM · {actor} · {title}. - actor —
bob(the human),mpm(the PM agent), or a subagent attribution name (e.g.Python Engineer). - Subagents called + their responses —
Agentcalls render asAgent → **agent-name** (model) — _short response to the PM_, capturing what each subagent reported back. - Skills used —
Skill → **skill-name** — _result_. - MCP calls + responses — memory / search / review MCP invo
Установить session-analyzer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл session-analyzer?
Debug and teach agentic coding: a deterministic-first session timeline + cost report, with optional narrative polish and a standalone JSX visualiser.
Как установить скилл session-analyzer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл session-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