session-reflection-analysis
Analyze Claude Code session history to identify inefficiencies, optimize token usage, and propose workflow improvements.
Introduction
The Session Reflection Analysis skill is designed for developers who use Claude Code to maintain high-velocity, high-quality coding sessions. By programmatically processing session history, this tool enables you to identify recurring patterns of wasted effort, such as redundant file reads, incorrect path exploration, or manual tasks that could be automated. It functions as a meta-analysis tool, helping you improve the agent's performance over time through better documentation, customized slash commands, and optimized workflow habits.
-
Automatically locates project-specific session files stored in ~/.claude/projects/ based on the current directory.
-
Generates a highly compressed JSONL summary using jq to minimize token consumption while preserving vital context like user intents, tool calls, and result sizes.
-
Deploys an 'Explore' subagent to perform a heuristic analysis on the summary file, looking for specific inefficiency markers like token wastage, repeated mistakes, or missing automation.
-
Produces a structured reflection document (markdown) that outlines actionable, copy-paste-ready improvements for your project.
-
Categorizes findings by priority, providing concrete examples from your actual chat history to justify each proposed change.
-
Always utilize the provided jq script to generate the summary; never read raw session files directly to avoid exceeding token limits.
-
The output is advisory; review the proposed improvements carefully and manually apply them to your CLAUDE.md, .claude/skills, or .claude/commands/ directories.
-
Target common inefficiencies: identify when you are re-reading files, failing to verify assumptions, or missing opportunities for documentation updates.
-
This tool is best used at the end of a long work session or whenever you feel the agent's performance has degraded. It is not intended for real-time code generation, but rather for continuous process improvement in your development lifecycle.
Repository Stats
- Stars
- 312
- Forks
- 46
- Open Issues
- 1
- Language
- Vim Script
- Default Branch
- main
- Sync Status
- Idle
- Last Synced
- Apr 28, 2026, 12:58 PM