| name | oktk |
| version | 2.4.0 |
| description | LLM Token Optimizer - Reduce AI API costs by 60-90%. Compresses CLI outputs (git, docker, kubectl) before sending to GPT-4/Claude. AI auto-learning included. By Buba Draugelis 🇱🇹 |
| author | Buba Draugelis |
| license | MIT |
| homepage | https://github.com/satnamra/openclaw-workspace/tree/main/skills/oktk |
| tags | ["optimization","tokens","cost-savings","cli","filtering","llm"] |
| requires | {"bins":["node"]} |
| openclaw | {"emoji":"🔪","category":"optimization"} |
oktk - CLI Output Compressor for LLMs
The Problem
When you run commands through an AI assistant, the full output goes into the LLM context:
$ git status
Every token costs money. Verbose outputs waste your context window.
The Solution
oktk sits between your commands and the LLM, compressing outputs intelligently:
┌──────────┐ ┌──────────┐ ┌──────────┐
│ Command │ ──► │ oktk │ ──► │ LLM │
│ (800 tk) │ │ compress │ │ (80 tk) │
└──────────┘ └──────────┘ └──────────┘
│
90% SAVED
When Does It Work?
Automatically when you run supported commands through OpenClaw:
| Command | What oktk does | Savings |
|---|
git status | Shows only: branch, ahead/behind, file counts | 90% |
git log | One line per commit: hash + message + author | 85% |
git diff | Summary: X files, +Y/-Z lines, file list | 80% |
npm test | Just: ✅ passed or ❌ failed + count | 98% |
ls -la | Groups by type, shows sizes, skips details | 83% |
curl | Status code + key headers + truncated body | 97% |
grep | Match count + first N matches | 80% |
docker ps | Container list: name, image, status | 85% |
docker logs | Last N lines + error count | 90% |