Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Compresses images to WebP (default) or PNG with automatic tool selection. Use when user asks to "compress image", "optimize image", "convert to webp", or reduce image file size.
.claude/skills/freestylefly-canghe-compress-image/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-04 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-07 | ✗→✓ | ▲ Improved | -41% | 0% |
| case-08 | ✗→✓ | ▲ Improved | -15% | 0% |
| case-10 | ✗→✓ | ▲ Improved | -39% | 0% |
| case-14 | ✗→✓ | ▲ Improved | 158% | 0% |
Compresses images using best available tool (sips → cwebp → ImageMagick → Sharp).
Scripts in scripts/ subdirectory. Replace ${SKILL_DIR} with this SKILL.md's directory path.
| Script | Purpose | |--------|---------| | scripts/main.ts | Image compression CLI |
Use Bash to check EXTEND.md existence (priority order):
bash# 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"
┌────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ .canghe-skills/canghe-compress-image/EXTEND.md │ Project directory │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.canghe-skills/canghe-compress-image/EXTEND.md │ User home │ └────────────────────────────────────────────────────────┴───────────────────┘
┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Use defaults │ └───────────┴───────────────────────────────────────────────────────────────────────────┘
EXTEND.md Supports: Default format | Default quality | Keep original preference
bashnpx -y bun ${SKILL_DIR}/scripts/main.ts <input> [options]
| Option | Short | Description | Default | |--------|-------|-------------|---------| | <input> | | File or directory | Required | | --output | -o | Output path | Same path, new ext | | --format | -f | webp, png, jpeg | webp | | --quality | -q | Quality 0-100 | 80 | | --keep | -k | Keep original | false | | --recursive | -r | Process subdirs | false | | --json | | JSON output | false |
bash# Single file → WebP (replaces original) npx -y bun ${SKILL_DIR}/scripts/main.ts image.png # Keep PNG format npx -y bun ${SKILL_DIR}/scripts/main.ts image.png -f png --keep # Directory recursive npx -y bun ${SKILL_DIR}/scripts/main.ts ./images/ -r -q 75 # JSON output npx -y bun ${SKILL_DIR}/scripts/main.ts image.png --json
Output:
image.png → image.webp (245KB → 89KB, 64% reduction)Custom configurations via EXTEND.md. See Preferences section for paths and supported options.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-06 | pass→fail | 5,900 | 8,345 | +41% | 1 | 1 | 0% | 1,020 | 1,111 | +9% | 0 | 0 | — |
case-01 | fail→fail | 8,715 | 7,559 | -13% | 1 | 1 | 0% | 1,321 | 1,095 | -17% | 0 | 0 | — |
case-02 | fail→fail | 10,440 | 6,599 | -37% | 1 | 1 | 0% | 1,924 | 1,065 | -45% | 0 | 0 | — |
case-03 | fail→fail | 9,501 | 8,723 | -8% | 1 | 1 | 0% | 1,535 | 1,348 | -12% | 0 | 0 | — |
case-04 | fail→pass | 8,009 | 4,161 | -48% | 1 | 1 | 0% | 1,356 | 1,466 | +8% | 0 | 0 | — |
case-05 | pass→pass | 7,125 | 2,270 | -68% | 1 | 1 | 0% | 1,143 | 1,106 | -3% | 0 | 0 | — |
case-07 | fail→pass | 12,304 | 1,845 | -85% | 1 | 1 | 0% | 1,793 | 1,054 | -41% | 0 | 0 | — |
case-08 | fail→pass | 9,044 | 2,304 | -75% | 1 | 1 | 0% | 1,379 | 1,167 | -15% | 0 | 0 | — |
case-09 | pass→pass | 4,797 | 2,681 | -44% | 1 | 1 | 0% | 699 | 1,235 | +77% | 0 | 0 | — |
case-10 | fail→pass | 15,663 | 3,754 | -76% | 1 | 1 | 0% | 2,312 | 1,404 | -39% | 0 | 0 | — |
case-11 | pass→pass | 8,892 | 2,762 | -69% | 1 | 1 | 0% | 1,428 | 1,156 | -19% | 0 | 0 | — |
case-12 | pass→pass | 8,561 | 4,053 | -53% | 1 | 1 | 0% | 1,436 | 1,130 | -21% | 0 | 0 | — |
case-13 | pass→pass | 9,552 | 1,590 | -83% | 1 | 1 | 0% | 1,398 | 958 | -31% | 0 | 0 | — |
case-14 | fail→pass | 2,793 | 1,700 | -39% | 1 | 1 | 0% | 383 | 990 | +158% | 0 | 0 | — |
case-15 | pass→pass | 7,195 | 3,748 | -48% | 1 | 1 | 0% | 1,253 | 1,400 | +12% | 0 | 0 | — |
case-16 | pass→pass | 9,488 | 1,928 | -80% | 1 | 1 | 0% | 1,481 | 1,025 | -31% | 0 | 0 | — |
case-17 | fail→pass | 11,615 | 1,691 | -85% | 1 | 1 | 0% | 1,875 | 978 | -48% | 0 | 0 | — |
case-18 | fail→pass | 6,572 | 3,435 | -48% | 1 | 1 | 0% | 1,024 | 1,265 | +24% | 0 | 0 | — |
case-19 | fail→pass | 2,986 | 2,191 | -27% | 1 | 1 | 0% | 374 | 1,067 | +185% | 0 | 0 | — |
case-20 | fail→pass | 9,642 | 5,792 | -40% | 1 | 1 | 0% | 1,555 | 1,781 | +15% | 0 | 0 | — |
case-21 | fail→pass | 9,941 | 9,316 | -6% | 1 | 1 | 0% | 1,439 | 2,034 | +41% | 0 | 0 | — |
case-22 | pass→pass | 8,824 | 4,611 | -48% | 1 | 1 | 0% | 1,444 | 1,519 | +5% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 18 counted toward the lift figure. The other 4 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +41 percentage points is the difference between those two pass rates over the 18 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.