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
9 other projects use a version of this.
Adopted by
Most recently taken up by
- open-fox/agentstheir own version, first seen Aug 14, 2026
- JimLiu/baoyu-skillstheir own version, first seen May 5, 2026
- SpaceZephyr/allSkillstheir own version, first seen Mar 31, 2026
- YuppyChen/ai-wechattheir own version, first seen Mar 19, 2026
- zinan92/skills-repotheir own version, first seen Mar 15, 2026
- zhangdszq/vk-skillstheir own version, first seen Mar 10, 2026
Used with
Projects with it also use baoyu-format-markdown and baoyu-url-to-markdown.
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.
ideaccoSkillbaoyu-format-markdown
Formats plain text or markdown files with frontmatter, titles, summaries, headings, bold, lists, and code blocks. Use when user asks to "format markdown", "beautify article", "add formatting", or improve article layout. Outputs to {filename}-formatted.md.
Also in 6 projects that use this
xfstudioSkillbaoyu-url-to-markdown
Fetch any URL and convert to markdown using Chrome CDP. Supports two modes - auto-capture on page load, or wait for user signal (for pages requiring login). Use when user wants to save a webpage as markdown.
Also in 4 projects that use this
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- JimLiu/baoyu-skills★ 26ksame 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
- zhangdszq/vk-skills★ 1same name
- zinan92/skills-repo★ 1same name
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 9 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 9 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.

