Tokenslim — AI skill for Claude Code
TokenSlim — spend fewer tokens on every LLM API call: prompt compression, 350-skill router, model cascade, semantic cache.
How to install Tokenslim
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open devilking7x/tokenslim and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Tokenslim does
TokenSlim — spend fewer tokens on every LLM API call: prompt compression, 350-skill router, model cascade, semantic cache.
Alternatives in AI
- Open Multi Agent — TypeScript multi-agent orchestration engine — one runTeam() call from goal to result 5.8k ★
- Codeseek — Rust-powered code intelligence CLI for AI coding agents 764 ★
- Ataru — High-performance AI memory retrieval for local agent history — a Rust search core (SDK / API / JSON CLI) plus 351 ★
README


**Demo** — 13-second walkthrough: compress a bloated prompt, route skills without flooding context, hit the semantic cache, and watch savings land on the dashboard.
TokenSlim 
**Trim AI costs without trimming quality.** TokenSlim is a 100% client-side workbench for cutting LLM token spend — compress prompts, route skills without flooding context, cascade models by task difficulty, budget reasoning tokens, cache semantically, and plan spend against a budget. Every saving is tracked on a dashboard. Nothing leaves your browser.
🔗 **Live demo:** https://devilking7x.github.io/tokenslim/
Features
- Prompt Optimizer — Paste a bloated prompt; a rule-based compressor strips filler phrases ("please", "could you kindly", "as an AI"…), dedupes repeated sentences, collapses whitespace, and rewrites as tight imperative bullets. Real BPE token counts before/after via
gpt-tokenizer, savings %, word-level diff, and one-click copy. Savings auto-log to the dashboard counter. - Skill Router — A searchable registry of 350 skills (35 × 10 categories). The key insight, shown with live math: loading all 350 skill bodies costs ~28k tokens; the router loads the tiny registry and fetches only the 2 bodies you need. 18 full skill bodies ship with the app; the rest load on demand.
- Model Cascade — Pick task complexity (trivial → hard) and get a recommended tier mix. Compare "naive (always flagship)" vs "cascade" costs for 1k / 10k / 100k calls. The cost-per-1M table is seeded with realistic 2026 prices and is user-editable (stored in your browser).
- Thinking Budget — Slider from 0–16k reasoning tokens per task; see the cost uplift on a 10k-task sample workload, with an honest explainer of reasoning-token waste.
- Semantic Cache — A localStorage Q&A store. Ask a question; Jaccard similarity on word sets (threshold ~0.45)
Related Skills
Distil
Measure what context compression actually costs an LLM agent: where a session's tokens go, and whether a rewri
Lm Resizer
Rust-native context compression for Claude Code, Codex & MCP agents: filters & compresses noisy tool output (t
Claude Code Jev Smart Router
HTTP proxy for Claude Code that selects the Claude model per request to cut cost and latency. Routes on task p
Burn O Meter
See what your AI coding agents really cost — tokens, spend, cache efficiency and rate limits. Works with Claud
Openproxy
Smart AI proxy router that connects Claude Code, Cursor, Codex, Copilot, and 50+ coding tools to 40+ AI provid
Auto Model Router
Cache-, quota- and capability-aware LLM router with a Claude Code shim
Related Agents
LLM Sec Review
LLM/agent security review specialist — prompt injection, the Agents Rule of Two, tool-call authorization, mode
Rot Soleil
The Soleil_Blank lens — Phantom Steganography, the Invisible Architect. Encodes intent at maximum semantic den
Budget
AI cost engineering — LLM spend tracking, model cost optimization, budget alerts, token efficiency audits