baoyu-compress-image
Image Compressor
Compresses images using best available tool (sips → cwebp → ImageMagick → Sharp).
Script Directory
Scripts in scripts/ subdirectory. Replace ${SKILL_DIR} with this SKILL.md's directory path.
| Script | Purpose |
|---|---|
scripts/main.ts |
Image compression CLI |
Preferences (EXTEND.md)
Use Bash to check EXTEND.md existence (priority order):
# Check project-level first
test -f .baoyu-skills/baoyu-compress-image/EXTEND.md && echo "project"
# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.baoyu-skills/baoyu-compress-image/EXTEND.md" && echo "user"
┌────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ .baoyu-skills/baoyu-compress-image/EXTEND.md │ Project directory │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.baoyu-skills/baoyu-compress-image/EXTEND.md │ User home │ └────────────────────────────────────────────────────────┴───────────────────┘
┌───────────┬───────────────────────────────────────────────────────────────────────────┐ │ Result │ Action │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Found │ Read, parse, apply settings │ ├───────────┼───────────────────────────────────────────────────────────────────────────┤ │ Not found │ Use defaults │ └───────────┴───────────────────────────────────────────────────────────────────────────┘
EXTEND.md Supports: Default format | Default quality | Keep original preference
Usage
npx -y bun ${SKILL_DIR}/scripts/main.ts <input> [options]
Options
| Option | Short | Description | Default |
|---|---|---|---|
<input> |
File or directory | Required | |
--output |
-o |
Output path | Same path, new ext |
--format |
-f |
webp, png, jpeg | webp |
--quality |
-q |
Quality 0-100 | 80 |
--keep |
-k |
Keep original | false |
--recursive |
-r |
Process subdirs | false |
--json |
JSON output | false |
Examples
# Single file → WebP (replaces original)
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png
# Keep PNG format
npx -y bun ${SKILL_DIR}/scripts/main.ts image.png -f png --keep
# Directory recursive
npx -y bun ${SKILL_DIR}/scripts/main.ts ./images/ -r -q 75
# JSON output
npx -y bun ${SKILL_DIR}/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.
More from azure12355/weilan-skills
browser-agent
AI 驱动的浏览器自动化工具集,包含 agent-browser(无障碍树提取)、actionbook(50+ 网站自动化食谱)、browser-use(Python 自动化库)。使用场景:(1) 抓取需要 JS 渲染的网页内容 (2) 从 X/Twitter、GitHub、Reddit 等平台获取数据 (3) 截图网页 (4) 自动化浏览器操作 (5) 获取网页的无障碍树结构。当用户需要访问动态网页、绕过反爬虫、或执行浏览器自动化时使用此技能。
25baoyu-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.
2baoyu-image-gen
AI image generation with OpenAI, Google and DashScope APIs. Supports text-to-image, reference images, aspect ratios. Sequential by default; parallel generation available on request. Use when user asks to generate, create, or draw images.
2test-fix-verify
Intelligent code testing, fixing, and verification assistant. Automatically executes appropriate testing and verification workflows based on different types of code changes. Use when verifying code changes - Backend API modifications require unit tests and build checks - Frontend changes require build checks and browser debugging with optional skip for trivial style changes - Configuration file changes require dependency installation and build checks - Code refactoring requires full test suite and lint checks - New feature development requires writing tests, running tests, and browser testing
2release-skills
Universal release workflow. Auto-detects version files and changelogs. Supports Node.js, Python, Rust, Claude Plugin, and generic projects. Use when user says "release", "发布", "new version", "bump version", "push", "推送".
2nextjs-enterprise-init
Initialize and structure Next.js projects for enterprise-scale development. Use when setting up a new Next.js project or restructuring an existing one to follow enterprise conventions. Creates feature-first architecture with proper separation of concerns, establishes coding standards, sets up extensibility for theming and i18n, and generates project documentation (CLAUDE.md).
2