claude-session-analysis

Analyze Claude Code session JSONL logs to extract configuration improvements.

Updated Nov 18, 2025
One-click install
npx skills add https://github.com/cajias/claude-skills --skill claude-session-analysis
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: claude-session-analysis
Source: https://github.com/cajias/claude-skills/tree/main/skills/claude-session-analysis
Command: npx skills add https://github.com/cajias/claude-skills --skill claude-session-analysis

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps you learn from past Claude Code sessions so you can reduce repeated permission prompts, avoid recurring mistakes, and improve your setup with better skills and CLAUDE.md guidance.

Core Features & Use Cases

  • Session diagnostics: Measure compactions, interruptions, and continuation patterns to understand why a session became inefficient.
  • Configuration improvement: Identify tools that should be pre-granted, skills worth creating, and rules that belong in CLAUDE.md.
  • Scripted analysis: Use the included Python utilities to summarize tool usage, extract user messages, and generate optimization recommendations from JSONL session files.
  • Example use case: A long Claude Code project keeps asking for the same permissions and repeating the same investigation path; this Skill pinpoints the pattern and suggests concrete configuration fixes.

Quick Start

Ask Claude to analyze a Claude Code session JSONL file and summarize the repeated permissions, corrections, and investigation patterns that should inform better tool access, new skills, or CLAUDE.md rules.

Frequently Asked Questions about claude-session-analysis

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

FAQPage Schema
How do I analyze Claude Code session logs to stop repeated permission prompts?

You can analyze Claude Code session logs to extract configuration improvements from repeated permissions. The Skill parses JSONL files to detect recurring tool access requests and suggests pre-granting them in your setup.

What is the best way to find repeated mistakes in Claude Code JSONL session files?

The best way to find repeated mistakes in Claude Code JSONL files is detecting correction and investigation loops. This Skill uses Python utilities to extract user messages and summarize tool usage patterns causing recurring errors.

Can I use this to figure out which rules belong in my CLAUDE.md file?

Yes, you can figure out which rules belong in your CLAUDE.md file. By analyzing session compactions and interruptions, the Skill identifies recurring investigation paths and outputs actionable configuration rules for guidance.

Does session analysis work with subagent logs and compaction summaries?

Yes, session analysis works with subagent logs and compaction summaries. The Skill applies pattern detection across these formats to evaluate tool access and suggest concrete configuration fixes for better efficiency.

Why does my Claude Code project keep repeating the same investigation patterns?

Your Claude Code project repeats investigation patterns due to missing configuration guidance. Analyzing JSONL session logs reveals these loops and recommends creating new skills or adding rules to prevent them.