TokenGem
Cost efficiency for Claude Code

Your plan runs out of
tokens, not money.

Claude Max, Codex on a ChatGPT plan, Cursor Pro: none of them bill you per token. They meter you in tokens and then they stop. So the only way to get more work out of the plan you are already paying for is to make every turn cost fewer tokens.

The whole idea, as one line of arithmetic
Cut this much off a turnand the same plan does this much more
−10%+11% more turns
−20%+25% more turns
−33%+50% more turns
−50%+100% more turns

That table is division, not a measurement. headroom = 1 / (1 − reduction) − 1. It is exact, and it is the reason a modest cut in billable tokens per turn is worth more to a plan subscriber than it looks: a third off a turn is half again as many turns before the wall. What TokenGem will not do is tell you which row you land on. Your own ledger does that, from your own session transcripts, in about a week — and if the answer is the top row or worse, that is what the guarantee is for.

TokenGem is a cost-efficiency layer for Claude Code. It routes every tool call to exactly one owner so competing hooks stop double-processing, drives down the tokens each turn spends, and reads your own session transcripts to prove what changed: in dollars if you pay per token, in plan headroom if you do not.

Get TokenGem — from $59, once First, see your machine free

Pay once, keep it Runs offline, no licence server No analytics, no crash reporter Byte-exact uninstall 30 days, no questions
Where the efficiency comes from

Four levers, one router, one number at the end

Cost efficiency is not one trick. It is four separate things that have to happen in the right order, and the reason they do not happen on their own is that the tools that do them each assume they are the only one installed.

  1. Stop paying for the same work twice. Two tools registered on the same Claude Code event both fire, both spend a turn's worth of instructions, and neither knows the other ran. TokenGem routes one owner per call — that is Single-Owner Dispatch, and it is the part nothing else does.
  2. Shrink what the agent reads. Command output, test runs, build logs and grep results are the bulk of what an agent pulls into context. Compressing them before they land is the single largest lever on tokens per turn for most workloads.
  3. Stop the agent re-reading the repo. A queryable code index means the agent asks a question instead of grepping four directories to answer it itself.
  4. Watch what it does to output tokens. Every lever above can backfire: shorter input can provoke longer answers, and output bills at roughly five times input. TokenGem measures this specifically and tells you when it happens, because a lever you cannot see is a lever you cannot trust.

Levers two and three are done by free open-source tools — named, credited and pinned below. Levers one and four are TokenGem, and they are the two that decide whether the other two were worth installing.

Sixty seconds, no card, no account

Start by finding out what your machine is already doing

Before TokenGem changes anything, it reads your machine and names every hook, its owner, and every event with more than one of them. This command is free and stays free.

$ tokengem doctor a machine with all three installed from their READMEs
Pre-flight
  ok   Claude Code   2.1.220
  ok   Node          26.8.1
  WARN Python        3.9        graphify needs >=3.10 — uv will provision one into ~/.tokengem/runtime
  ok   uv            present
  ok   npm           present
  ok   jq            present    not required by TokenGem (the router parses JSON itself)

Hook registrations found
  PreToolUse       rtk       rtk hook claude
  PreToolUse       graphify  graphify hook-guard search
  PreToolUse       graphify  graphify hook-guard read
  (plugin)         ponytail  ponytail@ponytail v4.9.0 -> SessionStart, SubagentStart, UserPromptSubmit

Conflicts
  ! 2 owners registered on PreToolUse: rtk, graphify. Claude Code runs every
    matching hook; two rewriters on one event double-process.

Baseline: NOT captured — run `tokengem baseline` before installing

Actual output, not a mockup, on a machine with conflict detection reading both settings.json and the plugin registry. Note the last line: TokenGem refuses to install before it has captured a baseline. Once a hook is in place your pre-install numbers are gone, and an efficiency figure with nothing to compare against is marketing, not measurement.

Read the install steps

The waste nobody is naming

Claude Code runs every matching hook

