Skip to content
cccskills
FreePublished on GitHub

baoyu-compress-image

Reduce image file sizes by compressing individual files or whole folders into WebP, PNG, or JPEG. The skill selects an available compression tool automatically and lets you control quality, include subfolders, and choose whether to keep originals.

OriginalShow the original description

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.

See how to install

Good for

  • Converting images to WebP
  • Compressing a folder and its subfolders
  • Adjusting compression quality
  • Keeping originals while creating compressed copies

Files included (2)

  • SKILL.md2.4 KB
  • scripts/main.ts9.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Image Compressor

Compresses images using best available tool (sips → cwebp → ImageMagick → Sharp).

Script Directory

Scripts in scripts/ subdirectory. {baseDir} = this SKILL.md's directory path. Resolve ${BUN_X} runtime: if bun installed → bun; if npx available → npx -y bun; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.

ScriptPurpose
scripts/main.tsImage compression CLI

Preferences (EXTEND.md)

Check EXTEND.md in priority order — the first one found wins:

PriorityPathScope
1.baoyu-skills/baoyu-compress-image/EXTEND.mdProject
2${XDG_CONFIG_HOME:-$HOME/.config}/baoyu-skills/baoyu-compress-image/EXTEND.mdXDG
3$HOME/.baoyu-skills/baoyu-compress-image/EXTEND.mdUser home

If none found, use defaults.

EXTEND.md supports: Default format, default quality, keep-original preference.

Usage

${BUN_X} {baseDir}/scripts/main.ts <input> [options]

Options

OptionShortDescriptionDefault
<input>File or directoryRequired
--output-oOutput pathSame path, new ext
--format-fwebp, png, jpegwebp
--quality-qQuality 0-10080
--keep-kKeep originalfalse
--recursive-rProcess subdirsfalse
--jsonJSON outputfalse

Examples

# Single file → WebP (replaces original)
${BUN_X} {baseDir}/scripts/main.ts image.png

# Keep PNG format
${BUN_X} {baseDir}/scripts/main.ts image.png -f png --keep

# Directory recursive
${BUN_X} {baseDir}/scripts/main.ts ./images/ -r -q 75

# JSON output
${BUN_X} {baseDir}/scripts/main.ts image.png --json

Output:

image.png → image.webp (245KB → 89KB, 64% reduction)

Extension Support

Custom configurations via EXTEND.md. See Preferences section for paths and supported options.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Analyze an article, choose where illustrations would help, and generate images with consistent types, styles, and colors. Save the illustration plan and prompts, then insert image references into the article's Markdown.

  • Add illustrations where an article needs visual support
  • Illustrate tutorial steps and workflows
  • Create comparison images using article-specific details
JimLiu/baoyu-skills26.8KUpdated Sep 11, 2026

baoyu-comic

FreeSummary

Turn educational topics or biographies into original comics with planned panels and recurring characters. Choose an art style, mood, and layout, then produce storyboards, image prompts, illustrated pages, and a combined PDF.

  • Explaining a learning topic through a comic
  • Turning a person's biography into a comic
  • Creating a four-panel tutorial comic
JimLiu/baoyu-skills26.8KUpdated Sep 11, 2026

Create article cover images based on the topic and tone of the text. Choose the composition, colors, rendering style, text amount, and mood, with reference images and aspect ratios to guide the result.

  • Creating a cover image for a blog article
  • Making a cover with a title and subtitle
  • Matching a cover to reference colors or composition
JimLiu/baoyu-skills26.8KUpdated Sep 11, 2026

Generate text and images through a reverse-engineered Gemini Web API, an interface reconstructed from the web service. Use reference images for descriptions or variations, and continue conversations across requests with saved sessions.

  • Generating images from written prompts
  • Describing the contents of reference images
  • Creating variations from an existing image
JimLiu/baoyu-skills26.8KUpdated Sep 11, 2026

Save X posts, threads, and Articles as Markdown with source and author details. Images and videos can also be downloaded locally. Conversion uses an unofficial API and requires consent before use.

  • Saving an X post with its source details
  • Archiving a thread as Markdown
  • Extracting the full text of an X Article
JimLiu/baoyu-skills26.8KUpdated Sep 11, 2026

baoyu-diagram

FreeSummary

Turn system structures, processes, and concepts into dark-themed diagrams. Create architecture diagrams, flowcharts, timelines, and other visual explanations as scalable SVG files, with PNG versions for use as images.

  • Explain system components and their connections
  • Map process steps and decision branches
  • Show interactions in chronological order
JimLiu/baoyu-skills26.8KUpdated Sep 11, 2026

See all skills by JimLiu

Report a problem with this skill