review-sessions
Skill8 starsChanged 4 months agoMITView on GitHub
Analyse coding-agent session data (GitHub Copilot CLI events.jsonl and/or Claude Code conversation jsonl) to surface workflow efficiency, prompt-quality patterns, error trends, tool usage, security hygiene, session patterns. Supports `--agent {copilot,claude,all}`. Trigger: 'review sessions', 'session review', '/review-sessions'.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- toy-crane/claude-code-playbook-templatetheir own version, first seen Nov 15, 2026
- phmatray/ai-migration-kittheir own version, first seen Sep 14, 2026
- phmatray/tagouttheir own version, first seen Sep 14, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- toy-crane/claude-code-playbook-template★ 77same name
- phmatray/ai-migration-kit★ 4same name
- phmatray/tagout★ 4same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- demo-project/CLAUDE.mdCLAUDE.md
- project-template/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- close-weekSkill
- end-sessionSkill
- ingestSkill
- lintSkill
- new-engagementSkill
- plan-weekSkill
- project-statusSkill
- querySkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. 0 are common, 8 are distinctive, and 6 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
6
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
When the user says "review sessions", "session review", or invokes /review-sessions, analyse coding-agent session data to identify workflow …
- Very specific: line 19
If memory/schema.md exists in the current workspace, set WIKI_ROOT to memory/.
- Very specific: line 22
If no folder containing both schema.md and index.md can be resolved, report the missing path and stop.
- Very specific: line 34
No modifiers — incremental review using ops/review-state.json
- Distinctive: line 38
Use the agent's native file listing, search, JSON/JSONL reading, and reasoning capabilities.
- Distinctive: line 43
Read each JSONL file in manageable chunks.
- Distinctive: line 51
Keep the processed namespaced file IDs for the state update in Step 6.
- Distinctive: line 55
If the filtered inventory contains no unreviewed session files, report:
- Distinctive: line 56
When the last review was performed
- Distinctive: line 60
Stop here — do not generate an empty report or change the watermark.
- Distinctive: line 68
Per-agent split: when behaviour materially differs between Copilot CLI and Claude Code (e.g., plan-mode adoption, subagent usage, error …
- Distinctive: line 92
Use the Applies to column to make agent-specific guidance explicit
- Very specific: line 96
Create ops/review-reports/ if needed and save to ops/review-reports/YYYY-MM-DD.md.
- Very specific: line 150
If any finding is cross-cutting (applies beyond one project), update the relevant page under wiki/lessons/, wiki/patterns/, or …
“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Review Sessions
When the user says "review sessions", "session review", or invokes /review-sessions, analyse coding-agent session data to identify workflow improvements, prompt-quality patterns, error trends, and security hygiene issues.
Works across both supported agents:
| Agent | Where sessions live | Format | |||
| GitHub Copilot CLI | ~/.copilot/session-state/{session-id}/events.jsonl (+ plan.md, checkpoints/, command-history-state.json) | JSONL event stream — typed events (session.start, session.mode_changed, turn.user, turn.assistant, tool.invoked, …) with timestamp, id, parentId | |||
| Claude Code | ~/.claude/projects/{project-hash}/{session-id}.jsonl (+ ~/.claude/history.jsonl) | JSONL conversation turns — `type: user | assistant | tool_use | tool_result` records with timestamps |
Resolve the memory root
- If
memory/schema.mdexists in the current workspace, setWIKI_ROOTtomemory/. - Else if
schema.mdexists, setWIKI_ROOTto the current directory. - Else follow the memory-wiki path in
AGENT.md. - If no folder containing both
schema.mdandindex.mdcan be resolved, report the missing path and stop.
All ops/... paths below are relative to WIKI_ROOT.
Scope modifiers
Interpret these optional modifiers from the user's request:
--agent {copilot,claude,all}— source to review; defaultall--all— ignore the watermark and review every session--project SLUG— match the sessioncwdor git root--since YYYY-MM-DD— include sessions on or after this date- No modifiers — incremental review using
ops/review-state.json
Step 1: Discover and normalize sessions directly
Use the agent's native file listing, search, JSON/JSONL reading, and reasoning capabilities. Do not require or create a helper extraction script.
- Inventory session files for the selected agent source(s).
- For incremental mode, read
ops/review-state.jsonif it exists and exclude namespaced file IDs already present inwatermark.reviewed_files. A file ID iscopilot:{absolute-path}orclaude:{absolute-path}. - Apply project and date filters before reading large files.
- Read each JSONL file in manageable chunks. Parse each line independently; count and report malformed lines instead of silently discarding them.
- Normalize records into this common in-memory model:
agent:copilotorclaudesession_id,timestampkind:user_turn,assistant_turn,tool_call,tool_result,error, ormode_changetext,tool_name,success,duration_mswhen available
- Copilot mapping: use event
typevalues such asturn.user,turn.assistant,tool.invoked, tool completion/error events, andsession.mode_changed. - Claude mapping: use
type: user|assistantrecords and nestedtool_use/tool_resultcontent; infer plan-mode changes only when explicitly represented. - Keep the processed namespaced file IDs for the state update in Step 6.
Step 2: Handle "nothing new"
If the filtered inventory contains no unreviewed session files, report:
- When the last review was performed
- How many total sessions are available per agent
- Suggest running with
--all(and optionally--agent copilotor--agent claude) for a full review
Stop here — do not generate an empty report or change the watermark.
Step 3: Interpret the findings
Analyse the JSON output across all 6 dimensions. For each, provide:
- Key findings — cite specific numbers and examples, not just summaries
- What's working well — positive patterns to reinforce
- Areas for improvement — specific, actionable suggestions
- Per-agent split when behaviour materially differs between Copilot CLI and Claude Code (e.g., plan-mode adoption, subagent usage, error rate)
Dimensions
- Workflow efficiency — session lengths, turn durations, restart frequency, plan-mode adoption (Copilot:
session.mode_changedevents; Claude: plan-mode toggle in turns) - Prompt quality — average length, vague prompts (cite examples), correction rate, multi-intent prompts
- Error patterns — error rate, retry loops (cite specifics), most common errors, "file not read" errors, tool failures
- Tool usage — most/least used tools, subagent adoption, Write vs Edit ratio, task-management adoption (TodoWrite / SQL todos)
- Security hygiene — any secrets detected (cite masked values), bypass-permissions rate (Copilot:
--allow-all-tools; Claude:--dangerously-skip-permissions) - Session patterns — peak hours, busiest days, project distribution, knowledge capture rate (how often
end-sessionoringestis invoked)
Step 4: Build the recommendation table
| Priority | Finding | Recommendation | Effort | Applies to |
| HIGH | ... | ... | Low/Medium/High | copilot / claude / both |
| MEDIUM | ... | ... | ... | ... |
| LOW | ... | ... | ... | ... |
Rules:
- HIGH = security issues, frequent errors, significant time waste
- MEDIUM = suboptimal patterns with clear improvements
- LOW = nice-to-have optimizations
- Maximum 10 recommendations
- Use the Applies to column to make agent-specific guidance explicit
Step 5: Save the full report
Create ops/review-reports/ if needed and save to ops/review-reports/YYYY-MM-DD.md.
Format:
# Session Review Report — YYYY-MM-DD
## Executive Summary
[Top 3 findings in bullet points — call out per-agent splits when relevant]
## Metrics Overview
| Metric | Copilot CLI | Claude Code | Combined |
|---|---|---|---|
| Sessions reviewed | ... | ... | ... |
| Total turns | ... | ... | ... |
| Avg turn duration | ... | ... | ... |
| Error rate | ... | ... | ... |
| Plan-mode rate | ... | ... | ... |
## Detailed Analysis
### 1. Workflow Efficiency
### 2. Prompt Quality
### 3. Error Patterns
### 4. Tool Usage
### 5. Security Hygiene
### 6. Session Patterns
## Recommendations
[The prioritized table from Step 4]
## Trend Deltas
[If previous snapshots exist, show changes since last review]Step 6: Update state
Update ops/review-state.json:
- Set
watermark.last_review_dateto today's ISO date - Append the namespaced processed file IDs collected in Step 1 to
watermark.reviewed_files, deduplicated, so re-processing one agent does not invalidate the other - Append a trend snapshot to
trend_snapshots:{ "date": "YYYY-MM-DD", "by_agent": { "copilot": { "sessions_reviewed": N, "error_rate": X.XXX, "plan_mode_rate": X.XXX, "avg_turn_duration_ms": N }, "claude": { "sessions_reviewed": N, "error_rate": X.XXX, "plan_mode_rate": X.XXX, "avg_turn_duration_ms": N } }, "combined": { "sessions_reviewed": N, "correction_rate": X.XXX, "subagent_rate": X.XXX, "secrets_detected": N } }
Step 7: Knowledge graduation
If any finding is cross-cutting (applies beyond one project), update the relevant page under wiki/lessons/, wiki/patterns/, or agent-config/knowledge/.
Step 8: Show results
Display to the user:
- Executive summary — top 3 findings (with per-agent annotation when relevant)
- Recommendation table — full table including the Applies to column
- Report path — where the full report was saved
- Trend deltas — if previous snapshots exist, show key metric changes per agent (arrows: up/down/stable)
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