RTK, Ponytail and Graphify are all good, and all free. Install them together the way their READMEs tell you to, and two of them end up owning the same event.

rtk fires
$ rtk rewrite "grep -rn TODO src/"
rtk grep -rn TODO src/
exit 3
graphify also fires
$ graphify hook-guard search
"MANDATORY: You MUST run
 graphify query <question> before
 grepping raw files."

Real output, this machine, rtk v0.48.0 and graphify v0.9.53. One PreToolUse event, two owners, two contradictory answers, both loaded into the same turn. Nothing errors. Nothing is logged. You pay for both.

Two owners, one event

RTK rewrites the command. Graphify tells the agent not to run it. Both instructions reach the model, both consume the turn, and the agent picks one at random.

Half the hooks are invisible

Plugin-registered hooks never appear in settings.json. Audit your settings file and you get a confident all-clear while the hook fires on every session.

Nothing ever errors

There is no failure mode that surfaces. The cost is paid in tokens, quietly, on every single call, for as long as both are installed.

What TokenGem does instead

One process is registered on the event. It classifies the call, decides which upstream owns it, runs exactly that one, and writes the decision to a local ledger. That decision is pure and it is tested: a decision never names two delegates.

$ tokengem route --explain "grep -rn TODO src/" profile: balanced
tool      Bash
command   grep -rn TODO src/
class     search
owner     graphify        (index-first search wins on a class the index answers)
evicted   rtk             (would have rewritten; not run — one owner per call)
action    inject graph query hint, suppress raw grep
ledger    route#4711 written to ~/.tokengem/ledger.jsonl

Same command, one owner, one instruction in the turn, one line in the ledger. The three profiles — Balanced, Maximum, Index only — change who wins which class, and every one of the 53 command fixtures is asserted against all three in the test suite.

Get one owner per call — $59 See what it reports back

The proof, and it is yours not ours

We do not estimate your efficiency. We read it.

Claude Code writes a transcript for every session, and every assistant message in it carries the API's own usage block. That is not a model of your usage — it is your usage, as metered.

~/.claude/projects/…/<session>.jsonl what the ledger reads
"usage": {
  "input_tokens": 2,
  "cache_creation_input_tokens": 23187,
  "cache_read_input_tokens": 23856,
  "output_tokens": 250,
  "cache_creation": { "ephemeral_1h_input_tokens": 23187, "ephemeral_5m_input_tokens": 0 }
}

Cache reads bill at 0.1× input; cache writes at 1.25× for the 5-minute TTL and 2× for the 1-hour TTL. An agent session is overwhelmingly cache traffic, so pricing those three tiers as one number gets the answer wrong. TokenGem weights them apart, per model, from the per-TTL split in the transcript — which is what makes "billable tokens per turn" a real unit rather than a token count.

On a plan, the report speaks in headroom

Tell TokenGem the host is flat-rate and it stops pretending your tokens are dollars. A plan-billed host is compared in billable tokens, because a flat-rate plan has no per-token bill and token reduction buys usage headroom, not money.

$ tokengem billing claude plan && tokengem savings the plan-subscriber path
Baseline  20 sessions (last-20-sessions), captured 2026-08-14
Since     34 sessions with the router live, on profile "balanced"

  billable tokens/turn   -31.4%  (better)
  input / turn           -38.9%  (better)
  output / turn           -4.2%  (better)   <- the failure mode: watch this
  tool bytes / call      -71.0%  (better)
  turns / session         +2.8%  (context, not a verdict)

31.4% less billable tokens per turn than your baseline.
   This host is marked plan-billed, so the comparison is in billable tokens:
   a flat-rate plan has no per-token bill, and token reduction buys usage
   headroom, not money. At this rate the same plan limit carries about
   1.46x the turns it carried before.

