Preface¶
Common tasks when working with blog images, design exports, and front-end assets include compressing JPEG/PNG/WebP to an acceptable size, converting formats, batch processing, or resizing. Writing your own scripts is fine, but recalling Pillow parameters, handling transparency, and managing batch paths every time adds overhead. Below is a community Skill on SkillHub, image-compress, which consolidates “compress, convert, batch, and resize” into clear instructions an Agent can follow—just state your task in chat.
What is it¶
image-compress (coordinate @user_13f0f8f8/image-new, version 1.0.0) is a community skill under the SkillHub category design-media, provided by user_13f0f8f8. The official description states: use Python Pillow to compress JPEG, PNG, WebP, and support quality adjustment, format conversion, batch processing, and resizing. The tag requires_api_key=false indicates no extra API key is needed.
SkillHub page: https://www.skillhub.cn/skills/user_13f0f8f8/image-new
API metadata: https://api.skillhub.cn/user_13f0f8f8/image-new
Core features¶
The following capabilities come from the official description. Parameters or script names not present in the materials are not expanded here:
- Formats: read and output JPEG, PNG, WebP.
- Quality adjustment: adjust compression quality based on target size or visual fidelity (default values are defined in the SKILL.md inside the skill package).
- Format conversion: e.g., PNG to WebP, JPEG to WebP, and other common pipelines.
- Batch processing: process a directory or multiple files at once, suitable for asset folder cleanup.
- Resizing: adjust resolution before or during compression, useful for thumbnails or fixed-width exports.
Implementation relies on Pillow; the runtime must have Python and the corresponding dependencies installed (after installing the skill, the Agent typically follows the skill instructions to install or prompt for installation).
Installation and activation¶
SkillHub offers two common methods: use the skillhub CLI to install into the current Agent’s skills directory, or pass the installation prompt to the AI to follow the official documentation.
1. Install the SkillHub CLI (if not already installed)¶
Check whether the CLI is present:
command -v skillhub && skillhub --version
If it is not installed, follow the SkillHub installation guide for a full install (CLI + default Skills):
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
If you only need the CLI:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
Reference: https://skillhub.cn/install/skillhub.md
2. Install image-compress¶
When installing the skill, you must use --dir to point to the actual skills directory used by your Agent; otherwise it defaults to ./skills/, and the Agent may not detect it.
skillhub install @user_13f0f8f8/image-new --dir <your skills directory>
Common clients’ skills paths (excerpted from the SkillHub installation guide):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
You can also send the following prompt to the AI on the SkillHub skill page so it installs @user_13f0f8f8/image-new per https://skillhub.cn/install/skillhub.md:
请根据 https://skillhub.cn/install/skillhub.md,安装 `@user_13f0f8f8/image-new`。
After installing or updating the skill, if the Agent does not load the new skill, restart or refresh the session according to your client’s instructions.
Typical usage¶
No standalone CLI tool documentation is provided on the public page; this skill uses the standard SKILL.md format. After enabling the skill, describe the input paths, target formats, quality, and dimensions in natural language. The following conversational examples align with the official capability description (the Agent will follow the steps in the skill package to generate or run a Pillow script):
- Single-file compression: “Compress
/path/to/photo.jpgto around 200KB, output as WebP, keep quality readable.” - Format conversion: “Convert all PNGs under
assets/icons/to WebP, preserve transparency.” - Batch + resize: “Batch process JPEG/PNG in
dist/images/: longest side no more than 1920, export WebP, quality 85.”
Confirm source file paths are accessible before running; for batch tasks, it’s recommended to test on a small subset first, then process all.
Use cases and notes¶
Who it’s for: Developers or content creators who need to compress images, slim down static assets, or unify formats in environments like Cursor, Claude Code, Codex; especially when you don’t want to write Pillow boilerplate every time.
Notes:
- Lossless vs. lossy strategies differ by format (e.g., PNG vs. JPEG); extreme compression may introduce visible artifacts. Check small samples before applying quality parameters.
- Overwriting original files in batch is risky; output to a new directory or back up first.
- This is a community skill; behavior is governed by the SKILL.md in the package and the Pillow version. SkillHub page ratings and download counts change over time; when this article was written, the page showed a rating of 100000 and 714 downloads (refer to the data you see when opening SkillHub).
Closing¶
image-compress consolidates JPEG/PNG/WebP compression, format conversion, batch processing, and resizing into a single Agent skill. It relies on Pillow and requires no API key, making it suitable for handling image assets in your daily development workflow. Installation and coordinates follow SkillHub:
- Skill page: https://www.skillhub.cn/skills/user_13f0f8f8/image-new
- Coordinate:
@user_13f0f8f8/image-new - Installation guide: https://skillhub.cn/install/skillhub.md