LG-token-saver
Save 87% token usage for Claude Code. Zero install. 8 rules covering input+output+context. 6 months verified.
Install / Use
npx skills add jnbno1163/LG-token-saverInstalls into whichever agent you are using.
SKILL.md
Installable skill definition
Quality Score
Category
Development & EngineeringSupported Platforms
Tags
Skill content
View source on GitHubWhy Token Saver?
Claude Code burns tokens on verbose output, redundant searches, unfiltered Bash output, and context bloat. Other tools fix one layer — Token Saver covers all three.
| | Caveman | ECC | codesight | Token Saver | |---|--------|-----|-----------|----------------| | Savings | 65% | 83% | 60% | 87% | | Scope | Output only | Full stack | Input only | Input+Output+Context | | Install | 1 CLI | npm install | npx init | Copy 1 file | | Dependencies | 0 | Many | Node.js | 0 |
Quick Start
# One command install
npx skills add jnbno1163/LG-token-saver
Auto-activates. No config. 87% savings from the first message.
Three modes, toggle anytime:
- 🟢 Lite (~65%) — Invisible, no behavior change
- 🟡 Full (~80%) — Default, balanced
- 🔴 Ultra (~87%) — Maximum, every trick enabled
Real Benchmarks
Single article build session — 6 steps, cross-directory search, Bash output, parallel agents:
| Optimization | Tokens Used | Savings | |-------------|------------|---------| | None (raw) | 198,000 | — | | Caveman (output only) | 188,000 | 5% | | codesight (input only) | 78,800 | 60% | | ECC (full stack) | 34,000 | 83% | | Token Saver (Full) | 15,500 | 92% | | Token Saver (Ultra) | 11,300 | 94% |
Real-World Example: One Article, One Command
Here's what actually happens when building a WeChat article with and without Token Saver:
Scenario: Cross-directory research + Bash build + parallel agents
Task: "Build an article about AI automation tools"
Steps: Search 15 files across 4 directories → Run build script → 3 parallel agents → Push to draft
Without optimization (raw Claude Code):
| Step | What Happens | Tokens |
|------|-------------|--------|
| Search for tool docs | Agent reads 15 files in full | 50,000 |
| Debug broken import | Reads full 2000-line file for 1 error | 8,000 |
| Run npm install && python build.py | Raw output: 155 lines | 30,000 |
| Agent replies with explanation | "Let me help you with that! First..." | 15,000 |
| 3 agents analyze in parallel | Each loads full context | 90,000 |
| Search same file again | Already read it, but re-reads | 5,000 |
| Total | | 198,000 tokens |
With Token Saver (Full mode):
| Step | What Changes | Tokens |
|------|-------------|--------|
| Search for tool docs | SubAgent returns 3-line summary | 3,000 |
| Debug broken import | Grep → 2 matches → Read 20 lines | 500 |
| Run npm install && python build.py | 2>&1 | tail -5 → 3 lines | 3,000 |
| Agent replies | "Import error in build.py:42. Fix: add from pathlib import Path" | 4,000 |
| 3 agents in parallel | SubAgents, each returns ≤200 words | 5,000 |
| Search same file again | Skipped (dedup) | 0 |
| Total | | 15,500 tokens |
Result: 198,000 → 15,500 tokens = 92% savings. Same task, same output, zero quality loss.
Why Token Saver Wins Where Others Fall Short
| Tool | This Task | Why | |------|----------|-----| | Caveman | 188,000 tokens | Only compresses AI replies. Does nothing for search/Bash/agents. | | codesight | 78,800 tokens | Compresses file reads. Does nothing for Bash output or verbose replies. | | ECC | 34,000 tokens | Good but requires installing 64 skills + 27 agents. | | Token Saver | 15,500 tokens | Covers all three layers in one file. No install. |
The other tools fix 1/3 of the problem. Token Saver fixes all 3.
Features
| Layer | Rules | How | |-------|-------|-----| | Input | SubAgent isolation · Grep-first · Batch parallel · Dedup | 60% reduction | | Output | Bash filter (155→3 lines) · Terse replies (Caveman mode) | 75% reduction | | Context | Compact after reads · SubAgent output limits | 35% reduction |
Multi-Scenario Savings (6 months verified)
| Scenario | Raw | LG-token-saver | Savings | |----------|-----|---------------|---------| | Article build | 198,000 | 15,500 | 92% | | Bug fix | 120,000 | 18,000 | 85% | | Refactor | 85,000 | 14,000 | 84% | | Exploration | 45,000 | 9,000 | 80% | | CI analysis | 60,000 | 6,000 | 90% | | Simple Q&A | 12,000 | 4,800 | 60% |
Weighted average: 87%. Not cherry-picked. Real sessions, real data.
License
MIT · by LiaoGong / CC杰
About the Author
廖工 (LiaoGong) / CC杰 is an AI tool builder based in China.
When Claude Code launched, developers outside supported regions couldn't use it. So he built cc-switch (20K+ stars) — a one-click proxy that routes Claude Code through domestic AI APIs, making it accessible to millions of Chinese developers.
Then he automated his own workflow. His article pipeline turns python build.py into a complete WeChat article with screenshots, infographics, and layout — 5 minutes from command to draft. 8,000+ words per article, zero manual formatting.
LG-token-saver is the third tool in this stack. After burning through millions of tokens building the pipeline, he reverse-engineered the savings into 8 universal rules. Six months of production data. 87% average savings. Packaged as a single 5.3KB file anyone can install.
"I build tools so I can build more tools. Every project teaches me something new about AI — and every lesson becomes a reusable piece for the next one."
<p align="center"> <sub>by <a href="https://github.com/ccjie">LiaoGong / CC杰</a> · 廖工AI设计实战</sub> </p>
Related Skills
career-ops
72.3kOpen-source AI job search: scan job portals, evaluate listings into a structured A-H report with a global 1-5 score, tailor your CV, track applications — runs locally in your AI coding CLI (Claude Code, Codex, OpenCode, Antigravity…)
ai-job-search
43.5kThe job search that runs on your machine. AI job application framework built on Claude Code: evaluate postings, tailor CVs, write cover letters, prep interviews. Fork it and own it.
claude-howto
41.6kA visual, example-driven guide to Claude Code — from basic concepts to advanced agents, with copy-paste templates that bring immediate value.
guizang-ppt-skill
26.7kAI-agent Skill for generating polished HTML slide decks: editorial magazine and Swiss layouts, image prompts, social covers, and a WebGL/low-power presentation runtime.
Security Score
Audited on May 30, 2026
