jimliu/baoyu-skills

baoyu-compress-image

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

ソースを見る

使い方

  1. インストールコマンドをコピーし、自分の環境へ導入する前にソースを確認します。
  2. 必要なツール、認証情報、対応環境を原文で確認します。
  3. 入力と成果物を指定し、出力を資料と照合します。
npx skills add https://github.com/jimliu/baoyu-skills --skill baoyu-compress-image

開始前の確認

  • 導入にはモデル契約、API枠、ファイルへのアクセス許可は含まれません。
  • スター数や導入数は活動の指標であり、独立した品質・安全性試験ではありません。
リポジトリの原文

見出し、例、コード、表、リンク、参照画像を含む原文を表示しています。

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.

同じリポジトリから

関連する Skills

すべての Skills
jimliu
コミュニティ

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.

1時間の導入数
6
GitHub Stars
2.7万
更新日
11月1日
jimliu
コミュニティ

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

1時間の導入数
5
GitHub Stars
2.7万
更新日
11月1日
jimliu
コミュニティ

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

1時間の導入数
6
GitHub Stars
2.7万
更新日
11月1日
jimliu
コミュニティ

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.

1時間の導入数
5
GitHub Stars
2.7万
更新日
11月1日