Attribution
  router events    508 {"rtk":297,"graphify-search":118,"graphify-read":93}
  rtk              297 handled; 81.3% of command-output characters removed
                   Characters of command output — not tokens, and not dollars.
  graphify         211 handled. A search redirected to the index never ran, so
                   the tokens it would have produced are not observable. No
                   figure is invented for them.
  ponytail         Acts at session start; its effect lands in the aggregate
                   output-token delta and cannot be split out per tool.

Illustrative session numbers on the real output format — not a result we are claiming you will get. The 81.3% figure is the one measured thing on that screen: it is RTK's own instrumentation from its history.db, over 140,118 commands on one developer's machine, and it counts characters of command output. That is not a token reduction and not a plan reduction, and the screen says so on the same line rather than in a footnote.

The number that decides whether this worked

Not input tokens. Output tokens. Compression that shrinks what the agent reads can make it ask more questions, and output costs roughly five times input on every current Claude model. An input reduction can produce a worse bill and a worse plan burn at the same time. This is the documented failure mode of the entire tool category, and it is the reason the measurement engine exists at all.

$ tokengem savings the net-negative path, shown in full
  cost / turn      +11.4%  (worse)
  output / turn    +19.2%  (worse)   <- the failure mode: watch this
  input / turn     -34.8%  (better)

!! TokenGem is costing you 11.4% MORE per turn than your baseline.
   Output tokens per turn are up. This is compression pushing the agent to
   ask follow-ups. Switch to Balanced, or to Index only.

  Lost             $9.72 across 31 session(s), 806 turns
  at the baseline  $85.44 expected ($0.1060 per turn x 806)

Guarantee 31/20 post-install sessions — the measurement guarantee applies
   `tokengem savings --json` is the refund claim.

Every product in this category can show you the good screen. This is the other one, and it is never hidden — it names the failure, names the profile that fixes it, and prints your refund claim. Telling you is the product. Hiding it would be the fraud.

Median, not mean

One runaway session should not set the bar. Baselines are per-session medians.

Per turn, not per session

A longer session is not a more expensive tool. The headline normalises for session length.

Model changes do not count

Switch from Opus to Sonnet mid-month and your numbers improve for a reason that is not us. The report names the model shift instead of taking credit for it.

Measure your own machine — $59

Work out your own number

Two questions: are you metered in dollars, or in tokens

The answer changes the whole calculation, so this asks first. Every coefficient below maps to a published figure, cited in the table underneath, with the conditions it was measured under. There is no hero number here because we do not have one, and neither does anybody else selling you this.

This is the input that actually decides the answer, and only you know it. A session spent reading test output and grep results sits high; a session spent reasoning over a design sits low. The default is our own judgement, not a measured figure — move it.

Plausible change to what one turn costs you
0

Find out for real — from $59

Where each bound comes from

ComponentPublished figureWhat was measuredHow we use it
RTK “up to 90% of the bash output your agent reads” Characters of command output, per command family (tests −90%, builds −80%, linters −60–85%). Not tokens. Not dollars. Not plan usage. Applied only to the output share you set above, then discounted: the upper bound assumes the best case holds across your command mix, the lower bound assumes it mostly does not.
Ponytail “80–94% less code, 42–75% less cost, 3–6× faster” Five single-shot code-generation tasks, 3 models, 10 runs per cell, median reported; cost re-verified at 30 reps. Independent replication (KuldeepB19, 24 tasks, 480 builds, Opus 4.8): ~44% less code. Heavily discounted. Single-shot generation is not an agentic session; most of an agent's burn is reading, not writing. We model a small single-digit effect on output tokens, not 42–75% off anything.
Graphify Coverage 70.8% → 82.0% on ERPNext (~1M LOC), ~140K tokens per query Answer accuracy, n=6 graded questions, fixed agent, Opus 4.8. Graphify’s published code-intelligence result is an accuracy improvement. Contributes no efficiency figure. It is not a token-reduction claim and we will not convert it into one. It scales with repo size in this calculator only through the “large repo” band, and that band is bounded by the RTK and Ponytail terms, never by a Graphify number.

The downside case is real, and it is why the low bound is negative

