ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified

rtk-compress

Save 60-90% of LLM tokens on shell commands, file reads, and test outputs. Wraps rtk CLI for compressed output.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/erscoder/rtk-compress
Or

Save 60-90% of LLM tokens on shell commands, file reads, and test outputs.

This skill wraps rtk (Rust Token Killer) — a CLI proxy that filters and compresses command outputs before they reach your LLM context.

Install

# 1. Install rtk
brew install rtk          # macOS
# or: curl -fsSL https://raw.githubusercontent.com/rtk-ai/rtk/refs/heads/master/install.sh | sh

# 2. Verify
rtk gain  # Should show token savings stats

Then copy this SKILL.md to your agent's skills directory.

Commands Reference

Smart File Operations

rtk ls .                                # Token-optimized directory tree
rtk read file.rs                         # Smart file reading (compressed output)
rtk read file.rs -l aggressive           # Signatures only (strips bodies)
rtk smart file.rs                      # 2-line heuristic code summary

Search & Diff

rtk find "*.rs" .                        # Compact find results
rtk grep "pattern" .                    # Grouped search results
rtk diff file1 file2                    # Condensed diff

Git Operations

rtk git status                         # Compact status
rtk git log -n 10                      # One-line commits
rtk git diff                           # Condensed diff
rtk git add                           # → "ok"
rtk git commit -m "msg"                    # → "ok abc1234"
rtk git push                          # → "ok main"
rtk git pull                           # → "ok 3 files +10 -2"

GitHub CLI

rtk gh pr list                         # Compact PR listing
rtk gh pr view 42                       # PR details + checks
rtk gh issue list                      # Compact issue listing
rtk gh run list                        # Workflow run status

Test Runners

rtk test cargo test                    # Show failures only (-90%)
rtk err npm run build                 # Errors/warnings only
rtk vitest run                         # Vitest compact (failures only)
rtk playwright test                   # E2E results (failures only)
rtk pytest                            # Python tests (-90%)
rtk go test                            # Go tests (NDJSON, -90%)
rtk cargo test                        # Cargo tests (-90%)

Build & Lint

rtk lint                               # ESLint grouped by rule/file
rtk lint biome                         # Supports other linters
rtk tsc                                # TypeScript errors grouped by file
rtk next build                          # Next.js build compact
rtk prettier --check .                 # Files needing formatting
rtk cargo build                        # Cargo build (-80%)
rtk cargo clippy                        # Cargo clippy (-80%)
rtk ruff check                          # Python linting (JSON, -80%)
rtk golangci-lint run                   # Go linting (JSON, -85%)

Metadata

Author@erscoder
Stars2387
Views0
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-erscoder-rtk-compress": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags

#rtk#token-saving#compression#cli#shell#devtools
Safety NoteClawKit audits metadata but not runtime behavior. Use with caution.