← Back to Skills Marketplace
3-Layer Token Compressor — Cut AI API Costs 40-60%
by
Shadow Rose
· GitHub ↗
· v1.1.0
· MIT-0
579
Downloads
0
Stars
3
Active Installs
2
Versions
Install in OpenClaw
/install token-compressor
Description
Pre-process prompts through 3 compression layers before sending to paid APIs. Uses a local Ollama model to intelligently compress messages and summarize hist...
Usage Guidance
This skill appears coherent and limited to local compression via an Ollama instance. Before installing, ensure you actually run Ollama locally (localhost:11434) and the host/port are not pointed to a remote service. Review and confirm the included src/token-compressor.js matches the shipped copy and that no modifications add external network calls or credential usage. Because compression alters message content, test the tool on non-sensitive data first to verify it preserves the details you need. Finally, if you require strong guarantees that data never leaves the machine, enforce network egress rules (firewall) so the process cannot reach external hosts even if misconfigured.
Capability Analysis
Type: OpenClaw Skill
Name: token-compressor
Version: 1.1.0
The 'token-compressor' skill is a utility designed to reduce LLM API costs by using a local Ollama instance to compress prompts and summarize conversation history. The code in 'src/token-compressor.js' uses the standard Node.js 'http' module to communicate exclusively with 'localhost:11434', and there is no evidence of data exfiltration, unauthorized file access, or malicious execution patterns.
Capability Assessment
Purpose & Capability
Name/description (3-layer compression using a local Ollama model) align with the provided code and README. The library only implements message compression, history summarization, and an in-memory cache — all coherent with the stated purpose.
Instruction Scope
SKILL.md and src/token-compressor.js consistently describe POSTing compression prompts to a local Ollama instance (localhost:11434). The instructions do not read unrelated files, do not request unrelated environment variables, and do not transmit data to external endpoints. The system prompts sent to the model are explicit and limited to compression/summarization instructions.
Install Mechanism
No install spec or external downloads are present; this is an instruction-only skill with an included JS source file. No archives or third-party packages are pulled by the skill itself.
Credentials
The skill requires no credentials, config paths, or environment variables. All runtime configuration is passed via the constructor; network I/O is targeted at a local host and nothing else.
Persistence & Privilege
Skill does not request permanent presence, does not modify other skills or system configs, and uses only an in-memory cache (no disk persistence). 'always' is false and autonomous invocation is the platform default (no additional privilege requested).
How to Use
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install token-compressor - After installation, invoke the skill by name or use
/token-compressor - Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
Fixed docs-code mismatch: README now describes actual Ollama-powered API (compressMessage/compressHistory/checkCache). SKILL.md declares Ollama runtime dependency and model prompts sent. Hardcoded 127.0.0.1 replaced with localhost.
v1.0.0
Initial upload
Metadata
Frequently Asked Questions
What is 3-Layer Token Compressor — Cut AI API Costs 40-60%?
Pre-process prompts through 3 compression layers before sending to paid APIs. Uses a local Ollama model to intelligently compress messages and summarize hist... It is an AI Agent Skill for Claude Code / OpenClaw, with 579 downloads so far.
How do I install 3-Layer Token Compressor — Cut AI API Costs 40-60%?
Run "/install token-compressor" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is 3-Layer Token Compressor — Cut AI API Costs 40-60% free?
Yes, 3-Layer Token Compressor — Cut AI API Costs 40-60% is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does 3-Layer Token Compressor — Cut AI API Costs 40-60% support?
3-Layer Token Compressor — Cut AI API Costs 40-60% is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created 3-Layer Token Compressor — Cut AI API Costs 40-60%?
It is built and maintained by Shadow Rose (@theshadowrose); the current version is v1.1.0.
More Skills