mirror of
https://github.com/rtk-ai/rtk.git
synced 2026-09-19 07:33:17 +08:00
86d50698c1
Install RTK rules in .windsurfrules (project-scoped) so Cascade prefixes shell commands with rtk for token savings. Windsurf hooks don't support command rewriting (only blocking), so RTK uses the rules-based approach (like Codex with AGENTS.md). Tested: Windsurf Cascade correctly uses rtk git status after install. Signed-off-by: Patrick szymkowiak <patrick.szymkowiak@innovtech.eu>
733 B
733 B
RTK - Rust Token Killer (Windsurf)
Usage: Token-optimized CLI proxy for shell commands.
Rule
Always prefix shell commands with rtk to minimize token consumption.
Examples:
rtk git status
rtk cargo test
rtk ls src/
rtk grep "pattern" src/
rtk find "*.rs" .
rtk docker ps
rtk gh pr list
Meta Commands
rtk gain # Show token savings
rtk gain --history # Command history with savings
rtk discover # Find missed RTK opportunities
rtk proxy <cmd> # Run raw (no filtering, for debugging)
Why
RTK filters and compresses command output before it reaches the LLM context, saving 60-90% tokens on common operations. Always use rtk <cmd> instead of raw commands.