Compressing what the agent reads can make the agent ask more questions. Shorter input, longer output — and output tokens cost roughly five times input on every current Claude model. A tool that cuts input tokens can burn more of your plan, not less.

Upstream says this out loud. RTK’s own README: “RTK cuts up to 90% of the bash output your agent reads. That is what RTK measures, and it is not the same as cutting your bill by 90%. […] The reduction dilutes at every step.” We agree, and we built the measurement engine because of it.

TokenGem's Savings screen tracks output tokens per turn specifically to catch this, names it when it happens, and tells you which profile to switch to. If the ledger says we cost you money across twenty or more sessions in 30 days, that is the refund.

Three rules this calculator follows. (1) The three figures are never added — they are different metrics measured on different things, and summing them produces a number with no referent. (2) Every percentage above carries its measurement conditions in the same table cell. (3) These are the vendors' own benchmarks, labelled as such. When TokenGem has enough opt-in aggregate data of its own, these are replaced with measured figures and the page will say which. Until then, the only number about your setup is the one your machine computes locally.

The honest objection

You could absolutely do this yourself

All three tools are free and take ten minutes to install. Nothing here is locked behind us. Here is the complete list of what you would have to work out on your own — every item is something we got wrong first and fixed by running it:

What you would need to discoverHow you find out
That Ponytail registers no PreToolUse hook at all — so there is nothing to deconflict there, and the two-way collision is the only real oneRead three repos' hook manifests
That plugin-registered hooks never appear in settings.json, so a settings audit reports a false all-clearFind installed_plugins.json
That RTK registers as rtk hook claude and as a shell-script path, depending on install vintage — miss one and it double-firesCompare two machines
That rtk rewrite exits 3 = ask, so without a permission rule Claude Code prompts you on every single rewritten commandInstall it and get annoyed
Which of the three should own a grep, a pytest, a cat and a find, and why the answer differs per profileBuild a fixture table and run it
How to weight cache reads, 5-minute writes and 1-hour writes so a token count means somethingRead the pricing page and the transcript format
That you must freeze a baseline before the first install, and once a hook is in place that comparison is gone for goodRealise it two weeks late
Whether any of it worked — in dollars if you are metered, in tokens per turn if you are on a planWrite the ledger

That is a day of work if it goes well, and the last row is the one that tells you whether the other seven were worth doing — and it is the only row you cannot go back and do later. $59 is the price of not spending that day, and of still having a baseline when you want one.

If you would rather spend the day: the dispatch order, the fixture results, the licence audit and the per-tool data-flow table are all in the docs that ship with the product, and we would rather you read them than take our word for any of it.

What we found reading their source

Four things that were not what we expected

We publish these because the alternative is you finding them after you have paid. Every one changed something we shipped.

Two of the three are not MIT

RTK and Graphify are both Apache-2.0, and Graphify ships a NOTICE file — which Apache §4(d) requires us to reproduce, and MIT would not have. Permissive either way, but the attribution surface is built to Apache's terms because that is what they are.

Graphify's query log claim was stale

Widely repeated: it logs every query to ~/.cache by default. Not since issue #1797. It is opt-in now. We disable it explicitly anyway, expose the toggle, and describe exactly what lands on disk if you turn it on.

Graphify can be pointed at any LLM endpoint

Their own source comment: "a custom provider receives the full corpus plus the user's API key, so its base_url is an exfiltration channel." A checked-out repo could ship one. TokenGem never sets the flag that would let it.

RTK's telemetry payload includes your commands

Consent-gated and off by default — but the ping carries top_commands. A shipped product should not depend on a customer never clicking yes. TokenGem hard-disables it on every managed process and never grants consent.

None of this is a criticism of those projects — two of the four are things they fixed or documented themselves, and the RTK README is unusually honest about its own numbers. It is what taking responsibility for them looks like: the moment you pay us, their behaviour is our liability. The full per-tool data-flow table ships as docs/SUPPLY_CHAIN_AUDIT.md, and anything we could not verify from source is marked UNVERIFIED rather than assumed harmless.

