
Canghe Compress Image
Compresses images to WebP or PNG with automatic fallback across four compression tools (sips, cwebp, ImageMagick, Sharp). It picks the best available tool on your system, so you don't need to think about dependencies. Handles single files or entire directories recursively, outputs clean reports showing size reductions, and supports project or user level config files for default quality and format preferences. The 80% default quality and WebP target are sensible choices for web optimization. Straightforward for batch processing design assets or cleaning up bloated image folders without manual tool juggling.
- skills.sh installs
- 494
- GitHub stars
- 474
- last updated
- Aug 21, 2026
Install
$ npx -y skills add freestylefly/canghe-skills --skill canghe-compress-image --agent claude-codeInstalls into .claude/skills of the current project.
Files
Image Compressor
Compresses images using best available tool (sips → cwebp → ImageMagick → Sharp).
Script Directory
Scripts in scripts/ subdirectory. Replace ${SKILL_DIR} with this SKILL.md's directory path.
| Script | Purpose |
|---|---|
scripts/main.ts | Image compression CLI |
Preferences (EXTEND.md)
Use Bash to check EXTEND.md existence (priority order):
# Check project-level first
test -f .canghe-skills/canghe-compress-image/EXTEND.md && echo "project"
# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.canghe-skills/canghe-compress-image/EXTEND.md" && echo "user"
Sponsors
Details
- Repository
- github.com/freestylefly/canghe-skills
- First seen
- Jun 3, 2026
More from freestylefly/canghe-skills
All 29- Canghe Danger X To Markdown489
- Canghe Post To X488
- Obsidian Markdown488
- Douyin Downloader485
- Json Canvas484
- Skill Creator483
- Obsidian Bases477
- Release Skills476
- Flyworks Avatar Video378
- Paddleocr Doc Parsing373
- Manga Drama863
- Manga Style Video667
- Seedance Video609
- Canghe Image Gen598
- Canghe Comic584
- Volcengine Video Understanding579
- Canghe Xhs Images573
- Canghe Cover Image545
- Canghe Markdown To Html536
- Canghe Article Illustrator522
- Canghe Infographic516
- Canghe Url To Markdown510
- Canghe Slide Deck506
- Canghe Format Markdown505