agentleFS
sup3xsup3x/claude-code-eco/skills/eco-report/SKILL.md

eco-report

Skill39 starsChanged 4 months agoMITView on GitHub

Show where the tokens actually went - per-session output, thinking, input and cache accounting read from this machine's Claude Code transcripts. Use when the user asks what they spent, which sessions were expensive, how their prompt cache is doing, or whether /eco is helping. Works in any language.

The file

We split this skill into the rules it gives an agent

4 rules. About 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every number comes from the local JSONL transcript store.

    line 10
  2. Very specific:

    If ${CLAUDE_PLUGIN_ROOT} did not expand (personal or project install rather than a plugin), run report.mjs from this skill's own directory …

    line 18
  3. Very specific:

    Keep the "Observational, NOT a controlled A/B" disclaimer.

    line 36
  4. Distinctive:

    Never quote a cost in currency.

    line 39

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Eco Report - measured token accounting

Every number comes from the local JSONL transcript store. Read them; never estimate them.

Run it

node "${CLAUDE_PLUGIN_ROOT}/scripts/report.mjs"

If ${CLAUDE_PLUGIN_ROOT} did not expand (personal or project install rather than a plugin), run report.mjs from this skill's own directory - the installer stages it there - and fall back to scripts/report.mjs in the claude-code-eco checkout.

Pass the user's arguments straight through:

  • --days <n> window, default 7, 0 for all history
  • --limit <n> session rows to print (totals always cover every session)
  • --dir <path> a transcript store other than $CLAUDE_CONFIG_DIR/projects
  • --json machine-readable output

Present it

  • The script's table is already on screen as the command's output. Do not reprint it - it is a finished report, and repeating it burns tokens on something the user is already looking at. Do not re-format it, re-order it, re-tally it, or drop lines to save space.
  • Then add at most three lines of your own: the biggest cost driver visible in the table and one concrete action (for example a session with a high out/turn, or a cache write/read ratio above ~0.3, which means the prompt prefix keeps being rebuilt).
  • Keep the "Observational, NOT a controlled A/B" disclaimer. The eco-armed vs not gap is not a measured saving - the user chose when to run /eco, so difficulty is a confound. State it as a correlation or not at all; the controlled numbers live in benchmarks/results.md.
  • Never quote a cost in currency. Transcripts record tokens, not prices. If asked for money, say the price is not in the data and point at the published rates for the models listed.
  • turns are API requests, deduped by requestId; thinking is a subset of output, not an addition to it. Say so if the user reads the columns as additive.
  • On "No sessions ...", the window is simply empty: offer --days 0. Do not go hunting through other files.

This skill only reads. It never edits transcripts, settings, or project files.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.