/polytropos:cost-reportfrom polytropos
Analyze historical Claude Code usage from local transcripts — spend by model, most expensive sessions, and sessions where a cheaper model would have sufficed. Use when the user asks what they've spent, which model they've been using, or where they could save.
Ships in polytropos. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Run the analyzer script that ships with this plugin. Use the ${CLAUDE_PLUGIN_ROOT} env var
Claude Code sets for plugin-executed content; if it is unset, fall back to resolving
../../bin/cost_report.py relative to this SKILL.md to an absolute path:
python3 "${CLAUDE_PLUGIN_ROOT}/bin/cost_report.py" --days 30
Flags:
--days N — lookback window (default 30)--mode api|subscription — framing (default: billing_mode from ${CLAUDE_PLUGIN_ROOT}/data/pricing.json)--top N — how many top sessions to list (default 10)--json — print the report payload as JSON instead of markdown--projects-dir DIR — point the walk at a non-default transcript directory (the only way to run this against anything but the live ~/.claude/projects)The script walks ~/.claude/projects/**/*.jsonl, extracts per-message model + usage (input/output/cache tokens), dedupes by message id, and prices everything from data/pricing.json (any intro_pricing window a row carries is applied by date).
The script emits markdown. Summarize it for the user rather than dumping raw output:
api mode: present the dollar delta as savings ("these sessions would have cost $X.XX less on the Sonnet tier").subscription mode: present it as burn share ("these sessions spent rate-limit budget on Fable for Sonnet-sized work") — dollars are API-equivalent, not spend.If the script errors on unexpected transcript formats, show the error and the file it choked on — don't silently skip everything.
Two no-data outcomes are distinct, not both "broken": a missing projects directory exits
with No transcript directory at <path> and renders nothing; a present-but-empty directory
still renders the full report with a no transcripts in window: <dir> label — a zero-row report
is honest output, not a failure. Don't tell the user the tool is broken on either outcome, and
don't present the empty case's zeros as measured spend.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
17 skills in this plugin
/architectPlan a complex task once on the frontier tier (Fable 5.1 today) and write the execution kit — PLAN.md, TASKS.md, GUARDRAILS.md, and model-pinned agents — that a cheaper model then executes at near-Fable quality. Use when the user says "plan this with Fable", "architect this", "review this codebase", or escalates a complex task. Not for running a kit; that is /polytropos:execute./assess-improvementAssess an existing repository for a small, evidence-backed improvement opportunity and produce a scoped findings report and handoff briefs. Use when the user asks where a codebase could be improved, wants an evidence-driven improvement plan, or wants a harness or runtime ecosystem assessed — including multi-harness Polytropos assessments. Not for implementing, activating, enabling providers, or promoting a policy change./npx claudepluginhub agentmc15/polytropos --plugin polytropos