What leaves your machine

Nothing

You are going to read the network traffic. We would rather save you the trouble.

FlowUpstream defaultUnder TokenGem
RTK usage ping (payload includes your top commands)consent-gated, offhard off RTK_TELEMETRY_DISABLED=1
Graphify custom LLM provider (full-corpus egress)opt-inblocked the enabling flag is never set
Graphify semantic extraction of your docsrequired on mixed reposoff indexes with --code-only, local AST
Graphify query log (question text, plaintext, in ~/.cache)offoff toggleable, purgeable, path configurable
Ponytailno network calls at runtime, and zero dependencies. Nothing to disable.
TokenGem itselfone optional device check once a day, when licensed: a hash of the key, a device id, the version and the OS — never a command, a path, a repo name or any content. tokengem privacy --device-check off turns it off. No analytics, no crash reporter. The dashboard binds to 127.0.0.1 only

Every row is derived from source we read at a pinned commit, and every one is enforced in one function — childEnv() in src/runtime/install.js — so there is a single place to check rather than a promise to trust. If a future version adds a data flow, it lands in the audit document before it lands in the code.

What is under the hood

Three open-source projects, named and credited

You would find them in five minutes anyway. Finding out after you paid is how chargebacks happen, so here they are up front — with the versions we pin and the licenses they carry.

ProjectAuthorLicensePinnedWhat it does
RTKPatrick Szymkowiak Apache-2.0v0.48.0Compresses shell output before it enters context
PonytailDietrich Gebert MITv4.9.0Injects a minimal-code ruleset so the agent writes less
GraphifySafi Shamsi Apache-2.0v0.9.53Builds a queryable code graph so the agent stops re-grepping

All three are free. You can install them yourself in ten minutes, and you should feel free to. What you cannot get for free is a correct merge order between them, a measurement of what they did to your tokens, and one button that puts your machine back exactly as it was. That combination is the Claude Code token-optimisation orchestrator, and it is the whole product.

TokenGem does not fork them. It installs pinned upstream releases into its own prefix at ~/.tokengem/runtime/ and orchestrates them, so upstream improvements reach you without waiting for us. Your global Python, Cargo and npm environments are never touched.

TokenGem is an independent product. It is not affiliated with, endorsed by, sponsored by, or maintained by the authors of RTK, Ponytail or Graphify. Verbatim license texts ship in LICENSES/ and THIRD_PARTY_NOTICES.md with every build, and in the in-app Credits screen.

Honest limits

When TokenGem will not help you

Six reasons not to buy this, written by the people selling it. If one of them is you, the free doctor is still worth sixty seconds and the rest is not worth $59.

Your repo is small

Under roughly 10k lines, the agent can hold enough of it in context that an index adds a step instead of removing one. Graphify is doing real work at 1M LOC; at 2k it is overhead.

Your sessions are mostly reasoning

If you are arguing about architecture rather than reading test output, command output is a small share of your burn and there is little for RTK to compress. Drag the slider above down to a tenth and look at what happens to the range.

You want a single number to quote

We will not give you one. Anyone who does is stacking three incompatible metrics, and the number they produce does not refer to anything.

You dislike the agent being redirected

Graph-first search means being told to query the index instead of grepping. Some people find that disruptive. That is exactly why Index only ships as a first-class profile rather than being hidden.

You are already on one tool and happy

If you run RTK alone and it works, you do not have a conflict problem. Come back when you add the second tool — that is when this starts paying for itself.

It might cost you money

Output-token inflation is a documented failure mode of this whole tool category. TokenGem measures it and tells you. Telling you is the product; hiding it would be the fraud.

