← 返回 Skills 市场
freedompixels

批量图片编辑器

作者 freedompixels · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ 安全检测通过
81
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install cn-batch-image-editor
功能描述
批量图片处理工具。支持批量压缩、调整尺寸、添加水印、格式转换。一键处理整个文件夹,输出到指定目录。适用于电商图片、社媒素材、证件照批量处理。
使用说明 (SKILL.md)

批量图片处理工具

功能

  • 批量压缩:减小图片体积,支持质量调节
  • 批量调尺寸:固定宽高、比例缩放、智能裁剪
  • 批量水印:文字水印、图片Logo水印
  • 格式转换:PNG/JPG/WEBP/GIF互转
  • 重命名:序号、日期、自定义前缀

使用方法

批量压缩

python scripts/batch_image.py compress /path/to/images --quality 85

批量调尺寸

# 固定宽度,高度等比缩放
python scripts/batch_image.py resize /path/to/images --width 800

# 固定高度
python scripts/batch_image.py resize /path/to/images --height 600

# 固定宽高(裁剪或填充)
python scripts/batch_image.py resize /path/to/images --width 800 --height 600 --mode crop

批量加水印

# 文字水印
python scripts/batch_image.py watermark /path/to/images --text "©养虾记" --position bottom-right --opacity 0.5

# 图片水印(Logo)
python scripts/batch_image.py watermark /path/to/images --logo /path/to/logo.png --position center --opacity 0.3

格式转换

# PNG转JPG
python scripts/batch_image.py convert /path/to/images --format jpg --quality 90

# 转WEBP(更小体积)
python scripts/batch_image.py convert /path/to/images --format webp

批量重命名

# 序号重命名
python scripts/batch_image.py rename /path/to/images --prefix "photo_" --start 1

# 日期重命名
python scripts/batch_image.py rename /path/to/images --date-format "%Y%m%d_%H%M%S"

参数说明

参数 说明 默认值
--quality 压缩质量(1-100) 85
--width 目标宽度 -
--height 目标高度 -
--mode 调整模式(scale/crop/fill) scale
--text 水印文字 -
--logo 水印图片路径 -
--position 水印位置 bottom-right
--opacity 水印透明度(0-1) 0.5
--format 目标格式(png/jpg/webp/gif) jpg
--output 输出目录 ./output
--prefix 重命名前缀 ""
--start 重命名起始序号 1

水印位置选项

  • top-left:左上角
  • top-right:右上角
  • bottom-left:左下角
  • bottom-right:右下角
  • center:居中
  • tile:平铺

输出示例

处理完成!
输入目录:/Users/xxx/images
输出目录:/Users/xxx/images/output
处理图片:25张
总耗时:3.2秒
原始大小:125.6 MB → 处理后:32.4 MB(压缩74%)

典型场景

  1. 电商图片:批量调整为800x800,压缩到200KB以内
  2. 社媒素材:批量加水印,防止盗图
  3. 证件照:批量调尺寸(295x413),统一格式
  4. 博客图片:转WebP格式,减小体积
安全使用建议
This skill appears coherent and self-contained: it runs a local Python script that manipulates image files and requires Pillow. Before installing/running, consider: 1) Run it on a small test folder to confirm behavior (output path defaults to subfolders like ./output or ./renamed). 2) Ensure you pass explicit input/output paths to avoid accidental overwrites of originals. 3) Verify any watermark/logo files you supply are trusted (the script will open logo paths you provide). 4) Installing Pillow will run code from PyPI—only a low-risk action but worth noting for locked-down environments. 5) If you want stronger guarantees, inspect the full script (scripts/batch_image.py is included) to confirm there are no hidden behaviors; the included code appears to only perform local image I/O and processing.
功能分析
Type: OpenClaw Skill Name: cn-batch-image-editor Version: 1.1.0 The skill is a legitimate batch image processing utility that uses the Pillow library for resizing, compressing, watermarking, and renaming images. Analysis of `scripts/batch_image.py` and `SKILL.md` shows the code follows standard practices, using `argparse` for CLI input and `pathlib` for file operations, with no evidence of data exfiltration, malicious execution, or prompt injection.
能力评估
Purpose & Capability
Name/description (batch compress/resize/watermark/convert/rename) align with the provided script and SKILL.md. The only runtime dependency is Pillow (declared in install), which is appropriate for image operations. No unrelated credentials, binaries, or config paths are requested.
Instruction Scope
SKILL.md instructs running scripts/batch_image.py with local input/output paths and options that map directly to the script's functions (compress/resize/watermark/convert/rename). The runtime instructions do not request reading other system files, environment variables, or sending data to external endpoints.
Install Mechanism
No install spec that downloads arbitrary code; SKILL.md lists `pip install Pillow`, which is the expected package for the functionality. The package is a well-known PyPI library. The skill includes a local Python script (no remote downloads).
Credentials
The skill requests no environment variables or credentials. The Python script operates on user-specified filesystem paths only and does not access secrets or external services.
Persistence & Privilege
Skill is not forced-always; it is user-invocable and allows agent invocation (default). It does not modify other skills or global agent settings and does not request elevated persistent privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install cn-batch-image-editor
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /cn-batch-image-editor 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
v1.1.0: 修复SKILL.md格式
v1.0.0
v1.0.0 - 初始发布:批量压缩、调尺寸、水印、格式转换、重命名
元数据
Slug cn-batch-image-editor
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

批量图片编辑器 是什么?

批量图片处理工具。支持批量压缩、调整尺寸、添加水印、格式转换。一键处理整个文件夹,输出到指定目录。适用于电商图片、社媒素材、证件照批量处理。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 81 次。

如何安装 批量图片编辑器?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install cn-batch-image-editor」即可一键安装,无需额外配置。

批量图片编辑器 是免费的吗?

是的,批量图片编辑器 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

批量图片编辑器 支持哪些平台?

批量图片编辑器 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 批量图片编辑器?

由 freedompixels(@freedompixels)开发并维护,当前版本 v1.1.0。

💬 留言讨论