/retro:session [--last N] [--session <id>] [--project <dir>] [--plugin <name>] [--light]from retro
Analyzes Claude Code session logs to produce actionable config changes (CLAUDE.md rules, memory files, hooks) based on measured friction and cost. Supports full retrospectives, plugin-behavior queries, and light CLAUDE.md suggestions.
Ships in retro. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Turns a Claude Code session into config changes, not a report nobody reads.
One project at a time. ~/.claude/projects/ holds transcripts from every repo ever
opened here, including work ones — never widen to all projects, and never read another
project's logs unless the user names it.
The one exception is plugin mode (below): it reads plugin-recorder's files from every
project, which hold names, counts, durations and statuses only — no prompts, no tool
inputs, no paths beyond a project's basename. It never opens another project's transcript.
Requests the user keeps typing across projects are /retro:repeated-asks, which reads
prompt text from every config dir and runs only when the user asks for that.
| The user asks | Mode |
|---|---|
| "how did that session go", "analyze the last N sessions" | Full — Phases 1–4 |
"how did <plugin> behave", "why was /x:y slow over there", or pastes a session ID from another project | Plugin — below, then Phases 2–4 on its output |
"what should go in CLAUDE.md / memory from this session", --light | Light — below; no log analysis |
| "what do I keep asking for", "I always type the same thing", across projects | Hand off to /retro:repeated-asks |
Do not ask for session IDs. Run:
${CLAUDE_PLUGIN_ROOT}/scripts/plugin-runs.sh <plugin> [--days N] [--project <basename>]
${CLAUDE_PLUGIN_ROOT}/scripts/plugin-runs.sh --list # which plugins were recorded
It reports invocations by command and version, subagent calls and failures by
subagent_type, turn durations, and a per-project breakdown. If it prints No plugin-recorder data found, say so, suggest installing the plugin-recorder plugin, and
fall back to asking which project to read — the old path, one project at a time. Cite the
script's lines as evidence; a failure row with no session in this project cannot be read
deeper, so do not guess at its cause.
Only the current session, from the conversation already in context — no digest, no log
reads. List what a fresh session would have needed to know: corrections the user gave,
facts discovered the hard way, commands that turned out to be the right ones. For each,
name the destination (project CLAUDE.md, a memory file, or nothing if it is one-off) and
quote the exact text to add. Then ask which to apply. Skip Phases 1–3.
With no --last or --session given, digest the ${user_config.default_sessions} most
recent session(s) (the default_sessions option; /plugin configure retro changes it).
${CLAUDE_PLUGIN_ROOT}/scripts/session-digest.sh --list # what's available
${CLAUDE_PLUGIN_ROOT}/scripts/session-digest.sh --last ${user_config.default_sessions} --prompts
${CLAUDE_PLUGIN_ROOT}/scripts/session-digest.sh --last 3 --prompts # a trend
Everything the digest prints is measured from the log. See digest-fields.md for what each section means and for the log-schema facts the script relies on (they are not obvious and are easy to get wrong).
When running inside the session being analyzed, do not re-read the transcript — the conversation is already in context. Run the digest anyway: wall clock, denials and hook blocks are not visible from inside the conversation. Expect no cost figure — that record is flushed at session end — so rank by wall clock and denials, and say cost was unavailable rather than estimating it.
Then check the project's auto-memory, which every future session recalls:
${CLAUDE_PLUGIN_ROOT}/scripts/memory-check.sh # prints nothing when clean
Each line is <KIND> <file> — <detail>. STALE (its verify: command failed) and
MISSING-REF (a path or commit it cites is gone) are findings for Phase 3. UNVERIFIED-OLD
and OPEN-CLAIM are weaker: report them as one grouped line, not one finding each.
Rank by cost, in this order:
<evidence_rule priority="critical">
Every finding cites its evidence: a turn number from --prompts, a digest line, or a
timestamp. A finding you cannot cite is a finding you invented — drop it. Do not claim to
have measured something the digest does not print.
</evidence_rule>
Each finding must name where the fix lives. A finding with no destination is an observation, and observations do not change the next session. Mapping table and the repo rules that apply when the destination is a plugin: action-mapping.md.
memory-check findings route to the memory file itself. For each STALE or MISSING-REF
line, read the memory file and the code it describes, then propose exactly one of:
<file> — the fact changed; quote the corrected text, the matching
MEMORY.md line, and a verify: command that would have caught it.<file> — the fact no longer holds or no longer matters; also drop
its MEMORY.md line.Never apply either from the checker's line alone: a failing verify: can be a predicate
that was written wrong. The evidence is what you read in the current code.
Report format, one block per finding:
FINDING — <one line>
Evidence: turn 7, turn 11 | digest: "permission denials: 2 — Bash | permission-rule"
Cost: <what it cost: minutes, dollars, a failed thread>
Destination: <file to change>
Change: <the concrete edit, quoted>
Close with a Keep doing section — one or two things the digest shows worked — and then ask which changes to apply. Apply only what the user picks; edit the named files directly.
Not a code review of what was built. Not a git-history summary. Not a satisfaction survey — do not ask the user to rate the session on a scale; the log already says what it cost.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub juanmhidalgo/claude-plugins --plugin retro2 skills in this plugin