Where the thresholds come from. The ~10k LOC figure is our own judgement, not a measured result — treat it as a starting point, not a finding. The contrast with a large repo is anchored on Graphify's published code-intelligence benchmark: ERPNext, roughly 1M LOC, coverage 70.8% → 82.0% at ~140K tokens per query, n=6 graded questions, Opus 4.8 (BENCHMARKS.md, as of 2026-07-05). The only threshold that matters for you is the one your own baseline produces in week one.

Pricing

Pay once. It keeps working.

Your TokenGem licence is perpetual for version 1.x — it keeps working forever, offline, on your activated devices, with no licence server — and it includes every version 1.x release published in the 12 months after your purchase.

The three tools are free. TokenGem is $59, once. Your agent plan is not. Three sizes, one product: tiers differ only in how many devices the key covers, and every tier gets every feature.

Solo

$59

one-time · 1 device, plus one in transient overage

Choose Solo

Most machines

Duo

$89

one-time · 3 devices, plus one — laptop, desktop, the machine at the office

Choose Duo

Studio

$239

one-time · 10 devices, plus one — a small team on one key

Choose Studio

Prices in USD before tax; tax is added at checkout where your country requires it. No subscription, no usage metering, no account. Upgrade between tiers at any time by paying the difference. Buying for a team of ten or more, email us and we will invoice. The full ladder, the renewal price and the pricing FAQ are on the pricing page.

Every plan includes

  • One router per agent, one owner per call, and the ledger that records which.
  • A frozen pre-install baseline and the efficiency report against it, output tokens included.
  • Dollars when you are metered, billable tokens per turn when you are on a plan — the report picks the unit and says why.
  • 12 months of updates, including upstream version bumps that have passed our regression suite. After that, an optional $29-a-year renewal; the software you have keeps working, forever and offline, whether or not you renew.
  • Self-serve device moves, in the app and from a web page reachable with the key alone — plus one device in transient overage, because a dead laptop is not a licence violation.
  • Byte-exact uninstall. A 2.0, if there ever is one, is a separate purchase at an upgrade price stated before you are asked to pay it.

What it does not do

  • No lockout if our servers are down. Licence verification is a local signature check; the daily network call only counts devices, and it can fail for 30 days without you noticing. Turn it off and everything but seat counting keeps working.
  • No telemetry beyond that device check: never a command, a path, a repository name or any content. Your measurement data stays on your machine.
  • It does not resell the three tools. They are free, they stay free, and they are credited on this page.
  • It does not save you money on a flat-rate plan, because there is no per-token bill to save. It buys you headroom, it measures the headroom in tokens, and the money-back half of the guarantee does not apply to you.

The refund, in two sentences

30 days, no questions asked, one reply to your receipt. And if your own ledger shows TokenGem did not save you money across at least twenty post-install sessions within those 30 days, we refund you without being asked twice — run tokengem savings --json, send us the file. That guarantee is for metered usage, because a flat-rate plan has no per-token bill to save on; the plain 30-day refund stands behind everyone. We can offer it because the measurement engine works, and because we would rather refund you than argue about a number we both can read.

Buy TokenGem — from $59 What happens if we stop

Written down, not implied: the licence, the refund policy, the privacy policy and the sunset clause. The sentence at the top of this section appears word for word on the pricing page, in the receipt and in the licence.

Questions we get asked

Token efficiency and hook conflicts, answered

Each answer below stands on its own, and every one is drawn from source read at a pinned commit — rtk v0.48.0, graphify v0.9.53, ponytail v4.9.0.

Can I get more usage out of my Claude Max plan?

A plan is metered in tokens, so more usage means fewer tokens per turn, and the relationship is exact division rather than a claim: cutting a turn by a fifth carries a quarter more turns before the limit, and cutting it by a third carries half again as many. TokenGem's job is to make that reduction real and then measure it from your own transcripts.

How much will TokenGem actually save me?

Nobody selling you this can answer that honestly before you install it, including us. The upstream projects publish figures measured on characters of command output, on single-shot generation and on answer accuracy — three different metrics that cannot be added together. TokenGem freezes a baseline first, then reports your own delta, and refunds you if it is negative.

