session-report

Generate an interactive HTML report of Claude Code session token usage from local transcripts.

1|Updated Jul 6, 2015
One-click install
npx skills add https://github.com/ksolomon/dotfiles --skill session-report-ksolomon
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: session-report
Source: https://github.com/ksolomon/dotfiles/tree/main/AI/.claude/plugins/marketplaces/claude-plugins-official/plugins/session-report/skills/session-report
Command: npx skills add https://github.com/ksolomon/dotfiles --skill session-report-ksolomon

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Claude Code usage data is scattered across thousands of JSONL transcript files in ~/.claude/projects, making it hard to see where tokens, cache, and subagent costs actually go. This Skill consolidates those transcripts into a single explorable HTML report with findings and optimization suggestions. ## Core Features & Use Cases - Transcript Analysis: The bundled Node.js analyzer scans ~/.claude/projects JSONL files, deduplicating API calls by requestId and replayed session history by uuid to avoid overcounting. - Rich Breakdowns: Reports tokens by project, subagent type, skill/slash command, day timeline with a session gantt, cache breaks over 100k uncached input, and the most expensive prompts with ±2-message transcript context. - Use Case: Run it weekly to spot that one project consuming 40% of tokens, a cache-hit rate below 85%, or a slash command spawning costly subagents, then get concrete recommendations to cut waste. ## Quick Start Ask the AI to generate a session report of my Claude Code usage for the last 7 days and save the HTML file here.

Frequently Asked Questions about session-report

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

FAQPage Schema
How do I analyze Claude Code token usage across sessions?▼

Run the bundled analyze-sessions.mjs script with Node.js against ~/.claude/projects to aggregate tokens, cache reads, subagent calls, and skill usage. Pass --json and optionally --since 7d, then embed the output into the HTML template for an interactive report.

How to find the most expensive prompts in Claude Code?▼

The analyzer ranks prompts by total tokens including subagents spawned during the turn, and the report lists them with expandable ±2-message transcript context. Task-notification continuations are rolled into the originating prompt for accurate attribution.

What time ranges does the session report support?▼

The default window is the last 7 days via --since 7d. You can also pass values like 24h, 30d, or an ISO date, and omitting --since analyzes all-time transcripts.

Does the analyzer double-count resumed Claude Code sessions?▼

No. It deduplicates globally by entry uuid so replayed history from resumed sessions is not counted twice, and dedupes API calls by requestId keeping the final output_tokens to avoid 3-10x overcounting.

What is a cache break in Claude Code usage reports?▼

A cache break is a single API call with over 100k uncached input tokens, meaning the prompt cache was missed. The report lists the largest breaks with timestamps, projects, and transcript context so you can find what invalidated the cache.