A lightweight local script that compresses prompt files to minimize token usage in iterative AI development cycles.
The fastest way to install a skill directly from the registry.
npx clawhub@latest install prompt-compression
Copy the skill folder to one of these locations
~/.openclaw/skills/ <project>/skills/ Priority: Workspace > Local > Bundled
Copy this prompt to OpenClaw to install it automatically.
Help me install prompt-compression using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).
Get the raw skill files in a ZIP archive.
Trinity Compress is a specialized utility designed to optimize the efficiency of AI coding agents by reducing the token footprint of prompt files. As a featured tool within the Openclaw Skills ecosystem, it operates as a local bash script that strips unnecessary characters and bloat from prompts before they are processed by token-billed providers. Unlike model-based compressors that might introduce hallucinations, Trinity Compress runs locally and preserves critical elements like code blocks, URLs, and variable names, ensuring that your AI agent maintains perfect context while consuming fewer resources.
By integrating this skill into your repository, you can significantly lower API costs and improve the speed of iterative development loops. The tool is designed to be non-destructive, utilizing a backup system that allows for instant restoration of original files, making it a safe and essential addition to any professional AI development workflow.
To integrate Trinity Compress into your project, follow these steps:
# For Windows (PowerShell)
./scripts/install.ps1
# For Linux/macOS (Bash)
bash scripts/install.sh
# To run compression in balanced mode
bash scripts/trinity-compress.sh balanced
# To undo changes and restore backups
# If using the provided Makefile:
make optimize-undo
Ensure that you have bash 4+, jq, and bc installed on your system for full functionality.
Trinity Compress manages its operations through a specific set of files and metadata structures:
| Component | Description |
|---|---|
| trinity-compress.config.json | The primary configuration file defining rules, targets, and exclusion patterns. |
| scripts/trinity-compress.sh | The core execution logic for the prompt optimization workflow. |
| *.bak | Automatic backups generated for every modified file to ensure safety. |
| Makefile Snippets | Optional targets like optimize-prompts and optimize-undo for CLI automation. |
| .gitignore | Automatically updated to ignore .bak files and prevent repository bloat. |
Loading
A local script that compresses prompt files to minimize token costs in iterative AI development cycles.

An advanced AI tool for deep understanding of images, videos, and complex documents using the GLM-4.6V model.

A specialized tool for automating movie and TV show requests through your personal Overseerr instance using natural language.

A specialized shopping agent that scouts major retailers and refurbished marketplaces to deliver the top 3 best deals directly into Discord channels.

A powerful automation skill for managing Obsidian vaults and Markdown notes via the command line using notesmd-cli.

A high-performance CLI client for Bitwarden and Vaultwarden designed for secure credential retrieval and script integration.








































