⏳ This skill is pending AI review.

Scores will appear once the review pipeline completes.

v1.0.0

compress-images

rameerez@rameerez⭐ 32 stars· last commit 9mo ago· 0 open issues

Compress images for web/SEO performance using cwebp. Use when optimizing images for faster page loads, reducing file sizes, or converting JPG/PNG to WebP format.

Choose how to use this skill

You do not need every option. Choose the path your AI client supports. The stable page stays the same; versioned files are immutable.

1. Native installer

This listing has no registered native installer command. Use the complete package or source fallback below, depending on what your client supports.

Do not guess an installer command or replace an existing version without reviewing the diff.

2. Complete package recommended

Download the ZIP when available. It includes SKILL.md plus the references, security notes and version metadata.

No complete ProSkills package is published for this listing yet.

3. Prompt-only

Copy the prompt above when the agent can read the stable page or when you want to adopt the workflow without installing a skill.

Need only the instruction file?

Download SKILL.md only if your client requires a single file. The complete ZIP is safer for a full installation because it preserves the references and release context.

No path installs or executes anything by itself. Your agent still needs access to the project files. Before updating, compare the installed version and review the diff.

—/10

// RATINGS

⭐GitHub Stars
⭐⭐ 32 on GitHubGitHub ↗

Growing

🟢ProSkills Score
—
📍

Not yet listed on ClawHub or SkillsMP

// README

Startup Skills for Claude Code

Essential Claude Code skills for building startups, SaaS, and software businesses.

Install

/plugin marketplace add rameerez/claude-code-startup-skills
/plugin install startup@rameerez-claude-code-startup-skills

Done. Now you have access to all skills below.

Skills

SkillWhat it does
/startup:compress-imagesCompress images to WebP for blazing fast page loads
/startup:customer-empathyDeep-dive into customer empathy and user journey thinking
/startup:download-videoDownload videos from X, YouTube, TikTok, Instagram, etc.
/startup:transcribe-videoGenerate subtitles and transcripts from video/audio
/startup:x-postPost to X (Twitter) — text, images, and video

Usage

/startup:compress-images ./images/
/startup:download-video https://x.com/user/status/123
/startup:transcribe-video ./video.mp4
/startup:x-post "Just shipped a new feature!"
/startup:customer-empathy

Contributing

PRs welcome! Add your skill to skills/<skill-name>/SKILL.md.

License

MIT

// HOW IT'S BUILT

// FILES

2 files shipped with this skill. Inline text is the catalog copy. The upstream link is the source repository.

  • skills/compress-images/SKILL.md3.7 KBd52ff8b7b825upstream ↗
    ---
    name: compress-images
    description: Compress images for web/SEO performance using cwebp. Use when optimizing images for faster page loads, reducing file sizes, or converting JPG/PNG to WebP format.
    argument-hint: "[directory]"
    allowed-tools: Bash(cwebp:*), Bash(ls:*), Bash(mkdir:*), Bash(mv:*)
    ---
    
    # Image Compression Skill
    
    Compress all images in `$ARGUMENTS` (or `app/assets/images/content/` if no path provided) to WebP format, optimized for SEO performance (target: under 100KB per image).
    
    ## Process
    
    1. **Create originals folder** - Create `originals/` subfolder inside the target directory and move source files there. Never destroy source files.
    2. **Compress each image** (JPG, PNG, GIF) from `originals/` to the parent directory as `.webp`
    3. **Iterate until all images are under 100KB** - check sizes after each pass, re-compress any that exceed the target
    4. **Report results** with before/after sizes
    5. **Update references** in content files from old extensions to `.webp`
    
    ## File Structure
    
    ```
    target-directory/
    ├── originals/           # High-quality source files preserved here
    │   ├── hero.jpg
    │   └── feature.png
    ├── hero.webp            # Compressed, web-optimized
    └── feature.webp
    ```
    
    ## Iterative Compression Algorithm
    
    **IMPORTANT:** Keep compressing until ALL images are under 100KB. Check sizes after each pass and re-compress any that exceed the target.
    
    ### Step 1: Initial pass (q 70)
    ```bash
    cwebp -q 70 -resize 1200 0 originals/image.jpg -o image.webp
    ls -lh image.webp  # Check size
    ```
    
    ### Step 2: If still over 100KB, reduce quality progressively
    ```bash
    # Try these in order until under 100KB:
    cwebp -q 60 -resize 1200 0 originals/image.jpg -o image.webp
    cwebp -q 50 -resize 1200 0 originals/image.jpg -o image.webp
    cwebp -q 45 -resize 1200 0 originals/image.jpg -o image.webp
    cwebp -q 40 -resize 1200 0 originals/image.jpg -o image.webp
    cwebp -q 35 -resize 1200 0 originals/image.jpg -o image.webp
    ```
    
    ### Step 3: For stubborn images, also reduce dimensions
    ```bash
    # If q 35 at 1200px is still over 100KB, reduce to 1000px:
    cwebp -q 30 -resize 1000 0 originals/image.jpg -o image.webp
    cwebp -q 25 -resize 1000 0 originals/image.jpg -o image.webp
    ```
    
    ## Real-World Results (Reference)
    
    From actual compression run on content images:
    
    | Image | Original | First Try | Final | Settings Used |
    |-------|----------|-----------|-------|---------------|
    | waves.jpg | 198KB | 33KB | 33KB | q 70, 1200px (1 pass) |
    | calendar.jpg | 246KB | 42KB | 42KB | q 70, 1200px (1 pass) |
    | floating.jpg | 230KB | 43KB | 43KB | q 70, 1200px (1 pass) |
    | cash.jpg | 409KB | 88KB | 88KB | q 70, 1200px (1 pass) |
    | knot.jpg | 395KB | 96KB | 96KB | q 70, 1200px (1 pass) |
    | floating-dark.jpg | 414KB | 94KB | 94KB | q 70, 1200px (1 pass) |
    | keyboard2.jpg | 459KB | 102KB | 102KB | q 70, 1200px (1 pass, acceptable) |
    | **perpetual.jpg** | 565KB | 130KB | **96KB** | q 40, 1200px (3 passes) |
    | **keyboard.jpg** | 718KB | 196KB | **98KB** | q 25, 1000px (5 passes) |
    
    ### Key Insights
    
    1. **Most images** (under 500KB source) compress fine with default settings (q 70, 1200px)
    2. **Large detailed images** (500KB+) often need multiple passes
    3. **Very large images** (700KB+) may need both lower quality AND smaller dimensions
    4. **Keyboard/tech photos** with fine detail are hardest to compress - expect 4-5 passes
    5. **Soft/blurry images** compress much better than sharp detailed ones
    
    ## After Compression
    
    1. **Verify ALL files under 100KB**: `ls -lh *.webp` - re-run compression on any exceeding target
    2. Update content files referencing old extensions (.jpg, .png) to use .webp
    3. Test that images render correctly in the application
    4. Original files remain in `originals/` folder for future reference or re-compression
    
  • README.mdupstream ↗

    Contents are not inlined in the catalog. Open the upstream file.

Plain-text copy, no login: /skill-bundles/rameerez-claude-code-startup-skills-skills-compress-images.md

// REPO STATS

32 stars
0 open issues
Last commit: 9mo ago