跳到正文
cccskills
免费在 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.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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.

实测评分 未实测

查看安装方法

适用场景

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

包含的文件(2)

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

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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.

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

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-skills2.7万2026年9月11日 更新

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-skills2.7万2026年9月11日 更新

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-skills2.7万2026年9月11日 更新

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-skills2.7万2026年9月11日 更新

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-skills2.7万2026年9月11日 更新

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-skills2.7万2026年9月11日 更新

查看 JimLiu 的全部技能

报告此技能的问题