Frame, compress,
prompt-wrap.
itk auto-detects what you're pasting and cleans it, frames it with context headers, and optionally wraps it in prompt templates. Your LLM gets better input — you save tokens and money.
Context Framing
Adds [type | lines | annotations] headers so LLMs know what they're looking at
11 Prompt Templates
Research-backed: fix, explain, refactor, review, debug, test, optimize, convert, document, migrate, security
Watch Mode
Auto-optimize clipboard in the background — zero friction for any LLM workflow
trace/rust 12 runs 71.2%
git-diff 10 runs 58.4%
log 9 runs 81.0%
json 8 runs 52.1%
code/ts 5 runs 41.3%
$
Savings by content type
Actual compression varies — traces save most, clean YAML saves least.
| What you paste | Default | --compact | --aggressive |
|---|---|---|---|
| Python stack trace | ~600 tokens | — | -75% |
| Git diff (3 files) | ~800 tokens | — | -55% |
| Log file (1K lines) | ~1.6K tokens | — | -80% |
| CSV (10K rows) | ~1.2K tokens | — | -98% |
| HTML page | ~4K tokens | — | -67% |
| JSON API error | ~2.1K tokens | -37% | -50% |
| Markdown README | ~1.4K tokens | — | -43% |
| .env file | ~450 tokens | — | -10% |
| TypeScript file | ~4.3K tokens | — | -11% |
| Kubernetes YAML | ~5.2K tokens | — | 0%* |
* Even at 0% compression, framing gives LLMs instant context about content type.
See the difference
Framing + compression. Before and after.
Clipboard watcher
Start it, forget it. Your clipboard is auto-optimized.
Zero friction
Run itk watch once and keep coding. Every clipboard copy is auto-checked.
250ms polling
Negligible CPU. Detects clipboard changes instantly and skips plain text.
Instant undo
Changed your mind? itk undo restores your clipboard before the last modification.
Session summary
Ctrl+C shows total runs and tokens saved during the watch session.
itk: watching clipboard... press Ctrl+C to stop
itk: [trace/python] 2400 -> 600 tokens (-75%) v
itk: [json] 1200 -> 800 tokens (-33%) v
itk: [text] skipped (plain text)
itk: [log] 8000 -> 1600 tokens (-80%) v
itk: [yaml] no savings, clipboard unchanged
^C
itk: session summary: 3 runs, ~9200 tokens saved
$
What gets cleaned
Auto-detection scans the first 8 KB — zero config needed.
| Content | What ITK does |
|---|---|
Stack traces (py/js/rs/go/java) | Extract root cause, collapse internal frames, truncate with [... N frames truncated] |
| Git diff / patch | Drop context lines beyond 2, keep all +/- lines, emit omission markers |
| Log files | Strip ANSI, timestamps; deduplicate identical lines, remove progress bars |
| JSON | Pretty-print, summarise arrays, extract errors, truncate long strings (--compact) |
YAML (K8s, Compose, Actions) | Strip comments, collapse blanks; --aggressive: remove defaults |
Code (ts/js/rs/py/go/java) | Collapse imports, strip doc comments, wrap in fenced block |
Build output (cargo/tsc/eslint) | Group errors by file, deduplicate |
| Markdown | Collapse blanks; --aggressive: remove badges, install/license sections |
| HTML / XML | Strip comments, remove script/style blocks; extract text content |
| SQL | Remove comments, normalize whitespace; --compact: uppercase keywords |
| CSV | Header + first 5 data rows + summary; --aggressive: 3 rows only |
| Dockerfile | Collapse blanks; --aggressive: strip comments, merge multi-line RUN |
| .env files | Mask secret values (API_KEY=***); 30+ secret patterns detected |
| Terraform / HCL | Strip comments; --aggressive: remove defaults, collapse blocks |
| Plain text | Strip ANSI, trim whitespace; --aggressive: deduplicate lines |
Prompt templates
Content-type-aware prompts with role prompting and structured output formats.
--prompt fixIdentify root cause, provide minimal fix
--prompt explainExplain what this code does / caused the error
--prompt refactorRefactor for readability & maintainability
--prompt reviewReview for bugs, security, anti-patterns
--prompt debugHelp debug — identify most likely cause
--prompt testWrite unit tests for this code
--prompt optimizeIdentify bottlenecks, suggest optimizations
--prompt convertConvert to appropriate equivalent format
--prompt documentGenerate documentation for all public items
--prompt migrateMigrate to target framework/language
--prompt securityAudit for security vulnerabilities
Use --focus "the auth middleware" to direct LLM attention.
Track your savings
Dashboard + missed savings discovery across Claude Code sessions.
ITK Discover — Missed Savings
════════════════════════════════════
Scanned: 89 sessions (30 days)
Stack traces 23 ~18.4K -75%
JSON payloads 31 ~42.1K -37%
Log files 8 ~12.0K -80%
Code files 19 ~28.5K -11%
Git diffs 12 ~8.4K -55%
────────────────────────────────────
Total: 93 msgs → ~46.7K saveable
ITK — Daily Breakdown
════════════════════════════════════
Date Runs Saved Avg
────────────────────────────────────
Feb 27 14 14.7K 63.6%
Feb 26 11 12.3K 58.2%
Feb 25 8 9.1K 71.4%
Feb 24 14 20.1K 65.8%
────────────────────────────────────
TOTAL 47 56.2K 64.3%
Export with --format json or --format csv
RTK for output. ITK for input.
The ultimate LLM dev pair.
rtk
Proxy wrapping CLI commands
itk
Clipboard/pipe/file processor
Get started in 10 seconds
Install, copy content, run itk. That's it.
Linux / macOS
One-liner
curl -fsSL https://raw.githubusercontent.com/natekali/itk/main/install.sh | sh
Windows
PowerShell
irm https://raw.githubusercontent.com/natekali/itk/main/install.ps1 | iex
From source
Cargo
cargo install --path .
Update anytime with itk update
And more
Every detail covered for a polished developer experience.
Config file
Per-project or global defaults via .itk.json
Shell completions
Tab completion for bash, zsh, fish, powershell
Colored output
Respects NO_COLOR and TTY detection
Secret masking
.env files: 30+ patterns masked automatically