ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified file management Safety 4/5

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.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/hexavi8/file-compression
Or

What 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

  1. "Compress the large invoice scan invoice.pdf so that it is small enough to fit in a standard email attachment without losing readability."
  2. "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."
  3. "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

Author@hexavi8
Stars2387
Views0
Updated2026-03-09
View Author Profile
AI Skill Finder

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 skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-hexavi8-file-compression": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#compression#pdf#image#optimization#utilities
Safety Score: 4/5

Flags: file-write, file-read, code-execution