session-report

session-report is a skill for Claude Code, Codex from Mark-Life/agent-skills. It costs 60 tokens per session (1,555 once invoked), scanned A, original, MIT.

A report generator that reconstructs how a Claude Code or Codex session used its context window. The report shows what information was loaded, how much space different parts used, and when the session began to exceed a useful working range.

In plain words
What is it for?
Use it to inspect a session's context budget, loaded instructions and skills, opened files, tool results, growth over time, and possible context overload.
Why use it?
Long sessions can retain so much history and tool output that responses become less reliable. The report helps identify which files, instructions, results, or internal reasoning contributed to that context growth.

Skill for Claude CodeCodex

Written for Claude Code and Codex: disable-model-invocation in frontmatter, but also reads ~/.codex or $CODEX_HOME. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions subagents.

Good fit Use it to inspect a session's context budget, loaded instructions and skills…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/mark-life/agent-skills/session-report
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add Mark-Life/agent-skills --skill session-report
Clone the repo
git clone --depth 1 https://github.com/Mark-Life/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for session-report

README.md
[![agentmods](https://agentmods.dev/badge/skills/mark-life/agent-skills/session-report.svg)](https://agentmods.dev/skills/mark-life/agent-skills/session-report)
Your own site
<a href="https://agentmods.dev/skills/mark-life/agent-skills/session-report"><img src="https://agentmods.dev/badge/skills/mark-life/agent-skills/session-report.svg" alt="Measured on agentmods" height="20"></a>
Per session 60 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,555 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00060 $0.01555
Opus 5 $0.00030 $0.00777
Sonnet 5 $0.00012 $0.00311
Haiku 4.5 $0.00006 $0.00155

Measured 6d ago against content hash c1e7eaa96b77, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

session-report scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

The scan reads SKILL.md. This mod also ships 11 executable files (scripts/generate-report.ts, scripts/lib/analyze.ts, scripts/lib/assets.ts, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/inspect-and-debug/session-report/SKILL.md · 70 lines

How it starts

The opening of the file, as written. The whole thing — 70 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Session Report

Generates a single self-contained HTML file that reconstructs an agent session from its transcript and shows what is in the model's context window and how every token is spent — a forensic debugger for context bloat and the "dumb zone" (context-rot past ~40% of the window).

This is a user-invoked command (/session-report); it is not auto-invoked by the model. The session id is passed as the $session_id argument.

What the report shows

  • Verdict header + gauge: peak context vs window, health (Healthy / Degrading / Rotting), one-click jump chips to every issue.
  • Context budget at peak: a stacked bar + table partitioning the peak context into system+tools, listings (skills/agents/tools), CLAUDE.md/memory, opened files, user prompts, tool results, assistant text, thinking, and an honest "unattributed (tool schemas/overhead)".
  • Context-growth timeline: inline-SVG stacked area of real context size per turn, with the dumb-zone band, the 200K-model ghost line, compaction cliffs, peak marker, and the first dumb-zone crossing.
  • Loaded artifacts: CLAUDE.md/AGENTS.md/memory sizes (read from disk), skill/agent/tool listings, opened files — sortable, with "trim me" callouts.
  • Biggest items and a full collapsible history of every event (tool calls, results, attachments) with search/filter and the dumb-zone divider inline.

How to run

The generator is a zero-dependency TypeScript script with no build step. Run it from the skill's scripts/ dir with the requested session id ($session_id). Pick whichever runtime the user has — they need only one:

# Node >= 22.18 / >= 23.6 (native TS type-stripping; most Claude Code users have Node):
node generate-report.ts "$session_id" --open
# Bun:
bun run generate-report.ts "$session_id" --open
# Older Node (no type-stripping) — no install needed, npx fetches it:
npx tsx generate-report.ts "$session_id" --open

Detect what's available (e.g. command -v node bun) and use that. A direct transcript path and options also work, e.g. node generate-report.ts /path/to/<id>.jsonl --out report.html --window 1000000.

Read the full file on GitHub · 70 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 70 lines · 60 tokens per session scan A c1e7eaa96b77

Subscribe to this mod's changes

session-report is a skill published in the GitHub repository Mark-Life/agent-skills (2 stars, last pushed 22d ago), licensed MIT. It adds 60 tokens to every session and 1,555 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories