diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 116be10..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.", 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 ` + + + +