← ClaudeAtlas

token-optimizerlisted

Guidelines and optimizations to reduce LLM token usage during development and command execution.
phuonghx/aim-cli · ★ 1 · AI & Automation · score 77
Install: claude install-skill phuonghx/aim-cli
# Token Optimizer (aim-rtk) AI agents pay for every token read or written. During development, excessive logs or full-file rewrites waste cost and exhaust context windows. Follow these optimization guidelines. ## 1. RTK (Rust Token Killer) Command Principles Whenever running terminal commands, reduce output to the bare minimum needed for debug/analysis: ### A. Git Operations (Save 60-80% tokens) - **Status:** Use `git status -s` instead of a raw `git status`. - **Diff:** Use `git diff --stat` first to see which files changed. Pull specific diffs via `git diff <file>` instead of dumping all files. - **Log:** Always limit history, e.g., `git log -n 5 --oneline`. - **Commits:** Avoid verbose outputs on pushes or pulls. ### B. Builds & Compilation (Save 80-90% tokens) - Pipe command outputs to filter for errors or warnings (e.g. on Unix use `cmd | grep -E "Error|Warning"`, on Windows use `cmd | Select-String "Error"`). - For TypeScript, run `tsc --noEmit` but group outputs or check only modified files. - Avoid printing full successful build metrics. ### C. Testing (Save 90-99% tokens) - Do not run the entire test suite in verbose mode. - Filter test runs to target only the specific file or test name: - Jest/Vitest: `npm test -- -t "test-name"` - Pytest: `pytest -k "test_name"` - Go: `go test -run "TestName"` - Instruct the runner to print failures only (e.g., `--reporter=line` or `--summary-only`). ### D. File Navigation & Search (Save 60-75% tokens) - **Do not read