Do RTK and Graphify conflict in Claude Code?

Yes. RTK and Graphify both register a Claude Code PreToolUse hook matching Bash, so a single grep fires both: RTK rewrites the command to its compressed form while Graphify injects an instruction telling the agent not to grep at all. Both run, neither errors, and the conflict is silent.

Can two PreToolUse hooks fire on the same event in Claude Code?

Claude Code runs every matching hook on an event, not the first one that matches. Two tools registered on PreToolUse both execute, both pay their process cost, and both sets of instructions land in the same turn — where they can contradict each other without producing any error or log line.

Which Claude Code hooks does Ponytail register?

Ponytail registers SessionStart, SubagentStart and UserPromptSubmit, and it registers them through its plugin manifest rather than settings.json. Ponytail registers no PreToolUse hook at all, so it is not part of the two-way collision between RTK and Graphify.

Why doesn't my Claude Code hook appear in settings.json?

Plugin-registered hooks never appear in settings.json. They are declared in the plugin manifest and resolved through the plugin registry, so auditing your settings file returns a confident all-clear while the hook fires on every session start. TokenGem's tokengem doctor reads both surfaces.

Why did my Claude Code bill go up after installing a token optimizer?

Output-token inflation. Compression shrinks what the agent reads, which can push it to ask more follow-up questions — and output bills at roughly five times input on every current Claude model. An input-token reduction can therefore produce a cost increase. This is the documented failure mode of the whole tool category.

Does the report work if I never pay per token?

Yes, and it switches units to say so. Marking a host plan-billed makes the comparison billable tokens per turn rather than dollars, because a flat-rate subscription has no per-token bill and a reduction there buys usage headroom instead of money. The money-back half of the guarantee is scoped to metered usage for the same reason.

Are RTK and Graphify licensed MIT or Apache-2.0?

RTK and Graphify are both Apache-2.0, not MIT, and Graphify ships a NOTICE file that Apache §4(d) requires downstream distributors to reproduce. Ponytail is MIT. All three are permissive, but the attribution obligations differ, which is why TokenGem ships verbatim licence texts with every build.

What is the correct install order for RTK, Ponytail and Graphify?

Capture a baseline first. Once any hook is in place your pre-install numbers are gone, and an efficiency figure with nothing to compare against is marketing rather than measurement. TokenGem enforces this: tokengem install refuses to run until tokengem baseline has frozen your per-session medians.

How do I uninstall Claude Code hooks cleanly?

tokengem uninstall restores the settings snapshot taken before install — byte for byte, including hooks that existed beforehand and the ones TokenGem evicted — and deletes the managed runtime at ~/.tokengem/runtime/. A regression test hashes settings.json before and after and fails if one byte differs.

How is TokenGem different from ccusage and other cost trackers?

ccusage and similar tools report what Claude Code already cost you. TokenGem answers a different question: whether a change you made to your setup helped. It freezes a pre-install baseline, routes one owner per hook event, and reports the measured delta — including when that delta is negative.

Does TokenGem send any data off my machine?

One optional daily device check when a licence is active: a hash of the key, a device id, the version and the OS, so seats can be counted — never a command, a path, a repository name or any content, and tokengem privacy --device-check off turns it off. Nothing else. The ledger is a local file, the dashboard binds to 127.0.0.1 only, RTK's usage ping is hard-disabled via RTK_TELEMETRY_DISABLED=1, and the Graphify flag that would route your corpus to a custom LLM endpoint is never set.

Every claim on this page is traceable to a document that ships with the product: docs/HOOK_ROUTER.md for routing, docs/SUPPLY_CHAIN_AUDIT.md for data flow, and docs/COMPLIANCE.md for licensing. Anything we could not verify from source is marked UNVERIFIED rather than assumed harmless.

Find out what your own machine is doing

The conflict report is free and takes a minute. The baseline, the router and the ledger are $59, once, and refundable for thirty days on a number you can read yourself.

Get TokenGem Install the free doctor