Token导航 LogoToken导航TokenDH.com
图像处理执行命令github未标认证来源可访问许可证需确认审计通过

imagemagick-conversion图像魔术转换

Agent Skill

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。它适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。使用时需要确认输入图片、版权来源、输出格式和模型限制;涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。

总安装

188

周安装

8

GitHub Stars

279

下载量

66
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:imagemagick-conversion(图像魔术转换)
来源仓库:https://github.com/zephyrwang6/myskill
仓库路径:skills/imagemagick-conversion
安装命令:
npx skills add https://github.com/zephyrwang6/myskill --skill imagemagick-conversion
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/zephyrwang6/myskill --skill imagemagick-conversion

简介

用于辅助图像生成、适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

  • 图片编辑和视觉素材处理。
  • 适合根据文本生成图片或调用相关图像工具。
  • 需确认输入图片、版权来源和输出格式限制。
  • imagemagick-conversion 属于图像处理类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

ImageMagick Image Conversion

Project: Project-independent Gitignored: Yes

Trigger

Use this skill when users request image manipulation tasks including:

  • Converting between image formats (PNG, JPEG, WebP, GIF, TIFF, etc.)
  • Resizing images (dimensions, percentages, aspect ratios)
  • Batch processing multiple images
  • Adjusting image quality and compression
  • Creating thumbnails
  • Basic image transformations (rotate, flip, crop)

Overview

ImageMagick is a powerful command-line tool for image processing. This skill provides guidance for using the magick command to perform common image conversion and manipulation tasks.

Key Command Pattern:

magick input-file [options] output-file

Common Use Cases

Format Conversion

Basic format conversion:

magick image.jpg image.png
magick photo.png photo.webp

Batch convert all JPEGs to PNG:

magick mogrify -format png *.jpg

Convert with specific output directory:

mkdir -p output
magick mogrify -format webp -path output/ *.jpg

Resizing Images

Resize by percentage:

magick image.jpg -resize 50% output.jpg

Resize to specific width (maintain aspect ratio):

magick image.jpg -resize 800x output.jpg

Resize to specific height (maintain aspect ratio):

magick image.jpg -resize x600 output.jpg

Resize to fit within dimensions (maintain aspect ratio):

magick image.jpg -resize 800x600 output.jpg

Resize to exact dimensions (ignore aspect ratio):

magick image.jpg -resize 800x600! output.jpg

Resize only if larger:

magick image.jpg -resize '800x600>' output.jpg

Resize only if smaller:

magick image.jpg -resize '800x600<' output.jpg

Quality and Compression

Set JPEG quality (1-100, default 92):

magick image.jpg -quality 85 output.jpg

Optimize PNG compression:

magick image.png -quality 95 output.png

Create high-quality WebP:

magick image.jpg -quality 90 output.webp

Thumbnails

Generate thumbnail (fast, lower quality):

magick image.jpg -thumbnail 200x200 thumb.jpg

Generate thumbnail with padding:

magick image.jpg -thumbnail 200x200 -background white -gravity center -extent 200x200 thumb.jpg

Batch Operations

Resize all images in directory:

magick mogrify -resize 800x600 -path resized/ *.jpg

Convert and resize in one operation:

magick mogrify -resize 1200x -format webp -quality 85 -path output/ *.jpg

Process specific file types:

magick mogrify -resize 50% -path smaller/ *.{jpg,png,gif}

Image Information

Display image information:

magick identify image.jpg

Detailed image information:

magick identify -verbose image.jpg

Advanced Transformations

Rotate image:

magick image.jpg -rotate 90 rotated.jpg

Flip horizontally:

magick image.jpg -flop flipped.jpg

Flip vertically:

magick image.jpg -flip flipped.jpg

Crop to specific region:

magick image.jpg -crop 800x600+100+100 cropped.jpg

Auto-orient based on EXIF:

magick image.jpg -auto-orient output.jpg

