report

report is a command for Claude Code from kristijankopacevic/optiflow-mcp. It costs 36 tokens per session (469 once invoked), scanned A, original, MIT.

A report that analyzes the coding agent's saved conversation transcripts, which are local records of past sessions.

In plain words
What is it for?
Use it to review token totals, cache breaks, separate subagent usage, and the most expensive turns for one project, session, or all local projects.
Why use it?
It shows where tokens were spent and where prompt caching stopped being reused, so costly or inefficient sessions are easier to find.

Command for Claude Code

Written for Claude Code: argument-hint in frontmatter. Also seen: reads .claude/ paths; mentions subagents; mentions Claude Code.

Part of the optiflow plugin — 4 commands, 5 hooks, 1 MCP server shipped together

Good fit Use it to review token totals, cache breaks, separate subagent usage, and the most expensive turns for one project, session, or all local projects.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/kristijankopacevic/optiflow-mcp/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.

Clone the repo
git clone --depth 1 https://github.com/kristijankopacevic/optiflow-mcp

Made for: Claude Code.

Or install optiflow, the plugin that ships this one along with the rest of its 4 commands, 5 hooks, 1 MCP server.

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 report

README.md
[![agentmods](https://agentmods.dev/badge/commands/kristijankopacevic/optiflow-mcp/report/github.svg)](https://agentmods.dev/commands/kristijankopacevic/optiflow-mcp/report)
Your own site
<a href="https://agentmods.dev/commands/kristijankopacevic/optiflow-mcp/report"><img src="https://agentmods.dev/badge/commands/kristijankopacevic/optiflow-mcp/report/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for report

Your own site · 80×15
<a href="https://agentmods.dev/commands/kristijankopacevic/optiflow-mcp/report"><img src="https://agentmods.dev/badge/commands/kristijankopacevic/optiflow-mcp/report.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 469 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.00036 $0.00469
Opus 5 $0.00018 $0.00234
Sonnet 5 $0.00007 $0.00094
Haiku 4.5 $0.00004 $0.00047

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

Security

Grade A, and why

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 8d ago.

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.

plugin/commands/report.md · 36 lines

What it actually says

Run optiflow's transcript analytics report and show the result to the user.

This parses Claude Code's own local transcript files (~/.claude/projects/<slug>/<sessionId>.jsonl) directly — a disjoint data source from token-optimizer-mcp's analytics DB, which only records what its own smart_* tools saved. This report is about prompt/cache economics for the actual conversation(s): total tokens per session, where the prompt cache broke (had to be re-primed instead of reused), subagent/Task-tool token usage separated from the main thread, and which turns cost the most.

Run:

optiflow report $ARGUMENTS

If no arguments are given, this defaults to the current project's transcripts (best-effort — derived from the directory Claude Code was launched from) in table format over all history. Useful variations:

  • optiflow report --session <id> — analyze one specific session by id, regardless of which project it's filed under (the most reliable lookup — see src/transcript/discover.ts for why current-project discovery is best-effort).
  • optiflow report --all --format markdown — analyze every local project's transcripts and produce a table suitable for pasting into a PR/doc.
  • optiflow report --range 7d — only include turns from the last 7 days.
  • optiflow report --format json — machine-readable output.

If the command reports "no transcript files found," suggest --session <id> or --all rather than assuming something is broken — this is a normal outcome when the CLI's current working directory doesn't match the directory Claude Code was originally launched from (see the tool's own --help and docs/modules.md for the exact caveat).

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. 8d ago First seen · 36 lines · 36 tokens per session scan A 0ea9cb76f2e3

Subscribe to this mod's changes

report is a command published in the GitHub repository kristijankopacevic/optiflow-mcp (0 stars, last pushed 16d ago), licensed MIT. It adds 36 tokens to every session and 469 once invoked, about $0.0002 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.