ワンクリックで
tuzi-compress-image
将图片压缩为 WebP(默认)或 PNG 格式,自动选择压缩工具。当用户要求"压缩图片"、"优化图片"、"转换为webp"或减小图片文件大小时使用。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
将图片压缩为 WebP(默认)或 PNG 格式,自动选择压缩工具。当用户要求"压缩图片"、"优化图片"、"转换为webp"或减小图片文件大小时使用。
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
通过兔子API(nano-banana 模型)、Google、OpenAI、DashScope 和 Replicate 进行 AI 图片生成。支持文生图、参考图片、宽高比、模型选择,以及 OpenAI 兼容网关方言切换。当用户要求生成、创建或绘制图片时使用。
通过兔子API进行AI视频生成。支持 Veo、Sora、Kling、Seedance 等模型,单视频和长视频(多段合成)模式。当用户要求生成视频、创建视频或需要视频生成后端时使用。
优化社交媒体文案,支持小红书、X/Twitter、抖音、微信等平台。根据平台特性调整文风、长度、标签和排版。当用户要求"优化文案"、"润色推文"、"改写小红书文案"、"polish copy"时使用。
为小红书、抖音、X/Twitter、视频号等平台生成短视频内容。分析用户输入,自动适配平台规格,生成视频脚本并调用视频生成后端。当用户要求"生成短视频"、"做一个视频"、"短视频"或为社交平台创建视频内容时使用。
分析代码审查反馈或开发中发现的问题,提取通用规则并更新 CLAUDE.md 和详细规则文档。当用户说"更新规则"、"添加编码规则"、"update claude md"或发现需要记录的编码模式时使用。
通用发布工作流。自动检测版本文件和变更日志。支持 Node.js、Python、Rust、Claude 插件和通用项目。当用户说"发布"、"release"、"新版本"、"bump version"、"push"、"推送"时使用。
| name | tuzi-compress-image |
| description | 将图片压缩为 WebP(默认)或 PNG 格式,自动选择压缩工具。当用户要求"压缩图片"、"优化图片"、"转换为webp"或减小图片文件大小时使用。 |
Compresses images using best available tool (sips → cwebp → ImageMagick → Sharp).
Scripts in scripts/ subdirectory. Replace ${SKILL_DIR} with this SKILL.md's directory path.
| Script | Purpose |
|---|---|
scripts/main.ts | Image compression CLI |
Use Bash to check EXTEND.md existence (priority order):
# Check project-level first
test -f .tuzi-skills/tuzi-compress-image/EXTEND.md && echo "project"
# Then user-level (cross-platform: $HOME works on macOS/Linux/WSL)
test -f "$HOME/.tuzi-skills/tuzi-compress-image/EXTEND.md" && echo "user"
┌────────────────────────────────────────────────────────┬───────────────────┐ │ Path │ Location │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ .tuzi-skills/tuzi-compress-image/EXTEND.md │ Project directory │ ├────────────────────────────────────────────────────────┼───────────────────┤ │ $HOME/.tuzi-skills/tuzi-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
npx -y bun ${SKILL_DIR}/scripts/main.ts <input> [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 |
# 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)
Custom configurations via EXTEND.md. See Preferences section for paths and supported options.