RTK Token Saver for Openclaw

A CLI proxy skill designed to compress verbose terminal, build, and git outputs to minimize LLM token usage during agent executions.

clarezoe
v1.0.2
Jun 9, 2026
0
943
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install rtk-token-saver

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install rtk-token-saver using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is RTK Token Saver?

RTK Token Saver is an advanced CLI proxy designed to filter and compress command-line output before it reaches your AI developer environment. By integrating this capability with Openclaw Skills, developers can drastically decrease token consumption when running common development operations. It serves as an intelligent intermediary that condenses directory listings, git diffs, searches, package manager outputs, test results, and server logs into compact representations.

This optimization prevents LLM context windows from being flooded with noisy, irrelevant data while still capturing critical diagnostic signals. By adopting this tool within the Openclaw Skills ecosystem, AI coding agents operate faster, cost significantly less, and maintain higher reasoning accuracy because they are not overwhelmed by verbose command-line noise.

RTK Token Saver Use Cases

  • Reducing token usage when reviewing large git histories, diffs, or pull requests inside an AI session.
  • Compressing noisy outputs from test suites, linters, and type checkers like Jest, Vitest, pytest, or cargo test.
  • Exploring massive file trees and directories without overwhelming the context window of AI agents.
  • Running search operations across large repositories with targeted, concise summaries.
  • Inspecting heavy log files from system services, Docker containers, Kubernetes pods, or AWS CloudWatch.

How RTK Token Saver Works

  1. Interception: The AI agent intercepts standard shell commands and routes them through the RTK proxy.
  2. Filtering and Compression: RTK processes the raw output, stripping out redundant data, noise, and massive repetition while retaining the logical core (such as failure trace logs or file summaries).
  3. Context Delivery: The condensed, token-efficient summary is injected back into the AI agent context, keeping the chat history lean.
  4. Dynamic Fallback: If the agent detects that exact raw data is necessary for a precise edit, it falls back to native uncompressed shell commands.
  5. Validation Recording: The skill validates the operation exit codes to ensure high reliability without compromising on task correctness.

RTK Token Saver Setup

Verify the availability of RTK on your system before enabling the skill:

# Check if RTK is installed in the current environment
which rtk

# Verify the installed version
rtk --version

# Grant the necessary permissions for RTK execution
rtk gain

If RTK is not detected, do not try to silently install it; fall back to scoped native commands and report the environment state.

RTK Token Saver Data Schema & Taxonomy

RTK Token Saver does not maintain persistent databases but manages operational data structures dynamically to translate native commands to compressed outputs.

Command Type Raw Command Example RTK Proxy Command
Directory Listing ls -laR . rtk ls .
Code Search grep -rn \"pattern\" . rtk grep \"pattern\" .
Version Control git diff rtk git diff
Reading Files cat path/to/large-file.ts rtk read path/to/file.ts
Test Suite execution npm test rtk test npm test
Service Logs docker logs <container> rtk docker logs <container>

RTK Token Saver Advanced Features

  • Aggressive Compression Levels: Supports varying compression intensities using flags such as rtk read <file> -l aggressive for extreme token preservation.
  • Smart Reading Logic: Utilizes rtk smart to contextually extract the most important sections of large files.
  • Multi-Framework Wrappers: Seamlessly wraps diverse ecosystems including Node.js (jest, next), Python (pytest, ruff), Rust (cargo test, clippy), and Go.
  • Integrates with Openclaw Skills: Designed to fit natively into modern agentic protocols to automatically orchestrate shell interaction safely and economically.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*