/token-optimizer:cli-compressfrom token-optimizer
Intercepts and compresses long shell command outputs (git, npm, docker, kubectl, pytest) via the rtk Rust proxy to reduce token consumption by 60-90%.
Ships in token-optimizer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Intercepte les sorties de commandes shell verbeuses et les compresse avant ingestion dans le contexte via le binaire Rust rtk.
Installation one-shot (sans dependance, binaire Rust seul, MIT) :
# macOS / Linux / WSL
curl -fsSL https://www.rtk-ai.app/install.sh | sh
# ou via cargo si Rust est installe
cargo install rtk
Puis initialiser pour Claude Code :
rtk init -g
Cela ajoute un hook PreToolUse qui reecrit git status -> rtk git status transparent (Claude ne voit jamais la reecriture, seulement la sortie compressee).
Le plugin inclut un script d'installation convenient : ${CLAUDE_PLUGIN_ROOT}/scripts/rtk-install.sh.
| Categorie | Exemples |
|---|---|
| Git | git status, git log, git diff, git blame, git show |
| GitHub CLI | gh pr list, gh run view, gh issue list |
| NPM / Yarn / pnpm | npm install, npm test, npm audit |
| Docker | docker ps, docker logs, docker images |
| Kubernetes | kubectl get, kubectl describe, kubectl logs |
| Tests | pytest, jest, go test, cargo test |
| Build | cargo build, go build, make |
| Lint | eslint, ruff, clippy |
Liste complete : rtk list-commands.
4 strategies appliquees dans l'ordre :
Economie typique : 60-90% de tokens, <10 ms de latence ajoutee.
Le hook opere de facon transparente mais on peut aussi invoquer rtk manuellement :
rtk git log --oneline -n 100
rtk pytest tests/
rtk docker logs myapp --tail 500
Si l'utilisateur a besoin de la sortie brute (debug, copier-coller) :
# bypass rtk sur une commande
RTK_OFF=1 git log
# desactiver globalement
rtk disable
Quand le router prevoit une commande shell verbeuse :
which rtk)Sur 100 commandes dev typiques :
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
9 skills in this plugin
/auto-optimizeBoucle d'auto-amelioration du budget tokens : applique automatiquement les optimisations SURES (reroute Haiku, caveman par defaut, biais de score) et propose le reste. Mots-cles : "auto-optimise", "optimise mon budget automatiquement", "applique les economies", "active les optimisations", "rollback optimisation", "etat des optimisations".
/budget-analyzerAnalyse la consommation de tokens et propose des economies. Lit ~/.token-optimizer/budget.json (alimente par budget-tracker) et produit tendances, projection fin de mois, detection de gaspillage et opportunites d'economie chiffrees. Mots-cles : "analyse mon budget", "ou partent mes tokens", "rapport d'optimisation", "comment economiser des tokens", "projection budget", "gaspillage tokens", "audit conso".
/npx claudepluginhub geekfamilycorp/tricorderkit --plugin token-optimizerOther plugins' skills for the same job