oktk
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 🇱🇹
npx skills add majiayu000/claude-skill-registry --skill oktk --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# oktk - CLI Output Compressor for LLMs ## The Problem When you run commands through an AI assistant, the full output goes into the LLM context: ```bash $ git status # Returns 60+ lines, ~800 tokens # Your AI reads ALL of it, you pay for ALL of it ``` **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 + firs
- The Problem
- The Solution
- When Does It Work?
- Concrete Example
- Before oktk (800 tokens sent to LLM):
- After oktk (80 tokens sent to LLM):
- How It Works Technically
- Safety First
- Usage
- Global Command (Recommended)
- Shell Aliases (Auto-Filter)
- OpenClaw Integration
- Real Savings Example
- Installation
git status Returns 60+ lines, ~800 tokens Your AI reads ALL of it, you pay for ALL of it Pipe any command through oktk git status | oktk git status docker ps | oktk docker ps kubectl get pods | oktk kubectl get pods See your total savings oktk --stats Bypass filter (get raw)
What does the oktk skill do?
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 🇱🇹
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill oktk --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
