plugins/handbook-reflect/skills/reflect/SKILL.md
--- name: reflect description: Analyze a Claude Code session for "wrong-turn" moments (corrections, retries, waste, reversals, dead-ends) and produce an interactive HTML dashboard with copy-able recommendations (CLAUDE.md rules, docs, scripts, hooks, memory entries, sub-skills, etc.) that would help future agents reach the goal faster. Defaults to reflecting on the current in-context session; optionally accepts a session ID or JSONL path. Use when the user invokes /reflect or asks to learn from
npx skillsauth add nikiforovall/claude-code-rules plugins/handbook-reflect/skills/reflectInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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.development
Generate beautiful, self-contained HTML pages that visually explain systems, code changes, plans, and data. Use when the user asks for a diagram, architecture overview, diff review, plan review, project recap, comparison table, or any visual explanation of technical concepts. Also use proactively when you are about to render a complex ASCII table (4+ rows or 3+ columns) — present it as a styled HTML page instead.
tools
Expert guidance for using the GitLab CLI (glab) to manage GitLab issues, merge requests, CI/CD pipelines, repositories, and other GitLab operations from the command line. Use this skill when the user needs to interact with GitLab resources or perform GitLab workflows.
tools
--- name: reflect-tree description: Visualize 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 /refl
tools
--- name: reflect-solution description: Summarize 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 change