session-reflection-analysis

Analyze Claude Code session logs with jq to generate improvement proposals.

330|47|Updated Aug 30, 2020
One-click install
npx skills add https://github.com/harperreed/dotfiles --skill session-reflection-analysis-harperreed
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: session-reflection-analysis
Source: https://github.com/harperreed/dotfiles/tree/main/.claude/skills/session-reflection-analysis
Command: npx skills add https://github.com/harperreed/dotfiles --skill session-reflection-analysis-harperreed

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires jq.

What problem does it solve?

It reduces inefficiency in your Claude Code sessions by spotting repeated mistakes, wrong assumptions, missing automation, and context that should persist in docs instead of being re-derived.

Core Features & Use Cases

  • Token-waste pattern detection: Flags behaviors like re-reading the same materials or unnecessary context churn that inflates usage.
  • Workflow improvement proposals: Produces copy-paste-ready recommendations across CLAUDE.md updates, new skills, slash commands, scripts, and workflow changes.
  • Session-level reflection: Guides you to summarize recent JSONL session data using jq (without reading raw session files directly) and then structure findings into a dated reflection document.
  • Use Case: After a week of development work, identify why iterations were slow (e.g., implementing something that already existed) and turn those findings into concrete automation and documentation updates.

Quick Start

Ask your assistant to run the session-reflection-analysis and produce a dated reflection with high/medium/low priority proposed improvements based on the last 7 days of session history.

Frequently Asked Questions about session-reflection-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze Claude Code session history for token waste and inefficiencies?

To analyze JSONL session logs for token waste, use jq to generate a token-reduced summary of your Claude Code history. This process detects repeated mistakes, missing automation, and context-loss after compaction without reading raw session files directly.

What is the best way to find repeated mistakes in Claude Code development workflows?

Finding repeated mistakes requires a session-level reflection that reviews recent JSONL session data. By summarizing the last 7 days of history, you can identify slow iterations, such as re-reading materials or re-implementing existing features, and flag them for correction.

How do I generate copy-paste-ready workflow improvement proposals from session logs?

You generate copy-paste-ready workflow improvement proposals by transforming session reflection findings into structured recommendations. These proposals cover CLAUDE.md updates, new skills, slash commands, and scripts to automate previously inefficient development tasks.

Do I need jq to extract and summarize JSONL session data?

Yes, jq is a required dependency to extract and summarize JSONL session data. It processes the raw project logs to create a token-reduced summary, enabling the analysis to detect context-loss and inefficiencies without directly reading the original files.

How do I prevent context loss after compaction in Claude Code sessions?

Preventing context loss after compaction involves identifying persistent context that should exist in documentation. Session analysis flags re-derived context and recommends specific documentation updates to ensure critical information survives future compaction events.

Can I use session analysis to update CLAUDE.md and slash commands automatically?

Session analysis produces structured proposals to update CLAUDE.md and create new slash commands, but it does not apply them automatically. It outputs dated reflection documents with high, medium, and low priority recommendations for you to copy and paste.