RTK Compressor for Openclaw

An intelligent CLI output compressor designed to reduce LLM token consumption by up to 90% by stripping redundant data.

efficiency97
v0.1.0
Mar 16, 2026
0
955
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install rtk-compressor

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-compressor 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 Compressor?

RTK Compressor is a specialized utility within the Openclaw Skills library designed to solve the problem of token bloat in AI agent workflows. By intelligently processing CLI command outputs, it removes non-essential data such as comments, whitespace, and boilerplate code while preserving the core informational integrity required by LLMs.

This tool is particularly effective for developers using AI coding agents who need to feed large directory structures, file contents, or test logs into a model without exhausting context windows or incurring high costs. It ensures that your Openclaw Skills remain efficient and cost-effective by aggregating similar items and prioritizing significant data patterns.

RTK Compressor Use Cases

  • Reducing token costs when sending large file system trees or directory listings to an AI agent.
  • Compressing verbose test execution logs and JSON outputs for quicker LLM analysis.
  • Cleaning up source code during 'cat' or 'read' operations by stripping comments and empty lines.
  • Optimizing multi-agent communication by passing condensed technical contexts.

How RTK Compressor Works

  1. The tool receives raw text input via standard pipe or direct string argument.
  2. It identifies the content type (e.g., file tree, source code, or structured logs).
  3. Heuristic filters are applied to remove redundant whitespace, boilerplate, and developer comments.
  4. Similar data patterns are aggregated to provide a high-level summary without losing context.
  5. The compressed output is returned, typically achieving a 60-90% reduction in size.

RTK Compressor Setup

To integrate this utility into your Openclaw Skills environment, install it via pip:

pip install rtk-compressor

You can then use it directly in the terminal:

echo "your lengthy output" | rtk-compressor

RTK Compressor Data Schema & Taxonomy

RTK Compressor handles various data types with specific optimization strategies as shown in the table below:

Command Category Optimization Strategy Target Reduction
ls / tree Aggregates file paths and removes redundant nodes 80%
cat / read Strips boilerplate and non-functional characters 70%
Test Outputs Summarizes pass/fail patterns and collapses logs 90%
JSON / Logs Minifies structure and retains key-value essentials High

RTK Compressor Advanced Features

  • Direct Python API support for seamless integration into custom AI agent scripts.
  • Support for multiple output formats including ls/tree, cat/read, and structured JSON.
  • Smart aggregation logic that identifies and groups similar repeating technical items.
  • High-efficiency processing capable of handling 40,000+ token inputs instantly.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*