chatde/tokenshrink
Same AI, fewer tokens. Free forever. — tokenshrink.com
What's novel
Same AI, fewer tokens. Free forever. — tokenshrink.com
Code Analysis
19 files read · 4 roundsA token-aware text compression engine that rewrites verbose AI prompts into shorter equivalents using verified dictionary replacements, pattern detection, and a Rosetta Stone decoder header, with a full web app, API, SDK, and Claude Code hook integration.
Strengths
The token-aware compression is genuinely well-engineered — every replacement is verified against cl100k_base to ensure it actually saves tokens, with ZERO_SAVINGS and NEGATIVE_SAVINGS sets preventing regressions. The test suite is comprehensive (54 files) and cross-validates against the real gpt-tokenizer, and the codebook/session-vocabulary system for amortizing decoder cost across messages is a clever design.
Weaknesses
The core algorithm is fundamentally a large dictionary of phrase/word replacements with regex matching — the 'compression' is really curated synonym substitution, not a general-purpose compression algorithm. The hooks contain hardcoded personal paths and project names, and the built-in token counter is a lookup table + char/4 heuristic rather than a real tokenizer, limiting accuracy for novel text.
Score Breakdown
Signal breakdown
Innovation
Craft
Traction
Scope
Evidence
Commits
40
Contributors
1
Files
165
Active weeks
5
Repository
Language
HTML
Stars
7
Forks
1
License
MIT