Analyzing Claude Code Sessions
amd/gaia
Mines local Claude Code session transcripts with a deterministic Python pipeline to show what the agent is actually used for, how often it fails and what it costs.
Builds an explorable HTML report of Claude Code usage over a chosen period: tokens, cache behavior, subagents, skills and costly prompts.
$ npx skills add anthropics/claude-plugins-official --skill session-report -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install anthropics/claude-plugins-official session-report --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .claude/skills && cp -r skills-src/plugins/session-report/skills/session-report .claude/skills/session-report && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "session-report" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/session-report/skills/session-report into .claude/skills/session-report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "session-report", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/anthropics/claude-plugins-official/tree/main/plugins/session-report/skills/session-reportType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add anthropics/claude-plugins-official --skill session-report -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install anthropics/claude-plugins-official session-report --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .agents/skills && cp -r skills-src/plugins/session-report/skills/session-report .agents/skills/session-report && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "session-report" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/session-report/skills/session-report into .agents/skills/session-report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "session-report", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add anthropics/claude-plugins-official --skill session-report -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install anthropics/claude-plugins-official session-report --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/plugins/session-report/skills/session-report .cursor/skills/session-report && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "session-report" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/session-report/skills/session-report into .cursor/skills/session-report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "session-report", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/anthropics/claude-plugins-official.git --path plugins/session-report/skills/session-report--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add anthropics/claude-plugins-official --skill session-report -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install anthropics/claude-plugins-official session-report --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/plugins/session-report/skills/session-report .gemini/skills/session-report && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "session-report" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/session-report/skills/session-report into .gemini/skills/session-report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "session-report", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install anthropics/claude-plugins-official session-reportInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add anthropics/claude-plugins-official --skill session-report -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .github/skills && cp -r skills-src/plugins/session-report/skills/session-report .github/skills/session-report && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "session-report" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/session-report/skills/session-report into .github/skills/session-report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "session-report", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add anthropics/claude-plugins-official --skill session-report -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install anthropics/claude-plugins-official session-report --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/anthropics/claude-plugins-official.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/plugins/session-report/skills/session-report .opencode/skills/session-report && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "session-report" agent skill from https://github.com/anthropics/claude-plugins-official/tree/main/plugins/session-report/skills/session-report into .opencode/skills/session-report/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "session-report", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
session-reportBuilds an explorable HTML report of Claude Code usage over a chosen period: tokens, cache behavior, subagents, skills and costly prompts.
The bundled `analyze-sessions.mjs` script reads your Claude Code transcripts, covers the last seven days by default, accepts ranges such as 24h, 30d or all, and outputs JSON. The agent then copies `template.html` into the current directory under a time-stamped name and embeds that JSON, so the page renders the total, tables, bars and drill-downs on its own.
The agent adds three to five one-line findings, expressed as a share of total tokens where possible and marked as problems, healthy signs or neutral facts, plus up to four suggestions tied to specific rows, such as scoping a command that spawns many subagents. It looks for a project or skill taking a disproportionate share, weak cache hits, single expensive prompts and heavy subagent types. The template's structure is left alone, and the agent only reports the saved file path.
5 steps, taken from the first numbered list in SKILL.md.
Read from SKILL.md and the folder at commit d4226d0. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Ships script files (JavaScript), which the agent can run.
Shell commands in SKILL.md call:
nodeFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Session Usage Report loads about 784 tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 369 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from anthropics/claude-plugins-official at commit d4226d0, republished under its Apache-2.0 licence (© anthropics). 369 words, ~784 tokens.
.claude/skills/session-report/SKILL.md (or your agent's skills folder). This skill also uses 2 other files; get the full folder from GitHub.Produce a self-contained HTML report of Claude Code usage and save it to the current working directory.
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:
node <skill-dir>/analyze-sessions.mjs --json --since 7d > /tmp/session-report.jsonFor all-time, omit --since.
Read /tmp/session-report.json. Skim overall, by_project, by_subagent_type, by_skill, cache_breaks, top_prompts.
Copy the template (also bundled alongside this SKILL.md) to the output path in the current working directory:
cp <skill-dir>/template.html ./session-report-$(date +%Y%m%d-%H%M).htmlEdit the output file (use Edit, not Write — preserve the template's JS/CSS):
<script id="report-data" type="application/json"> with the full JSON from step 1. The page's JS renders the hero total, all tables, bars, and drill-downs from this blob automatically.<!-- AGENT: anomalies --> block with 3–5 one-line findings. Express figures as a % of total tokens wherever possible (total = overall.input_tokens.total + overall.output_tokens). One line per finding, exact markup:<div class="take bad"><div class="fig">41.2%</div><div class="txt"><b>cc-monitor</b> consumed 41% of the week across just 3 sessions</div></div>.take bad for waste/anomalies (red), .take good for healthy signals (green), .take info for neutral facts (blue). The .fig is one short number (a %, a count, or a multiplier like 12×). The .txt is one plain-English sentence naming the project/skill/prompt; wrap the subject in <b>. Look for: a project or skill eating a disproportionate share, cache-hit <85%, a single prompt >2% of total, subagent types averaging >1M tokens/call, cache breaks clustering.<!-- AGENT: optimizations --> block (at the bottom of the page) with 1–4 <div class="callout"> suggestions tied to specific rows (e.g. "/weekly-status spawned 7 subagents for 8.1% of total — scope it to fewer parallel agents").Report the saved file path to the user. Do not open it or render it.
top_prompts already includes subagent tokens and rolls task-notification continuations into the originating prompt.top_prompts to 100 entries and cache_breaks to 100 before embedding (they should already be capped).© anthropics, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
SKILL.md and 2 other files in plugins/session-report/skills/session-report of anthropics/claude-plugins-official.
Open the folder on GitHubat commit d4226d0
Session Usage Report next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| Session Usage Report this skillanthropics/claude-plugins-official | 37k | — | ~784 | Automated safety check: Pass | Apache-2.0 | |
| Analyzing Claude Code Sessionsamd/gaia | 1.6k | — | ~2.3k | Automated safety check: Pass | MIT | |
| Caveman Workflow LabelerJuliusBrussee/caveman | 110k | 1 repos | ~1.3k | Automated safety check: Pass | Apache-2.0 | |
| Caveman Evidence ReviewJuliusBrussee/caveman | 110k | 1 repos | ~927 | Automated safety check: Pass | Apache-2.0 | |
| CodexBar Usage Readersteipete/CodexBar | 22k | — | ~320 | Automated safety check: Pass | MIT | |
| Caveman Gateway SetupJuliusBrussee/caveman | 110k | 1 repos | ~2.6k | Automated safety check: Warn | Apache-2.0 |
amd/gaia
Mines local Claude Code session transcripts with a deterministic Python pipeline to show what the agent is actually used for, how often it fails and what it costs.
JuliusBrussee/caveman
Finds every LLM workflow in a repository, proposes a labeling table and, once you agree, wires labels so Caveman Cloud groups spend per workflow.
JuliusBrussee/caveman
Read-only review of Caveman Cloud data to explain where LLM spend goes: cost, score, workflows, traces, latency, errors, routing and verified savings.
steipete/CodexBar
CodexBar read. Provider usage, limits, credits, config health. JSON. No writes.
JuliusBrussee/caveman
Routes every LLM call in a repository through the Caveman Cloud gateway in record mode, so requests and costs are measured without changing behavior.
KonghaYao/peri
Queries Langfuse traces, prompts, datasets and sessions, and analyzes local LLM gateway logs for requests, context growth, token use and cache hits.
anthropics/claude-plugins-official
Explains how to write Claude Code plugin hooks, both prompt-based checks and bash commands, for events such as PreToolUse, Stop and SessionStart.
anthropics/claude-plugins-official
Explains how to write agents for Claude Code plugins: the markdown file with YAML frontmatter, trigger descriptions, model and color settings, and system prompt design.
anthropics/claude-plugins-official
Shows how Claude Code plugins keep per-project settings and state in .claude/plugin-name.local.md files with YAML frontmatter and a markdown body.
anthropics/claude-plugins-official
Explains how to bundle Model Context Protocol servers in a Claude Code plugin, covering config files, stdio, SSE, HTTP and WebSocket server types, and authentication.
anthropics/claude-plugins-official
Explains how to write Claude Code slash commands: Markdown files with YAML frontmatter, arguments, file references, bash context and interactive prompts.
anthropics/claude-plugins-official
Explains the directory layout, plugin.json manifest and component organization of a Claude Code plugin, including auto-discovery and portable paths.
Categories
Builds an explorable HTML report of Claude Code usage over a chosen period: tokens, cache behavior, subagents, skills and costly prompts. mjs` script reads your Claude Code transcripts, covers the last seven days by default, accepts ranges such as 24h, 30d or all, and outputs JSON.html` into the current directory under a time-stamped name and embeds that JSON, so the page renders the total, tables, bars and drill-downs on its own.
Session Usage Report fits situations like: finding out which projects or skills use the most tokens; checking cache hit rates and cache breaks over the past week; spotting expensive prompts or subagent-heavy commands.
Run `npx skills add anthropics/claude-plugins-official --skill session-report -a claude-code`. Or copy the skill folder (plugins/session-report/skills/session-report in anthropics/claude-plugins-official) into .claude/skills/session-report in your project. Claude Code loads it when a task matches its description.
Run `npx skills add anthropics/claude-plugins-official --skill session-report -a codex`. Or copy the skill folder (plugins/session-report/skills/session-report in anthropics/claude-plugins-official) into .agents/skills/session-report in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add anthropics/claude-plugins-official --skill session-report -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/session-report, .gemini/skills/session-report, .github/skills/session-report and .opencode/skills/session-report in your project.
Going by SKILL.md and its folder, Session Usage Report needs JavaScript for the scripts in its folder and the command-line tools its instructions call (node). Our summary lists: Node.js to run `analyze-sessions.mjs`; Claude Code session transcripts under `~/.claude/projects`.
SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
Session Usage Report is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 784 tokens (SKILL.md is roughly 3.1k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with Session Usage Report: Analyzing Claude Code Sessions (amd/gaia, 1.6k stars), Caveman Workflow Labeler (JuliusBrussee/caveman, 110k stars), Caveman Evidence Review (JuliusBrussee/caveman, 110k stars) and CodexBar Usage Reader (steipete/CodexBar, 22k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
anthropics (a GitHub organization, an official publisher) maintains it in anthropics/claude-plugins-official, which has 37,477 GitHub stars. The repository holds 29 skills in this directory. The repository was last updated on October 7, 2026.
Source: anthropics/claude-plugins-official on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.