/reflect:reflect `<current_session> or <session-id-or-path>`from reflect
Analyzes a Claude Code session for wrong-turn moments (corrections, retries, waste, reversals, dead-ends) and produces an interactive HTML dashboard with copy-able recommendations to prevent future issues.
Ships in reflect. 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; scripts run unread.
Produce a single-file interactive HTML dashboard analyzing a Claude Code session for places the agent took a wrong turn, paired with concrete repo additions that would prevent the same wrong turn next time.
/reflect (no args) → analyze the current session from the in-context conversation. Do not re-read the session JSONL — work from the agent's own memory of what happened./reflect <session-id> or /reflect <path-to-jsonl> → analyze a different session. Run scripts/analyze_session.py <path> directly (this skill runs in a forked context — context: fork — so the compressed transcript can enter your context safely). The script outputs a compact markdown transcript: system reminders stripped, tool calls/results collapsed to one-liners, compaction blocks expanded with embedded user quotes. Then you analyze that transcript to identify wrong-turn moments — the script does NOT classify incidents, it only compresses.Session JSONLs live under: ~/.claude/projects/<encoded-cwd>/<session-id>.jsonl
Open-ended — but the common shapes are:
"no", "don't", "stop", "actually")Severity:
Confidence (0–100): how sure you are this is a real wrong turn worth surfacing, vs. signal noise. Be honest — low-confidence items are not bugs, they let the user filter out speculation.
Render as data-conf="<n>" on each .incident plus a small badge. The dashboard slider hides incidents below the chosen threshold.
Open-ended. Anything that would help a future agent reach the goal faster. Examples (not a fixed taxonomy — pick what fits the incident):
CLAUDE.md block (project or user)docs/ARCHITECTURE.md, README pointer, architecture mapscripts/<name>.sh wrapping a known-good command.claude/settings.json PreToolUse / PostToolUse for hard blocks (e.g. block edits to a generated file)~/.claude/.../memory/~/.claude/skills/.claude/agents/permissions in .claude/settings.jsonEach recommendation should map to one or more incidents (the dashboard renders these as addresses #N links).
Synthesize a fresh single-file HTML dashboard each run, using reference/example.html as inspiration (not a template — override anything that doesn't fit the session). The reference file establishes:
--bg, --panel, --fg, --muted, --accent, etc.) — keep this schemeaddresses #N link to scroll-and-highlight the matching incidentOutput directory — do not write inside the skill folder. Resolve a temp dir from the environment, in this preference order:
$TMPDIR (Unix/macOS)$TMP or $TEMP (Windows / Git Bash)/tmp as fallbackThen create a reflect/ subdir inside it (mkdir -p) and write the report as <that-dir>/reflect/<slug>.html. Slug rules — kebab-case, derived from session goal:
auth-middleware-rewrite)<YYYY-MM-DD>-<topic>.htmlOpen it in the browser when done: start "" <path> (Git Bash on Windows).
reference/example.html — canonical inspiration HTML. Read before generating.scripts/analyze_session.py — JSONL compressor. Strips system reminders, preserves real user messages, collapses tool calls/results to one-liners, expands compaction blocks. Output is markdown to stdout. Use only for explicit sessions — never on the current in-context session.Default (no args) — reflect on current session:
reference/example.html for the current aesthetic.<temp>/reflect/<slug>.html) — fresh HTML, same look-and-feel as the reference, populated with the real incidents/recs.start "" <path>.Explicit session — /reflect <id-or-path>:
~/.claude/projects/<encoded-cwd>/<id>.jsonl).scripts/analyze_session.py <path>. Skill is forked (context: fork), so the compressed transcript (tens of KB even for multi-MB JSONLs) is safe in context. No subagent.Read the JSONL directly with offset/limit scoped to the event by turn/tool. JSONL is source of truth; transcript is the index.What SKILL.md sets; muted values are Claude Code's defaults
3 skills in this plugin
/reflect-solutionSummarize WHAT WAS SHIPPED in a Claude Code session as a self-contained HTML slide deck — the elevator pitch (problem, solution, decisions, artifacts, verification, gaps), not a play-by-play of tool calls or debugging detours. Defaults to the current in-context session; optionally accepts a session ID or JSONL path. Renders directly in the reflect aesthetic — no delegation. Use when the user invokes /reflect-solution or asks for a recap deck of what changed./reflect-treeVisualize a Claude Code session as a quest/skill tree — a navigable SVG graph where nodes are turns and edges show flow, with distinct visual encoding for normal flow, dead-ends, corrections, retries, reversals, and backtracking. Sibling to /reflect (which produces an incidents+recommendations dashboard); this one shows the journey itself. Defaults to the current in-context session; optionally accepts a session ID or JSONL path. Use when the user invokes /reflect-tree or asks to map a session as a tree/graph/journey.npx claudepluginhub nikiforovall/claude-code-rules --plugin handbook-reflectOther plugins' skills for the same job