file-compression
Compress files to reduce storage and transfer size. Use this skill when users ask to shrink PDFs or images, optimize upload/share size, or balance quality and size. Supports PDF compression and image compression with Python-first workflows plus Node.js fallback when Python dependencies are unavailable.
Why use this skill?
Easily compress PDFs and images to save space. OpenClaw file-compression supports Python and Node.js for reliable, high-quality document and media optimization.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/hexavi8/file-compressionWhat This Skill Does
The file-compression skill is a versatile OpenClaw agent tool designed to optimize file sizes for storage and network transfer. It bridges the gap between Python-based processing and Node.js fallbacks, ensuring reliable performance regardless of the local environment. It supports PDF compression using presets like screen, ebook, and printer-ready, and offers robust image optimization including format conversion (e.g., JPEG to WebP), quality adjustments, and resolution resizing. The skill automatically manages internal dependencies, detects suboptimal compression outcomes, and intelligently reroutes tasks to secondary backends if preferred libraries are missing or failing.
Installation
Installation requires ensuring Python, Node.js, and Ghostscript are present on your system. To install the skill, execute clawhub install openclaw/skills/skills/hexavi8/file-compression in your terminal. Following this, install the necessary dependencies for the Python environment using python3 -m pip install -r {baseDir}/requirements.txt and the Node.js environment via npm install within the skill directory. Always inform the user before triggering these installs as they involve external binary management. On macOS, Ghostscript is best obtained via brew install ghostscript, while Ubuntu/Debian users should use sudo apt-get install -y ghostscript.
Use Cases
- Reducing high-resolution PDF scan sizes for email attachment limits.
- Converting bulk PNG assets to WebP for web performance optimization.
- Downsizing large images to specific pixel dimensions for social media uploads.
- Optimizing document storage for low-bandwidth environments by balancing quality and file size.
- Automating the removal of sensitive PDF metadata before sharing files publicly.
Example Prompts
- "Compress the large invoice scan invoice.pdf so that it is small enough to fit in a standard email attachment without losing readability."
- "Take the PNG images in this folder and convert them all to WebP format with a quality setting of 75 and a maximum width of 1920 pixels."
- "Optimize the report.pdf document using the ebook preset to save disk space while keeping the text and charts crisp."
Tips & Limitations
Always verify the output quality after compression, as extreme 'screen' presets may degrade text readability in complex PDFs. If you encounter errors, the tool's built-in fallback will attempt to use the secondary backend, but ensure Ghostscript is correctly in your system PATH to allow for reliable PDF handling. Note that overwriting files is an optional flag; by default, the skill creates new versions to prevent data loss. Always keep a backup of original high-resolution assets before running bulk processing operations.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-hexavi8-file-compression": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-write, file-read, code-execution
Related Skills
Qrcode
Skill by hexavi8
embodied-ai-news
Aggregates publicly available Embodied AI and Robotics news from curated sources (robotics media, arXiv, company blogs). Delivers structured briefings on humanoid robots, foundation models, hardware, deployments, and funding with direct links to original articles.
daily-stock-analysis
Deterministic daily stock analysis skill for global equities. Use when users need daily analysis, next-trading-day close prediction, prior forecast review, rolling accuracy, and reliable markdown report output.