Analyze session data from local AI coding tools. Three bundled scripts extract raw data. You (the agent) read the output and form your own observations — there are no hardcoded rules or thresholds in the scripts.
Scripts read directly from these paths, no copying needed:
ToolPathContentClaude Code~/.claude/projects/*.jsonlFull transcripts with tool_use blocksClaude Code~/.claude/history.jsonlUser input historyClaude Code~/.claude/sessions/*.jsonSession metadataCodex~/.codex/sessions/*/*.jsonlStructured eventsKimi Code~/.kimi/sessions/*/wire.jsonlWire protocol with ToolCall entries
bash
# Text-based analysis (terminal output)
python3 ~/.claude/skills/ai-session-analysis/scripts/analyze.py
python3 ~/.claude/skills/ai-session-analysis/scripts/tool_analysis.py
# HTML report with charts (opens in browser)
python3 ~/.claude/skills/ai-session-analysis/scripts/generate_report.py [output.html]
Zero dependencies, Python 3 stdlib only. All scripts are pure data extractors — they present numbers, distributions, and timelines without any interpretation.
analyze.py — Overview:
tool_analysis.py — Deep dive:
generate_report.py — HTML report:
Read both outputs carefully. Then tell the user what you see. Consider:
Do not apply fixed thresholds or rules ("if bash > 40% then warn"). Look at the whole picture and use judgment. If something stands out, mention it. If nothing does, say so.
The HTML report ( generate_report.py) embeds your session data directly — file paths, shell commands, project names, and tool usage patterns. This is safe for personal use on your own machine, but do not share the generated HTML file with others or host it publicly. The terminal-based scripts ( analyze.py, tool_analysis.py) only print aggregate statistics and are safe to share.
~/.claude/projects/*.jsonl (assistant → content blocks with "type": "tool_use"), not in history.jsonl.~/.codex/sessions/2026/ subdirectories (organized by year/month/day).wire.jsonl via payload.function.name.