freestylefly avatar

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-code

Installs 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.

ScriptPurpose
scripts/main.tsImage 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

Recommended

1juliusbrussee avatarcavemanjuliusbrussee/cavemanUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels618.3Kskills.sh installs
2mattpocock avatargrill-memattpocock/skillsA relentless interview to sharpen a plan or design.1.5Mskills.sh installs
3shadcn avatarimproveshadcn/improveSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s40Kskills.sh installs
4obra avatarsystematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes326.7Kskills.sh installs
5forrestchang avatarkarpathy-guidelinesforrestchang/andrej-karpathy-skillsBehavioral guidelines to reduce common LLM coding mistakes through explicit assumptions, simplicity, and verifiable success criteria.17.9Kskills.sh installs
6vercel-labs avatarfind-skillsvercel-labs/skillsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int4.3Mskills.sh installs