tokenQrusher for Openclaw

tokenQrusher is a high-performance optimization system that drastically reduces AI agent token usage through intelligent context filtering and heartbeat management.

qsmtco
v2.1.1
Feb 18, 2026
0
0
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install tokenqrusher

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 tokenqrusher 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 tokenQrusher?

tokenQrusher is a specialized utility designed for the ecosystem of Openclaw Skills to address the high costs associated with large language model API usage. It functions as a middleware layer that intercepts agent bootstrap events to ensure only the most relevant context is sent to the model. By categorizing user prompts into complexity levels, it can reduce token overhead by up to 99% for simple interactions while preserving full capability for complex engineering tasks.

Beyond context management, the skill optimizes the background heartbeat frequency of AI agents. This prevents unnecessary API calls for periodic checks like email or calendar monitoring, further reducing costs and improving system efficiency. Built with performance in mind, tokenQrusher operates with sub-millisecond latency and uses deterministic logic to ensure reliable, thread-safe execution within your local environment.

tokenQrusher Use Cases

  • Reducing operational costs when running AI agents on expensive models like GPT-4 or Claude 3 Opus.
  • Improving response times by minimizing the amount of context the LLM needs to process for simple queries.
  • Managing API rate limits by intelligently spacing out heartbeat and monitoring calls.
  • Customizing agent persona visibility by selectively loading identity or tool files based on the task.
  • Implementing quiet hours for automated agents to prevent background activity during non-working hours.

How tokenQrusher Works

  1. The system triggers the token-context hook during the agent:bootstrap event for every user message.
  2. The classification engine analyzes the user prompt to determine if it is simple, standard, or complex.
  3. Based on the prompt complexity, the skill filters the workspace file list to include only the files defined in the local configuration.
  4. Simultaneously, the token-heartbeat hook evaluates whether a scheduled background task is due based on custom intervals and quiet hour settings.
  5. If the check is not yet due or falls within quiet hours, the system returns a status to skip the API call.
  6. The final optimized context and heartbeat schedule are passed back to the gateway for the agent to execute.

tokenQrusher Setup

To integrate this optimization layer into your Openclaw Skills setup, follow these installation steps:

# Install the skill from the hub
clawhub install tokenQrusher

# Enable the context and heartbeat hooks
tokenqrusher install --hooks

# Verify the installation status
tokenqrusher status

# Restart the OpenClaw gateway to apply optimizations
openclaw gateway restart

Ensure you have python3 and node installed as prerequisites for the core modules.

tokenQrusher Data Schema & Taxonomy

The skill utilizes local JSON configuration files to define optimization rules, ensuring no data ever leaves your system. This aligns with the security standards of Openclaw Skills.

Configuration Type Path Key Settings
Context Filter ~/.openclaw/hooks/token-context/config.json File arrays for simple, standard, and complex modes.
Heartbeat Optimizer ~/.openclaw/hooks/token-heartbeat/config.json Interval settings (in seconds) for email, calendar, and monitoring.
Shared Logic token-shared module Classification logic and path traversal protection patterns.

tokenQrusher Advanced Features

  • Deterministic complexity classification using a high-speed inference engine with <1ms latency.
  • Configurable quiet hours to completely silence background API calls during specific time ranges.
  • TTL-cached configurations allowing for live updates without immediate gateway restarts.
  • CLI-based prompt testing to preview context savings before enabling hooks in production.
  • Path traversal protection and exhaustive typing to ensure secure and stable local execution.

SKILL.md


Loading

Related Openclaw Skills

Featured*