jimliu/baoyu-skills

baoyu-compress-image

Compresses images to WebP (default) or PNG with automatic tool selection.

View source

How to use

  1. Copy the installation command and review the source package before installing it in your own agent environment.
  2. Check the source document for required tools, credentials and supported hosts.
  3. Describe your input and desired deliverable; review the output against the source material.
npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-compress-image

Before you start

  • Installation does not include a model subscription, API allowance or permission to access your files.
  • Repository stars and installation counts describe activity, not an independent quality or security test.
Original skill document

Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.

Image Compressor

Tool auto-selection order: sips → cwebp → ImageMagick → Sharp.

Script Directory

{baseDir} = this SKILL.md's directory. Resolve ${BUN_X}: bun if installed; else npx -y bun; else suggest installing bun. Replace {baseDir} and ${BUN_X} with actual values.

ScriptPurpose
scripts/main.tsImage compression CLI

Preferences (EXTEND.md)

First 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

bash
${BUN_X} {baseDir}/scripts/main.ts <input> [options]
${BUN_X} {baseDir}/scripts/main.ts image.png                    # → WebP, replaces original
${BUN_X} {baseDir}/scripts/main.ts image.png -f png --keep      # keep PNG format and original
${BUN_X} {baseDir}/scripts/main.ts ./images/ -r -q 75           # directory, recursive

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

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

Extension Support

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

from this repository

More skills

All skills
jimliu
Community

baoyu-url-to-markdown

Fetch any URL and convert to markdown using baoyu-fetch CLI (Chrome CDP with site-specific adapters). Built-in adapters for X/Twitter, YouTube transcripts, Hacker News threads, and generic pages via Defuddle. Handles login/CAPTCHA via interaction wait modes. Use when user wants to save a webpage as markdown.

1h installs
6
GitHub stars
27.2K
Updated
Nov 1
jimliu
Community

baoyu-comic

Knowledge comic creator supporting multiple art styles and tones. Creates original educational comics with detailed panel layouts and batch-capable image generation. Use when user asks to create "知识漫画", "教育漫画", "biography comic", "tutorial comic", or "Logicomix-style comic".

1h installs
5
GitHub stars
27.2K
Updated
Nov 1
jimliu
Community

baoyu-cover-image

Generates article cover images with 5 dimensions (type, palette, rendering, text, mood) combining 11 color palettes and 7 rendering styles. Supports cinematic (2.35:1), widescreen (16:9), and square (1:1) aspects. Use when user asks to "generate cover image", "create article cover", or "make cover".

1h installs
6
GitHub stars
27.2K
Updated
Nov 1
jimliu
Community

baoyu-danger-x-to-markdown

Converts X (Twitter) tweets and articles to markdown with YAML front matter. Uses reverse-engineered API requiring user consent. Use when user mentions "X to markdown", "tweet to markdown", "save tweet", or provides x.com/twitter.com URLs for conversion.

1h installs
5
GitHub stars
27.2K
Updated
Nov 1