{"repo":"chatde/tokenshrink","free":true,"listed":false,"github":"https://github.com/chatde/tokenshrink","clone":"git clone https://github.com/chatde/tokenshrink.git","description":"Same AI, fewer tokens. Free forever. — tokenshrink.com","language":"JavaScript","stars":12,"topics":["ai","anthropic","compression","cost-optimization","free","llm","nextjs","openai","prompt-engineering","tokens"],"license":"MIT","category":"ai-agents","readme_excerpt":"TokenShrink Same AI, fewer tokens. Free forever. tokenshrink.com Docs API --- TokenShrink compresses your AI prompts so they use fewer tokens — same results, lower cost. Works with every LLM: OpenAI, Anthropic, Google, Mistral, Cohere, and more. No LLM calls. No latency. Pure text compression that any model can understand. v2.0 — Token-Aware Compression v2.0 addresses a fundamental flaw in v1: BPE tokenizers don't map 1:1 with words. \"database\" (1 token) → \"db\" (1 token) saves zero tokens. \"should\" (1 token) → \"shd\" (2 tokens) actually makes it worse . v2.0 fixes this: - Every replacement verified against cl100k base (GPT-4) tokenizer - 130+ zero-savings entries removed, 45 negative-savings entries removed - Real token counting replaces the words 1.3 heuristic - Pluggable tokenizer support for exact counts with any model Before / After Before (143 tokens): You are a business analyst assistant. Your primary responsibility is to help stakeholders define clear requirements. It is important to understand the business context before proposing solutions. Due to the fact that requirements change frequently, you should maintain version control... After (121 tokens, 22 saved — 15.4%): You are a business analyst assistant. help stakeholders define clear requirements. understand the business context before proposing solutions. because requirements change frequently, maintain version control... On verbose prompts (200+ words), savings reach 12-15% — all verified with real tokenizer count","default_branch":null,"files":null,"tree":[],"storefront":"/r/chatde","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/chatde/tokenshrink/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}