← 返回 Skills 市场
pratiknarola

Image Tools (ImageMagick)

作者 Pratik Narola · GitHub ↗ · v1.0.0 · MIT-0
linuxdarwin ⚠ suspicious
43
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install image-tools-magick
功能描述
Comprehensive image editing toolkit using ImageMagick. Resize, crop, composite (overlay), pad, annotate, adjust (brightness/contrast/blur/rotate/flip), remov...
使用说明 (SKILL.md)

Image Tools (ImageMagick)

Pixel-level image manipulation via shell scripts. For AI-based editing (add/remove content with prompts), see nano-banana-pro.

Requires: imagemagick (apt install imagemagick / brew install imagemagick)

Scripts

All scripts are in scripts/ relative to this skill. All output to a new file (non-destructive).

🔧 resize.sh — Resize images

scripts/resize.sh \x3Cinput> \x3Cgeometry> [output]
Geometry Effect
800x Width 800, keep aspect ratio
800x600 Fit within 800x600
800x600! Force exact 800x600 (distort)
50% Scale to 50%
800x800\> Shrink only if larger

✂️ crop.sh — Crop images

scripts/crop.sh \x3Cinput> \x3CWxH+X+Y> [output]
  • 500x500+100+50 — crop 500x500 starting at pixel (100, 50)
  • 500x500+center — center crop (special mode)

🧩 composite.sh — Overlay / place image on image

scripts/composite.sh \x3Cbackground> \x3Coverlay> [output] [options]

Options: --gravity, --offset +X+Y, --resize GEO, --opacity PCT

  • Place logo on photo: scripts/composite.sh bg.jpg logo.png out.jpg --gravity southeast
  • Watermark: scripts/composite.sh bg.jpg mark.png out.jpg --opacity 30 --resize 200x200

📐 pad.sh — Add padding / extend canvas

scripts/pad.sh \x3Cinput> \x3CWxH> [output] [--color COL] [--gravity POS]
  • Make square: scripts/pad.sh wide.jpg 1080x1080 --color white
  • Transparent pad: scripts/pad.sh icon.png 512x512 --color none

🎨 adjust.sh — Brightness, contrast, rotate, flip, blur, etc.

scripts/adjust.sh \x3Cinput> [output] [options]

Options: --brightness N, --contrast N, --saturation N, --rotate N, --flip, --flop, --grayscale, --blur 0xN, --sharpen 0xN, --negate, --border WxH, --border-color COL

🔤 annotate.sh — Add text overlay

scripts/annotate.sh \x3Cinput> \x3Ctext> [output] [options]

Options: --font, --size, --color, --bg, --gravity, --offset, --stroke, --stroke-width

🧹 remove-bg.sh — Remove solid background color → transparent

scripts/remove-bg.sh \x3Cinput> \x3Coutput> [tolerance%] [color]
  • Remove white: scripts/remove-bg.sh icon.png clean.png
  • Remove green screen: scripts/remove-bg.sh photo.png clean.png 25 "#00FF00"

🔄 convert-format.sh — Format conversion

scripts/convert-format.sh \x3Cinput> \x3Coutput> [--quality N] [--strip]

Supports: PNG, JPG, WebP, GIF, BMP, TIFF

ℹ️ info.sh — Image metadata

scripts/info.sh \x3Cimage>

Direct ImageMagick (for anything not covered by scripts)

# Tile/montage multiple images
montage img1.jpg img2.jpg img3.jpg -geometry 300x300+5+5 montage.jpg

# Generate app icon set
for size in 1024 512 256 128 64 32 16; do
  convert icon.png -resize ${size}x${size} icon-${size}.png
done

# Rounded corners
convert input.png \( +clone -alpha extract -draw 'fill black polygon 0,0 0,15 15,0 fill white circle 15,15 15,0' \
  \( +clone -flip \) -compose Multiply -composite \( +clone -flop \) -compose Multiply -composite \) \
  -alpha off -compose CopyOpacity -composite rounded.png

# Append images (horizontal / vertical)
convert img1.jpg img2.jpg +append horizontal.jpg    # side by side
convert img1.jpg img2.jpg -append vertical.jpg      # stacked

AI-Based Editing

For adding/removing objects, style transfer, or content-aware edits, use the nano-banana-pro skill (Gemini image editing):

uv run /root/shared/skills/nano-banana-pro/scripts/generate_image.py \
  --prompt "remove the person on the left" \
  --input-image photo.jpg \
  --filename edited.png
安全使用建议
Review before installing. Use only with trusted inputs, and avoid passing untrusted annotation text, paths, colors, offsets, rotation, blur, sharpen, or border values until the helper scripts replace eval with safely quoted argument arrays and basic option validation.
能力标签
crypto
能力评估
Purpose & Capability
The artifacts match the stated ImageMagick image-editing purpose: resize, crop, annotate, adjust, composite, pad, convert, remove backgrounds, and inspect metadata. The main concern is implementation safety, not a mismatch in advertised capability.
Instruction Scope
The skill tells agents to pass user-chosen image parameters into shell scripts, and annotate.sh and adjust.sh then re-parse those values through eval. That gives crafted text, colors, geometry, paths, or transform options more authority than the documented image operation requires.
Install Mechanism
No install-time execution, package-install hook, credential request, persistence setup, or hidden installer behavior was found in the provided artifacts or metadata.
Credentials
Local ImageMagick scripts are proportionate for this purpose, but eval-based command construction is not proportionate because it can expand a normal image-editing request into arbitrary local shell execution.
Persistence & Privilege
No background workers, startup persistence, privilege escalation, credential harvesting, or network exfiltration behavior was identified. The risk is limited to invocation-time shell injection in specific helpers.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install image-tools-magick
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /image-tools-magick 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Initial release: resize, crop, composite, pad, annotate, adjust, remove-bg, convert-format, info — full ImageMagick toolkit for AI agents
元数据
Slug image-tools-magick
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Image Tools (ImageMagick) 是什么?

Comprehensive image editing toolkit using ImageMagick. Resize, crop, composite (overlay), pad, annotate, adjust (brightness/contrast/blur/rotate/flip), remov... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 43 次。

如何安装 Image Tools (ImageMagick)?

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

Image Tools (ImageMagick) 是免费的吗?

是的,Image Tools (ImageMagick) 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Image Tools (ImageMagick) 支持哪些平台?

Image Tools (ImageMagick) 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(linux, darwin)。

谁开发了 Image Tools (ImageMagick)?

由 Pratik Narola(@pratiknarola)开发并维护,当前版本 v1.0.0。

💬 留言讨论