From 147ddf8ee3d83e99faa47e391e3d9de91f93540b Mon Sep 17 00:00:00 2001 From: Thariq Shihipar Date: Tue, 7 Apr 2026 17:40:13 -0700 Subject: [PATCH 1/2] Add session-report plugin Generates an explorable HTML report of Claude Code session usage from local ~/.claude/projects transcripts: total tokens, cache efficiency, per-project/subagent/skill breakdowns, most expensive prompts with transcript context, and cache breaks. Terminal-styled, single-file output with sortable tables and expandable drill-downs. --- .claude-plugin/marketplace.json | 11 + .../skills/session-report/SKILL.md | 42 + .../session-report/analyze-sessions.mjs | 816 ++++++++++++++++++ .../skills/session-report/template.html | 464 ++++++++++ 4 files changed, 1333 insertions(+) create mode 100644 plugins/session-report/skills/session-report/SKILL.md create mode 100644 plugins/session-report/skills/session-report/analyze-sessions.mjs create mode 100644 plugins/session-report/skills/session-report/template.html diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 116be10..db1cce4 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -1442,6 +1442,17 @@ "sha": "b93007e9a726c6ee93c57a949e732744ef5acbfd" }, "homepage": "https://github.com/zapier/zapier-mcp/tree/main/plugins/zapier" + }, + { + "name": "session-report", + "description": "Generate an explorable HTML report of Claude Code session usage — tokens, cache efficiency, subagents, skills, and the most expensive prompts — from local ~/.claude/projects transcripts.", + "author": { + "name": "Anthropic", + "email": "support@anthropic.com" + }, + "source": "./plugins/session-report", + "category": "productivity", + "homepage": "https://github.com/anthropics/claude-plugins-official/tree/main/plugins/session-report" } ] } diff --git a/plugins/session-report/skills/session-report/SKILL.md b/plugins/session-report/skills/session-report/SKILL.md new file mode 100644 index 0000000..c3eea47 --- /dev/null +++ b/plugins/session-report/skills/session-report/SKILL.md @@ -0,0 +1,42 @@ +--- +name: session-report +description: Generate an explorable HTML report of Claude Code session usage (tokens, cache, subagents, skills, expensive prompts) from ~/.claude/projects transcripts. +--- + +# Session Report + +Produce a self-contained HTML report of Claude Code usage and save it to the current working directory. + +## Steps + +1. **Get data.** Run the bundled analyzer (default window: last 7 days; honor a different range if the user passed one, e.g. `24h`, `30d`, or `all`). The script `analyze-sessions.mjs` lives in the same directory as this SKILL.md — use its absolute path: + ```sh + node /analyze-sessions.mjs --json --since 7d > /tmp/session-report.json + ``` + For all-time, omit `--since`. + +2. **Read** `/tmp/session-report.json`. Skim `overall`, `by_project`, `by_subagent_type`, `by_skill`, `cache_breaks`, `top_prompts`. + +3. **Copy the template** (also bundled alongside this SKILL.md) to the output path in the current working directory: + ```sh + cp /template.html ./session-report-$(date +%Y%m%d-%H%M).html + ``` + +4. **Edit the output file** (use Edit, not Write — preserve the template's JS/CSS): + - Replace the contents of ` + + + + From 66ca8fc5405c81966242e90137ef0c8a35360788 Mon Sep 17 00:00:00 2001 From: Thariq Shihipar Date: Wed, 8 Apr 2026 09:31:35 -0700 Subject: [PATCH 2/2] Sort session-report plugin into marketplace order --- .claude-plugin/marketplace.json | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index db1cce4..5f16f4a 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -1179,6 +1179,17 @@ "community-managed" ] }, + { + "name": "session-report", + "description": "Generate an explorable HTML report of Claude Code session usage — tokens, cache efficiency, subagents, skills, and the most expensive prompts — from local ~/.claude/projects transcripts.", + "author": { + "name": "Anthropic", + "email": "support@anthropic.com" + }, + "source": "./plugins/session-report", + "category": "productivity", + "homepage": "https://github.com/anthropics/claude-plugins-official/tree/main/plugins/session-report" + }, { "name": "skill-creator", "description": "Create new skills, improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, update or optimize an existing skill, run evals to test a skill, or benchmark skill performance with variance analysis.", @@ -1442,17 +1453,6 @@ "sha": "b93007e9a726c6ee93c57a949e732744ef5acbfd" }, "homepage": "https://github.com/zapier/zapier-mcp/tree/main/plugins/zapier" - }, - { - "name": "session-report", - "description": "Generate an explorable HTML report of Claude Code session usage — tokens, cache efficiency, subagents, skills, and the most expensive prompts — from local ~/.claude/projects transcripts.", - "author": { - "name": "Anthropic", - "email": "support@anthropic.com" - }, - "source": "./plugins/session-report", - "category": "productivity", - "homepage": "https://github.com/anthropics/claude-plugins-official/tree/main/plugins/session-report" } ] }