Overview
- Skill Key
- hexavi8/file-compression
- Author
- hexavi8
- Source Repo
- openclaw/skills
- Version
- -
- Source Path
- skills/hexavi8/file-compression
- Latest Commit SHA
- 3471867dcf16021a6fa37d36b06701e5e83eb4dc
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.
Stars
0
Installs
0
Status
ACTIVE
Visibility
PUBLIC
直接复制以下提示词,发送给你的 AI 助手即可完成安装。
请先检查是否已安装 SkillHub 商店,若未安装,请根据 https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/skillhub.md 安装 SkillHub 商店,然后安装 file-compression 技能。 若已安装,则直接安装 file-compression 技能。
# File Compression
Compress files with Python-first workflows and Node.js fallback workflows.
## Supported File Types
- PDF: `.pdf`
- Image: `.jpg`, `.jpeg`, `.png`, `.webp`
## What This Skill Can Do
- Compress PDF with preset quality levels.
- Compress image with quality/resize/format controls.
- Switch backend automatically when dependencies are missing.
- Detect bad compression results and retry with better strategy.
## Installation Spec (Before Running)
Required binaries:
- `python3` (recommended `>= 3.8`)
- `node`
- `gs` (Ghostscript, required for PDF Ghostscript paths)
Python install spec:
```bash
python3 -m pip install -r {baseDir}/requirements.txt
```
Node install spec:
```bash
cd {baseDir}
npm install
```
Ghostscript install examples:
- macOS: `brew install ghostscript`
- Ubuntu/Debian: `sudo apt-get update && sudo apt-get install -y ghostscript`
Safety note:
- Explain to the user before each install command that third-party packages are being installed.
- If installation fails, report the failing command and switch to available fallback backend.
## CLI Options Cheat Sheet
PDF (`scripts/compress_pdf.py`):
- `--preset screen|ebook|printer|prepress`
- `--strategy auto|ghostscript|pikepdf`
- `--remove-metadata`
- `--no-linearize`
- `--overwrite`
PDF Node (`scripts/compress_pdf_node.mjs`):
- `--preset screen|ebook|printer|prepress`
Image (`scripts/compress_image.py`):
- `--quality <1-100>`
- `--format keep|jpeg|png|webp`
- `--max-width <n>`
- `--max-height <n>`
- `--strategy auto|pillow|node`
- `--overwrite`
Image Node (`scripts/compress_image_node.mjs`):
- `--quality <1-100>`
- `--format keep|jpeg|png|webp`
- `--max-width <n>`
- `--max-height <n>`
## Example Set (Python + Node)
PDF default:
```bash
python {baseDir}/scripts/compress_pdf.py in.pdf out.pdf
```
PDF aggressive:
```bash
python {baseDir}/scripts/compress_pdf.py in.pdf out.pdf --preset screen --strategy ghostscript
```
PDF with pikepdf:
```bash
python {baseDir}/scripts/...
edholofy
University for AI agents. 92 courses, 4400+ scenarios, any model via OpenRouter. Auto-training loops generate per-model SKILL.md documents. Works with Claude Code, OpenClaw, Cursor, Windsurf. No fine-tuning required.
lethehades
macOS WPS Office workflow helper skill for safer document preparation, conversion, export, and compatibility guidance
capt-marbles
Web scraping and crawling with Firecrawl API. Fetch webpage content as markdown, take screenshots, extract structured data, search the web, and crawl documentation sites. Use when the user needs to scrape a URL, get current web info, capture a screenshot, extract specific data from pages, or crawl docs for a framework/library.
caqlayan
Tweet Processor Skill
carev01
Full-text search across structured Markdown documentation archives using SQLite FTS5. Use when you need to search large collections of Markdown articles that are separated by "---" delimiters and contain source URLs (marked with "*Source:" pattern). Provides fast BM25-ranked search with automatic source URL extraction for citations. Ideal for research, documentation lookups, and knowledge base exploration. Requires indexing documentation first with `docs.py index`.
camelsprout
DuckDB CLI specialist for SQL analysis, data processing and file conversion. Use for SQL queries, CSV/Parquet/JSON analysis, database queries, or data conversion. Triggers on "duckdb", "sql", "query", "data analysis", "parquet", "convert data".