Reviews a Claude Code session and produces coaching-style feedback.
Language
Default: English. Switch to Russian if the user wrote to you in Russian. Keep the written review in one language — whichever matches the current conversation.
Where sessions are stored
Claude Code transcripts: ~/.claude/projects/<cwd-slug>/<session-id>.jsonl. Each line is an event (type: user | assistant | tool_use | tool_result). cwd-slug is a working directory with / replaced by -.
Launch modes
1. Current session (in-session)
The user says: “analyze this session” while inside an active session.
Find it like this:
# slug текущей директории
slug=$(pwd | sed 's|/|-|g')
# самый свежий JSONL в папке проекта
ls -t ~/.claude/projects/${slug}/*.jsonl 2>/dev/null | head -1
The most recently modified file is the current session. Read it partially (the last 200-500 lines are enough for an overview).
Important: when analyzing an active session, filter out your own skill-invocation message — it is not part of what needs to be analyzed.
2. Last completed session
“Analyze my last session” without clarification — take the second most recent JSONL in the same directory (the first is the current one).
3. By ID
“Analyze session abc123...” — search via find ~/.claude/projects -name "abc123*.jsonl".
What to read
The JSONL is large. Effective strategy:
- Read the first 50 lines — the context of the beginning.
- Read the last 200 lines — the finale and results.
- If the session is long (>1000 lines), pick 2-3 random fragments of 50 lines each in the middle.
Extract only type: user и type: assistant with the field message.content. Tool calls are interesting only if the agent was stuck (many repeated calls).
Review rubric
Evaluate the session along four axes. For each — 1-3 specific observations with a reference to a fragment, not general advice.
1. Quality of the user's prompts
- Is there context (what has already been tried, what is needed)?
- Is the goal clear or vague?
- Are they asking for a solution or asking to investigate?
- Where did the user ask a question although they could have given an instruction right away (or vice versa)?
2. Interaction with the agent
- Where did the agent go off track — and did the user notice / not notice?
- Were there moments when it was worth stopping the agent and replanning?
- Were the appropriate tools used (skills, subagents, plan mode)?
3. Missed opportunities
- Which skills/tools would have fit but were not invoked?
- Where could independent tasks have been parallelized?
- What should have been saved to memory/profile?
4. What went well
Mandatory. At least 1 point. Without this, the review turns into nitpicking.
Output format
Save to <vault>/reviews/YYYY-MM-DD-<session-short-id>.md:
---
session_id: <полный id>
date: <YYYY-MM-DD>
duration_turns: <число обменов>
topic: <одно предложение о чём была сессия>
---
# Разбор сессии <короткий id>
## О чём была сессия
<2-3 предложения>
## Что получилось хорошо
- <наблюдение + цитата/номер turn>
## Качество промптов
- <наблюдение>
## Взаимодействие с агентом
- <наблюдение>
## Упущенные возможности
- <наблюдение>
## Одна вещь на следующий раз
<самая важная рекомендация, одно действие>
Rules
- Never make up quotes. If you quote, it must be a real line from the JSONL.
- Don't moralize. The tone is a colleague, not a know-it-all mentor.
- Link to the profile: if in
<vault>/goals.mdthere is a goal that the session relates to — mention it. If intools-learned.mdthere was a tool that would have fit — reference it via[[tools-learned#...]]. - If the vault is not configured — suggest first running
lab-context, but still produce the review (just without references to the profile, and save it to a temporary file in the project subfolder, not to$HOME). - Never write to
$HOMEdirectly — only to subfolders of~/claude-lab-vault/or the equivalent.