skills/session-review/SKILL.md
Multi-session AI coding history analysis across Copilot CLI, Claude Code, and VS Code sessions for a project. Collects raw logs, normalizes them into a unified format, and produces an actionable report covering recurring bugs, tool-error patterns, missing tests, refactoring opportunities, process improvements, and documentation gaps. Supports incremental analysis — only new sessions are processed on repeat runs, with persistent storage at ~/.retro/<project>/. Use this skill whenever the user asks to review, analyze, or get a retrospective on AI coding sessions, chat history, agent logs, copilot sessions, what went wrong across sessions, what patterns the AI made, or wants a report on how the AI performed on a project. Also trigger for phrases like "look at my sessions", "analyze my chat history", "what bugs recurred", "review my AI sessions", or "how has the AI been doing".
npx skillsauth add cyberelf/agent_skills session-reviewInstall 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.
You are performing a cross-session AI assistant analysis for a software project.
The scripts you need are bundled alongside this SKILL.md in scripts/.
~/.claude/skills/session-review/
├── SKILL.md ← you are here
└── scripts/
├── retro.ts ← orchestrator (run this)
├── get_hist.ts ← raw session collector
└── normalize_hist.ts ← normalizer
Set SKILL_SCRIPTS="$HOME/.claude/skills/session-review/scripts" at the start of any bash
commands you run, so you can refer to scripts as $SKILL_SCRIPTS/retro.ts.
Follow each phase in order. Do not skip phases.
/session-review ~/workspace/crab),
use that path as PROJECT_PATH.Cargo.toml, package.json,
src/, or similar project markers, use $PWD.PROJECT_NAME is the directory's basename. Storage lives at ~/.retro/<PROJECT_NAME>/.
SKILL_SCRIPTS="$HOME/.claude/skills/session-review/scripts"
npx tsx "$SKILL_SCRIPTS/retro.ts" "$PROJECT_PATH" run
This runs two steps automatically:
get_hist.ts copies raw sessions from Copilot CLI
(~/.copilot/session-state), Claude Code (~/.claude/projects/), and VS Code to
~/.retro/<PROJECT_NAME>/raw/normalize_hist.ts --incremental converts sessions to unified
Markdown in ~/.retro/<PROJECT_NAME>/normalized/On the first run, all sessions are collected. On subsequent runs, only sessions newer
than lastCollectedAt in the manifest are added.
If the user wants a full re-analysis from scratch, add --full:
npx tsx "$SKILL_SCRIPTS/retro.ts" "$PROJECT_PATH" run --full
If the pipeline exits non-zero, read its stderr to diagnose before continuing.
Check progress anytime:
npx tsx "$SKILL_SCRIPTS/retro.ts" "$PROJECT_PATH" status
Read ~/.retro/<PROJECT_NAME>/normalized/index.json.
From the sessions array, compute:
timestamp)copilot-cli, claude-code, vscode)toolCallCounterrorCounterrorCount (ID, date, count)Print a brief summary:
Sessions: N • Date range: YYYY-MM-DD – YYYY-MM-DD
Sources: copilot-cli(N) claude-code(N) vscode(N)
Tool calls: N • Errors: N
Top error sessions: [list]
Do not read combined.md in full — it will overflow context. Read individual
session .md files from ~/.retro/<PROJECT_NAME>/normalized/sessions/.
Sampling order:
errorCounttimestampIf total session count ≤ 15, read them all.
For each session note:
If present, read these files (they're essential for judging whether a pattern is a known limitation vs. an actionable gap):
<PROJECT_PATH>/AGENTS.md — coding agent instructions (highest priority)<PROJECT_PATH>/ARCHITECTURE.md<PROJECT_PATH>/README.md (first 80 lines only)<PROJECT_PATH>/openspec/changes/ directory listing (if it exists)Write to:
~/.retro/<PROJECT_NAME>/reports/<YYYY-MM-DD>-report.md
Also write/overwrite ~/.retro/<PROJECT_NAME>/reports/latest-report.md with the same
content. Create the reports/ directory if it doesn't exist.
After writing, update the manifest's lastReportAt by editing the file directly:
~/.retro/<PROJECT_NAME>/manifest.json
Use this structure exactly. Omit sections with no findings.
# <PROJECT_NAME> — Session Analysis Report
**Period:** <first-date> – <last-date>
**Sessions analyzed:** N (M tool calls · K errors)
**Sources:** <breakdown>
---
## Executive Summary
<3–5 sentences. Lead with P0 issues. Be specific — name files and functions.>
---
## 1. Recurring Bugs — Demand Regression Tests
### 1.N <Short title>
Observed in sessions **<dates>**. <What happened, root cause if known.>
**Action:** <File path + what the test should assert.>
---
## 2. Critical Unresolved Issues (open as of <last-date>)
### 2.N <Short title> *(P0|P1)*
> "<Exact quote from session showing the problem>"
<Root cause.>
**Action:**
1. <File and function to change.>
2. <Test to add.>
---
## 3. Tool Error Tax — Documentation-Preventable Failures
| Category | Count | Root cause |
|---|---|---|
Add to AGENTS.md under **"Known Tool Behavior"**:
\`\`\`markdown
### <tool>
<guidance>
\`\`\`
---
## 4. Code Refactoring
### 4.N <Title> *(P1|P2)*
<Which files, what to change, step-by-step if non-trivial.>
---
## 5. Missing Tests — Specific Gaps
| File | Missing test |
|---|---|
---
## 6. Process Improvements
### 6.N <Title>
**Add to AGENTS.md `## <Section>`:**
> <Exact text to add>
---
## 7. Documentation Updates Required
<AGENTS.md, ARCHITECTURE.md, README — specific sections and what to add.>
---
## 8. OpenSpec Gaps
<Specs that should exist but don't, or specs needing updates.>
---
## Priority Summary
| Priority | Item | Owner area |
|---|---|---|
| **P0** | ... | ... |
| **P1** | ... | ... |
| **P2** | ... | ... |
| **P3** | ... | ... |
After writing the report, tell the user:
~/.retro/<PROJECT_NAME>/reports/<date>-report.md/session-review <project-path>npx tsx "$SKILL_SCRIPTS/retro.ts" <project-path> statusnpx tsx "$SKILL_SCRIPTS/retro.ts" <project-path> cleanup --clean=raw
Options: --clean=raw (largest), --clean=normalized, --clean=reports, --clean=allThese exist so the report is trustworthy and actionable, not just voluminous.
crab-agents/src/system_agent.rs asserting that agent_send_message returns an
error when sender_id == receiver_id" is actionable.tools
Agent-first graph-backed knowledge wiki builder with a self-contained CLI. Use for Graphwiki init/build/ingest/update, source indexing, semantic entity and relationship extraction, generated wiki pages, graph JSON/HTML explorer, evidence line ranges, query/explain question answering, synthesis pages, HTML reports, adding confirmed entity types, applying patches, cleanup, validation, tasks, and SQLite cache generation.
development
Use when the user asks to export a local HTML file, web page, or invitation page to a single-page PDF, a no-pagination PDF, a long PDF with auto-calculated height, or a PDF without headers and footers. Trigger on phrases like 单页 PDF, 不分页, 自动计算长度, 长图 PDF, 去掉页眉页脚, export HTML to single-page PDF, or print page to one PDF page.
development
Build and expand an insight-ready raw-material layer by discovering page-level sources, deduplicating them with an internal pre-crawl link index, capturing raw Markdown, verifying metadata in place, and keeping ingest/register state aligned. Use for additive source harvesting, raw webpage capture, source registry maintenance, source/ingest tracking, source/raw downloads, and in-place verification rather than final synthesis.
development
Generate a structured, illustrated Q&A HTML document from the current conversation. Scans the conversation for conceptual questions the user asked and Claude's answers, then produces a self-contained HTML file with styled cards and SVG diagrams for technical/architectural topics. If a Q&A HTML file already exists in the current project directory, appends the new Q&As to it instead of creating a new file. Trigger this skill whenever the user asks to "generate Q&A", "create Q&A from conversation", "save Q&A", "document our Q&A", "turn this chat into Q&A", or anything suggesting they want the conversation's questions and answers captured as a document — even if they don't use the exact phrase "Q&A skill".