Home › Vibe Coding / AI Programming › token-defrag
token-defrag
yuseferi/token-defrag
Visit the token-defrag website / project page →
Verdict Worth trying for developers doing long debugging sessions with Claude Code;but Claude itself requires a VPN from China and token savings are mainly noticeable with English prompts
This hot-list edition was updated Dec 4, 21:18.RSS
What is token-defrag
Token-Defrag is a tool that reduces repeated context transmission in Claude Code and OpenCode, significantly lowering prompt token usage (in testing, failure logs reduced by 66.5% and prompt tokens by 28.4%). It supports an optional live mode and does not collect telemetry data.
Key features
- Shortens repeated tool outputs in Claude Code and OpenCode, reducing prompt token consumption
- Automatically summarises earlier conversation turns and rebuilds prompt cache only when savings are significant
- Supports optional live mode for instant context compression during long single debugging or refactoring sessions
- Keeps local backups of original content and automatically falls back to the original request if API validation fails
- Provides a stats command to view compressed request counts and estimated token savings
Who it is for
Developers using Claude Code or OpenCode for long debugging, refactoring or multi-turn conversations, especially those concerned about token costs.
Who it is NOT for
Materials do not specify who this is not for.
How to get started
- Visit https://github.com/yuseferi/token-defrag
- Install tokendefrag via brew install --cask yuseferi/tap/tokendefrag or the curl install script
- Run tokendefrag claude --live to enable live rewriting in the current session
- Use tokendefrag stats --since 1d to view savings statistics
Pricing:Not published
Compiled from public descriptions on the tool's official website / README / launch page. Pricing and user numbers have not been verified; please check the official website. Some sections were drafted with AI assistance. Written in Chinese and English.
Similar alternatives (Vibe Coding / AI Programming)
Get a “Featured on AI Hot List” badge · Submit a tool
← Back to “Vibe Coding / AI Programming” · Full hot list · Use-case lists