coach

coach is a skill for Claude Code from Jimmynycu/token-efficiency. It costs 62 tokens per session (814 once invoked), scanned B, original, MIT.

A local analyzer for Claude Code session transcripts that identifies inefficient token use, such as repeated context, oversized tool output, failed calls, and unnecessary work at an expensive model tier.

In plain words
What is it for?
Use it to inspect the latest project session or a specified transcript, rank waste sources, estimate their possible cost, and suggest concrete fixes.
Why use it?
It shows where a session used more tokens or money than necessary without judging the quality of the coding work.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: reads .claude/ paths; mentions Claude Code.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the token-efficiency-coach plugin — 1 skill, 2 hooks shipped together

Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add Jimmynycu/token-efficiency
Claude Code
/plugin install token-efficiency-coach

Made for: Claude Code.

Or install token-efficiency-coach, the plugin that ships this one along with the rest of its 1 skill, 2 hooks.

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 coach

README.md
[![agentmods](https://agentmods.dev/badge/skills/jimmynycu/token-efficiency/coach.svg)](https://agentmods.dev/skills/jimmynycu/token-efficiency/coach)
Your own site
<a href="https://agentmods.dev/skills/jimmynycu/token-efficiency/coach"><img src="https://agentmods.dev/badge/skills/jimmynycu/token-efficiency/coach.svg" alt="Measured on agentmods" height="20"></a>
Per session 62 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 814 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. Scan, not verified.
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.00062 $0.00814
Opus 5 $0.00031 $0.00407
Sonnet 5 $0.00012 $0.00163
Haiku 4.5 $0.00006 $0.00081

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

Security

Grade B, and why

coach scanned grade B with 1 finding 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 5d 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.

Reads agent configuration directoriesmediumAgent snooping

.claude/, .codex/, .gemini/ hold keys, settings and other credentials a mod has no legitimate need for.

`~/.claude/settings.json` pointing at a stable copy of the script. If they say yes,
plugins/token-efficiency-coach/skills/coach/SKILL.md · 57 lines

How it starts

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

Token-Efficiency Coach

Reads a Claude Code session transcript and coaches the user on token waste — the observable inefficiencies (uncached context, context bloat, oversized tool output, failed tool calls, output-heavy turns, wrong-tier routing, redundant reads) — with a per-finding fix and a dollar estimate. It flags waste; it never grades work quality or scores a person. The analyzer runs locally and reads only your own session log, so no prompt leaves your machine.

The report below is generated at command time by the shared engine (scripts/analyze.py), which auto-finds the latest session for this project when no path is given, or analyzes the path you pass as an argument.

Coach report

!python3 "${CLAUDE_PLUGIN_ROOT}/scripts/analyze.py" $ARGUMENTS

Your task

  1. Relay the ranked report above to the user in your own words — lead with the headline (total cost, the single biggest recoverable amount) and then the findings in priority order. Keep dollar figures framed as upper-bound estimates, exactly as the engine does. Do not invent numbers the report did not produce.
  2. Offer to apply the top fix. Pick the highest-severity finding and propose the concrete remedy it implies, for example:
    • Low cache hit → restructure the session so stable context (system prompt, instructions, pinned files) sits at the FRONT and stays byte-identical so it caches.
    • Context bloat / very long thread → compact the conversation or split the remaining work into a fresh session to shed dead context.
    • Oversized tool output / redundant reads → read targeted line ranges, grep for the lines needed, and pipe noisy commands through head/tail instead of dumping whole files.
    • Everything on the priciest model → route mechanical steps (renames, greps, boilerplate, file reads) to a cheaper tier and reserve the top model for real reasoning.
  3. Offer to wire up the live statusline if the user does not already have one. The plugin ships scripts/statusline.py (live $cost · ctx tokens · cache-hit% · ⚠), but a plugin cannot register a statusLine itself — it must go in the user's ~/.claude/settings.json pointing at a stable copy of the script. If they say yes, walk them through the README's "Wire up the statusline" steps (copy the script to a stable path, add the statusLine block, accept the trust dialog).

Read the full file on GitHub · 57 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. 5d ago First seen · 57 lines · 62 tokens per session scan B 0b0846be87c8

Subscribe to this mod's changes

coach is a skill published in the GitHub repository Jimmynycu/token-efficiency (2 stars, last pushed 2mo ago), licensed MIT. It adds 62 tokens to every session and 814 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 1 finding (reads agent configuration directories). 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

import

Import a self-contained NeatContext context bundle shared by another person, or reconcile a newer copy of a context already on this machine, leaving the source bundle unchanged. Use only when the user explicitly invokes this skill or asks to import a NeatContext bundle.

XTSoftwareLabs/neatcontext-plugins · 54 tokens

save

Save durable decisions, findings, plans, and implementation knowledge from the visible Codex conversation into a new or existing NeatContext context. Use only when the user explicitly invokes this skill or asks to preserve the current conversation as reusable context.

XTSoftwareLabs/neatcontext-plugins · 49 tokens

create

Create a fresh NeatContext context from a user-defined behavioral profile and an existing local knowledge folder. Use only when the user explicitly invokes this skill or asks to create a new context rather than save the current conversation.

XTSoftwareLabs/neatcontext-plugins · 45 tokens

extensions

Report which extensions the connected NeatContext context expects, and whether this machine provides them. Use when the user asks what a context can reach, why an extension tool is missing, or how to connect one here.

XTSoftwareLabs/neatcontext-plugins · 45 tokens

export

Export a NeatContext context saved from a conversation into a self-contained bundle folder that can be shared or moved to another machine. Use only when the user explicitly invokes this skill or asks to export a NeatContext context.

XTSoftwareLabs/neatcontext-plugins · 47 tokens

delete

Preview and permanently delete a NeatContext context while preserving any externally linked knowledge folder. Use only when the user explicitly invokes this skill or clearly asks to delete a context.

XTSoftwareLabs/neatcontext-plugins · 36 tokens