Strip metadata (reduce file size):

magick image.jpg -strip output.jpg

Important Notes

mogrify vs convert

  • magick mogrify: Modifies files in-place or writes to specified path

- Use -path option to preserve originals - Efficient for batch operations

  • magick convert (or just magick): Creates new files

- Always preserves original - Better for single-file operations

Performance Tips

  1. Use -thumbnail for thumbnails: Faster than -resize for small previews
  2. Use -strip to remove metadata: Reduces file size significantly
  3. Batch operations: Process multiple files in one mogrify command
  4. Quality settings: 85-90 is usually optimal for JPEG (balances size/quality)

Format Recommendations

  • JPEG: Photos, complex images with gradients (lossy)
  • PNG: Screenshots, graphics with transparency (lossless)
  • WebP: Modern format, excellent compression (lossy or lossless)
  • GIF: Simple animations, limited colors
  • TIFF: Archival, high-quality storage

Safety Considerations

Always test commands on copies first:

# Create test directory
mkdir -p test-output

# Test on single file
magick original.jpg -resize 50% test-output/test.jpg

# Verify result before batch processing

Use -path with mogrify to preserve originals:

# This preserves originals in current directory
magick mogrify -resize 800x -path resized/ *.jpg

Quote wildcards in shell:

# Prevents premature shell expansion
magick mogrify -resize '800x600>' -path output/ '*.jpg'

Common Patterns

Web Optimization Workflow

# Create optimized versions for web
mkdir -p web-optimized

# Convert to WebP with quality 85, resize to max 1920px width
magick mogrify -resize 1920x -quality 85 -format webp -path web-optimized/ *.jpg

# Strip metadata to reduce size
magick mogrify -strip web-optimized/*.webp

Thumbnail Generation

# Create thumbnail directory
mkdir -p thumbnails

# Generate 300x300 thumbnails with white padding
for img in *.jpg; do
  magick "$img" -thumbnail 300x300 -background white -gravity center -extent 300x300 "thumbnails/${img%.jpg}_thumb.jpg"
done

Multi-Format Export

# Export to multiple formats for compatibility
mkdir -p exports/{png,webp,jpg}

for img in source/*.png; do
  name=$(basename "$img" .png)
  magick "$img" -quality 90 "exports/png/$name.png"
  magick "$img" -quality 85 "exports/webp/$name.webp"
  magick "$img" -quality 85 "exports/jpg/$name.jpg"
done

Troubleshooting

Check ImageMagick version:

magick -version

Verify supported formats:

magick identify -list format

Test command on single file first:

# Always test before batch operations
magick test-image.jpg -resize 50% test-output.jpg

When to Use This Skill

✓ Use this skill for:

  • Format conversions between standard image types
  • Resizing operations (dimensions, percentages)
  • Quality adjustments and compression
  • Batch processing workflows
  • Generating thumbnails or previews
  • Basic transformations (rotate, crop, flip)

✗ Don't use this skill for:

  • Advanced photo editing (use GIMP, Photoshop)
  • Complex filters or effects (consider dedicated tools)
  • Video processing (use FFmpeg)
  • Vector graphics (use Inkscape, Illustrator)

Integration with Workflows

This skill complements other development workflows:

  • Web development: Optimize images for deployment
  • Documentation: Generate screenshots and diagrams
  • CI/CD: Automate image processing in pipelines
  • Content creation: Prepare images for various platforms

The magick command is typically available via Homebrew (brew install imagemagick) or system package managers.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

32.64%
按下载量换算22

Claude

29.58%
按下载量换算20

Cursor

18.99%
按下载量换算13

Gemini CLI

9.3%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

执行命令

安装流程涉及命令执行,可能通过 npx skills add https://github.com/zephyrwang6/myskill --skill imagemagick-conversion 联网下载 Skill 或依赖。用户安装前应确认命令来源、仓库内容和执行环境。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills