Claude Session Usage Report
Turn local Claude Code session data into an explorable HTML usage report.
The skill explicitly reads session transcripts under ~/.claude/projects and produces HTML containing project, prompt, skill, and subagent information, but it does not specify user confirmation, sensitive-data redaction, access isolation, temporary-file cleanup, or rollback. It uses bundled local code and shows no evidence of malicious exfiltration, so some credit is warranted, but substantial points are deducted for data exposure and weak recovery controls.
The steps, script arguments, deduplication logic, and malformed-input handling are described in relatively concrete source code, making the happy path understandable. However, there are no tests for the key paths, and execution depends on Node.js, the expected home-directory layout, and an editing-capable environment; missing files, corrupt transcripts, permissions, and failure feedback are insufficiently covered. Static calibration and uncertainty require deductions.
The skill has a clear use case: analyzing Claude Code session usage, with stated inputs, time windows, and output format. It does not clearly define non-fit cases, prerequisites, permission boundaries, semantic trigger conditions, or Chinese-language report support. Its core function is local and does not entirely depend on overseas network services, so no mainland-China reachability deduction is applied.
The SKILL.md is readable and layered, with steps, parameter examples, output naming, template constraints, and guidance for large JSON. The repository supplies Apache-2.0 licensing, official maintenance context, and CI signals, but the skill itself lacks installation prerequisites, versioning policy, changelog, known limitations, troubleshooting, and an explicit maintenance path, preventing a near-perfect score.
The skill is designed to produce a self-contained HTML report and specifies anomaly and optimization sections, so the intended output is directly usable. No representative output or statically verifiable result is included, and report quality depends on transcript shape, template availability, and manual narrative judgment; review and correction may still be needed. The static cap and limited completeness evidence justify the deductions.
The analyzer source, parameters, and output fields are auditable, and comments explain the intended deduplication and accounting behavior. However, there is no committed test suite covering this skill's key paths, no real CI execution evidence for it, and no independent corroboration. Static review therefore supports only limited verifiability.
- The skill embeds local Claude session prompts, project names, skills, and subagent statistics into the report; confirm that the working directory and report audience are appropriate for sensitive data.把
- Missing transcript directories, permission failures, corrupt JSON, and absent scripts or templates do not have clearly specified user-facing recovery behavior.
- The fixed /tmp/session-report.json intermediary may create collision or residue risks under concurrent or interrupted runs.
- Source inspection alone cannot confirm statistical accuracy, HTML rendering, or execution of all key paths.
What it does & when to use it
Session Report analyzes Claude Code project transcripts to summarize usage. It covers tokens, cache behavior, subagents, skills, and expensive prompts, then produces a self-contained HTML report. The default reporting window is the last seven days, with support for custom ranges and all-time analysis. It is a fit for Claude Code users who need to inspect usage patterns, cache performance, and cost concentration.
It runs the bundled analyze-sessions.mjs script against Claude Code transcripts in ~/.claude/projects and writes the analysis as JSON. It then reads fields including overall, by_project, by_subagent_type, by_skill, cache_breaks, and top_prompts, embedding the results into the bundled template.html. The skill creates a timestamped session-report-YYYYMMDD-HHMM.html file in the current working directory and fills in findings and optimization suggestions.
- A Claude Code user wants a weekly view of token usage, cache performance, and project distribution.
- A developer wants to identify unusually expensive prompts or calls.
- A team member wants to compare usage across subagent types or skills.
- A user wants to see where cache breaks cluster across sessions or time periods.
- A Claude Code user needs a locally generated, browsable HTML usage report.
Pros & cons
- Produces a self-contained HTML report with tables, bars, and expandable details.
- Covers projects, subagents, skills, cache breaks, and expensive prompts.
- Supports the default seven-day window, custom ranges, and all-time analysis.
- Requires readable Claude Code transcripts under ~/.claude/projects.
- Requires Node.js, but the source does not specify a minimum version.
- Generates a report but does not provide automatic alerting, remote sync, or data cleanup.
- The supplied source provides no test suite or cross-platform validation evidence.
How to install
The skill is located at plugins/session-report/skills/session-report/ in anthropics/claude-plugins-official. The repository README says plugins can be installed through Claude Code's plugin system using /plugin install {plugin-name}@claude-plugins-official; the supplied source does not identify the published plugin name for this skill, so the exact installation name is undocumented here.
How to use
In a Claude Code environment with the skill installed, ask it to generate a session usage report. You may provide a range such as 24h, 30d, or all. It analyzes the last seven days by default and saves the HTML report in the current working directory. The source does not define a fixed trigger phrase.