Launched this week

TokenSafe
Cut AI coding bills up to 99%. Ship clean code, zero leaks.
4 followers
Cut AI coding bills up to 99%. Ship clean code, zero leaks.
4 followers
TokenSafe runs locally with Cursor, Claude Code, Codex, and Antigravity. Your coding agents read only the code each task needs and keep prompt caches intact across turns, so your team fixes fewer broken edits and keeps secrets out of git.



Free Options
Launch Team / Built With

LoomShow, don't just tell with Loom
Promoted



Hey Product Hunt! 👋
I built TokenSafe because I was burning through Cursor requests and Anthropic API credits for completely dumb reasons.
The breaking point was watching an agent read three 800-line files and pull an entire `package-lock.json` into context just to change a 5-line utility function. By turn 4, that single fix had burned 30,000 tokens. The model slowed down, started missing earlier instructions, and I was paying for thousands of lines of boilerplate the agent never even looked at.
Giving models 1M or 2M token context windows doesn't actually solve this. It just makes it easier to drown the model in noise and pay for the privilege.
So I wrote a local tool to fix context hygiene before anything leaves the machine:
- AST skeletonization: When an agent opens a file, TokenSafe parses it locally and collapses inactive functions into typed signatures. The agent still gets the full architecture map, but read tokens drop by around 85-90%.
- Lockfile & diff stripping: It intercepts terminal diffs and strips out noisy lockfiles and minified bundles so they don't pollute the prompt.
- MCP bloat audit: If you run 3 or 4 MCP servers, their schemas silently dump 5k to 10k tokens into every single turn. TokenSafe measures that tax (`tokensafe doctor`) and lets you toggle heavy tools off.
- Cache alignment: Cleans out volatile timestamps from system prompts and sets ephemeral cache headers, so Claude reliably hits prompt caches for 90% discounts.
The core client is MIT-licensed and written in pure Python standard library. Zero pip packages required, it runs locally, and source code never leaves your computer.
For the PH launch, code `PH50` gives 50% off (capped at the first 100 people in Stripe).
GitHub: https://github.com/NekoSin4eG/tokensafe
Site: https://tokensafe.dev
You can test your own context overhead right now from terminal:
`npx tokensafe doctor`
Curious to hear how you handle context limits in your own setup, or if you run into any edge cases with the AST parser!