baoyu-compress-image
Skill4 starsChanged 9 months agoCC0-1.0View on GitHub
Compresses images to JPEG/WebP/PNG using an automated multi-platform CLI (sips, cwebp, sharp). Washed for Obsidian Creator Vault: defaults to JPEG at 65 quality (for <1MB output), and auto-archives original files.
- Installs packages
14 other projects use a version of this.
Adopted by
Most recently taken up by
- jangrui/skillstheir own version, first seen Nov 22, 2026
- JimLiu/baoyu-skillstheir own version, first seen Nov 8, 2026
- xfstudio/skillstheir own version, first seen Oct 13, 2026
- eugeneli326/claude-skillstheir own version, first seen Oct 13, 2026
- zephyrwang6/myskilltheir own version, first seen Oct 8, 2026
- qihangzhang-272/agent-skill-librarytheir own version, first seen Oct 2, 2026
Used with
Projects with it also use deepl, imagemagick-conversion and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
zephyrwang6Skilldeepl
Übersetzt Texte, Dokumente und XLIFF-Dateien via DeepL API. Verwende für Übersetzungen mit /deepl translate, /deepl file oder /deepl xliff.
Also in 4 projects that use this
zephyrwang6Skillimagemagick-conversion
Convert and manipulate images with ImageMagick. Covers format conversion, resizing, batch processing, quality adjustment, and image transformations. Use when user mentions image conversion, resizing images, ImageMagick, magick command, batch image processing, or thumbnail generation.
Also in 4 projects that use this
- +9 more from zephyrwang6
Other versions14 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 14
- JimLiu/baoyu-skills★ 28ksame name
- zephyrwang6/myskill★ 339same name
- YuppyChen/ai-wechat★ 65same name
- open-fox/agents★ 55same name
- xuanxuan1983/baoyu-xuanyi-skills★ 45same name
- ideacco/baoyu-skills-openclaw★ 14same name
- SpaceZephyr/allSkills★ 14same name
- xfstudio/skills★ 9same name
- qihangzhang-272/agent-skill-library★ 2same name
- cocyuhao/my-ai-skills-library★ 1same name
4 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- ast-grepSkill
- baoyu-article-illustratorSkill
- baoyu-cover-imageSkill
- baoyu-image-genSkill
- baoyu-infographicSkill
- baoyu-markdown-to-htmlSkill
- baoyu-post-to-wechatSkill
- baoyu-xhs-imagesSkill
- tentacle-markdown2htmlSkill
- tentacle-obsidian-initSkill
- tentacle-post2wechatSkill
- tentacle-skills-washingSkill
The file
We split this skill into the rules it gives an agent
3 rules. 0 are common, 0 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 14 edited versions we read keep these.
0
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 12
Clean Vault: When run in default mode (replace), it doesn't clutter your Assets/ with _original files.
- Very specific: line 13
Dependency Sandboxing: All runtime is wrapped through bun and isolated inside .agents/skills.
- Very specific: line 42
Run the script using bun from the root of the vault.
“Common” is measured: kept by at least 6 in 10 of the 14 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
baoyu-compress-image
Auto-compresses images using the best available CLI tool on the system (sips, cwebp, convert, or sharp).
This has been specifically adapted for the Obsidian Creator Vault:
- Fast Web-focused: Defaults to generating
.jpgwith65quality (perfect for most platform limits < 1MB). - Clean Vault: When run in default mode (replace), it doesn't clutter your
Assets/with_originalfiles. Instead, it backs up the original unmodified file toArchive/Original-Images/. - Dependency Sandboxing: All runtime is wrapped through
bunand isolated inside.agents/skills.
Installation & System Requirements
This script automatically detects your OS and uses the fastest and highest quality image engine it can find in this order:
- macOS
sips(Built-in, Highly Recommended)
macOS ships withsipsnatively. No installation required.
(Under the hood:sips -s format jpeg -s formatOptions 65 <input> --out <output>) cwebp(Best for webp targets)- macOS:
brew install webp - Ubuntu/Debian:
sudo apt install webp
- macOS:
- ImageMagick (
convert)- macOS:
brew install imagemagick - Linux:
sudo apt install imagemagick
- macOS:
sharp(Node.js fallback for Windows / Non-Native Envs)
Automatically installed when you run the localbun installcommand. The sharp engine handles compression via libvips without needing external binaries.
First Time Setup (TS Environment):
cd .agents/skills/baoyu-compress-image
bun installUsage
Run the script using bun from the root of the vault.
bun .agents/skills/baoyu-compress-image/scripts/main.ts <input> [options]Options
| Option | Short | Description | Default |
<input> | Input target (File or directory) | Required | |
--output | -o | Strict output file path | Same dir as input |
--format | -f | Output format (jpeg, webp, png) | jpeg |
--quality | -q | Quality Level 0-100 | 65 |
--keep | -k | Keep original file in-place (don't archive it) | false |
--recursive | -r | Process directories recursively | false |
Examples & Workflows
1. Compress a generated AI image for publishing (Default)
bun .agents/skills/baoyu-compress-image/scripts/main.ts Assets/cover-draft.pngEffect: It creates Assets/cover-draft.jpg and safely moves cover-draft.png out of the way into Archive/Original-Images/.
2. Compress an image but keep it as WebP format
bun .agents/skills/baoyu-compress-image/scripts/main.ts Assets/screenshot.png -f webp3. Test different quality manually and keep the original there
bun .agents/skills/baoyu-compress-image/scripts/main.ts Assets/photo.png -q 80 --keep4. Batch-compress an entire directory
bun .agents/skills/baoyu-compress-image/scripts/main.ts "00 Inbox/" -rDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

