Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By mbeacomv0.2.2MITIn 1 marketplace
Measure agent token usage and the savings a tool actually delivers, instead of repeating a vendor percentage. Reads Claude Code and GitHub Copilot CLI local usage records with per-host deduplication and cache decomposition, and settles savings claims with controlled A/B runs that require a preserved-answer assertion.
You run one by typing its /name in Claude Code.
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
tokens, cost, usage, telemetry, benchmark, measurement, cache, claude-code ·
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Measure agent token usage, and prove a tool's savings instead of repeating the percentage on its README.
The catalog recommends tools that claim to reduce tokens. This plugin is how those claims get checked — and how a usage report survives someone reading it closely.
Token totals look like simple sums. Measured on a live developer machine:
input_tokens column includes cache traffic while Claude Code's
excludes it. Pricing the raw column overstated uncached input by ~950×.And the claim people actually want — "this tool saved us money" — cannot be answered by any of that data, because telemetry cannot attribute a change to a cause. That needs a controlled comparison.
| Skill | Use when |
|---|---|
token-accounting | Measuring or reporting usage, cost, or cache efficiency. |
tool-savings-benchmark | Claiming or testing that something reduces tokens. |
/token-report [claude\|copilot\|both] — usage from local host records./benchmark-tool-savings <claim> — controlled A/B for a savings claim.Both are standard-library Python 3 with no dependencies, and read-only with respect to host data.
# Usage totals, deduplicated, with cache decomposition per host.
python3 plugins/token-economics/scripts/collect_usage.py --format json
# Does rtk actually beat plain rg on this repo?
python3 plugins/token-economics/scripts/benchmark_savings.py \
--baseline "rg -n 'func handleAuth' ." \
--candidate "rtk rg -n 'func handleAuth' ." \
--must-contain "handleAuth"
collect_usage.py exits 1 when no records exist — an absent source, not zero
usage. benchmark_savings.py exits 1 for an unverified verdict and 2 for a
setup error.
A savings number means nothing without evidence the answer survived.
Discarding output entirely "saves" 100%. Any comparison measuring only output size ranks the most destructive tool first. So every benchmark declares what the output must still contain, and a run without that assertion cannot produce a quotable result.
Every figure carries two grades: counting (exact or estimated) and
attribution (controlled or observational). Session telemetry is always
observational, however precise the count.
Claude Code and GitHub Copilot CLI, read from their local records. The two stores
have opposite cache semantics, which the collector handles per host. Fleet
rollups are covered in
skills/token-accounting/references/fleet-telemetry.md — Claude Code exports
OpenTelemetry; Copilot CLI exports no token data, and its organization APIs
report engagement only.
Nothing here sends data anywhere.
| Variable | Default |
|---|---|
CONTEXT_KIT_TOKEN_ECONOMICS_ROOT | installed plugin root (Claude fallback: CLAUDE_PLUGIN_ROOT) |
CONTEXT_KIT_CLAUDE_PROJECTS | ~/.claude/projects |
CONTEXT_KIT_COPILOT_DB | ~/.copilot/session-store.db |
Reports print source home-relative so a shared report does not carry an
absolute home path; --raw-paths opts out.
python3 -m unittest discover -s plugins/token-economics/tests -p 'test_*.py'
MIT © Mark Beacom
npx claudepluginhub mbeacom/context-kit --plugin token-economicsBuilt from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
Plugins from other owners that cover similar ground