agentsclimarketplace

Imagemagick

Skill ComeOnOliver/skillshub/skills/TerminalSkills/skills/imagemagick

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.From the repository description

Install
npx -y skills add ComeOnOliver/skillshub --skill imagemagick

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

4.3 KB, ~1.2k tokens by cl100k_base, as published. Nobody here has run it

ImageMagick β€” Command-Line Image Processing

You are an expert in ImageMagick, the powerful command-line tool for creating, editing, compositing, and converting images. You help developers automate image processing pipelines using ImageMagick's convert, mogrify, composite, and identify commands β€” batch resizing, format conversion, watermarking, thumbnail generation, PDF manipulation, and complex image compositing for web applications, print production, and data visualization.

Core Capabilities

Basic Operations

# Resize
magick input.jpg -resize 800x600 output.jpg        # Fit within 800x600
magick input.jpg -resize 800x600^ output.jpg        # Fill 800x600 (crop overflow)
magick input.jpg -resize 50% output.jpg             # Scale to 50%
magick input.jpg -resize 800x600! output.jpg        # Exact size (distort)

# Format conversion
magick input.png output.webp                         # PNG β†’ WebP
magick input.svg -density 300 output.png             # SVG β†’ high-res PNG
magick input.pdf[0] output.jpg                       # First page of PDF β†’ JPG

# Quality and compression
magick input.jpg -quality 80 output.jpg              # JPEG quality 80%
magick input.png -strip -quality 85 output.webp      # Strip metadata, WebP quality

# Crop
magick input.jpg -crop 500x500+100+50 output.jpg    # 500x500 from position (100,50)
magick input.jpg -gravity center -crop 1:1 output.jpg # Center square crop

# Rotate
magick input.jpg -rotate 90 output.jpg
magick input.jpg -auto-orient output.jpg             # Fix EXIF rotation

Batch Processing

# Resize all JPGs in directory
magick mogrify -resize 1200x1200 -quality 85 *.jpg

# Convert all PNGs to WebP
for f in *.png; do magick "$f" -quality 80 "${f%.png}.webp"; done

# Generate thumbnails (200x200, center crop)
mkdir -p thumbnails
for f in images/*.jpg; do
    magick "$f" -resize 200x200^ -gravity center -extent 200x200 \
        "thumbnails/$(basename "$f")"
done

# Batch watermark
for f in photos/*.jpg; do
    magick "$f" watermark.png -gravity southeast -composite \
        "watermarked/$(basename "$f")"
done

Compositing and Effects

# Add text watermark
magick input.jpg -gravity southeast \
    -fill 'rgba(255,255,255,0.5)' -pointsize 24 \
    -annotate +10+10 'Β© 2026 Company' output.jpg

# Overlay image watermark
magick input.jpg watermark.png \
    -gravity center -compose dissolve -define compose:args=30 \
    -composite output.jpg

# Create social media card (1200x630)
magick -size 1200x630 gradient:'#667eea'-'#764ba2' \
    -font Helvetica-Bold -pointsize 48 -fill white \
    -gravity center -annotate +0-50 'My Blog Post Title' \
    -pointsize 24 -annotate +0+30 'Read more at example.com' \
    og-image.png

# Contact sheet (grid of images)
magick montage images/*.jpg -geometry 200x200+5+5 -tile 4x3 contact-sheet.jpg

# Animated GIF from images
magick -delay 50 frame_*.png -loop 0 animation.gif

# Compare images (diff)
magick compare image1.png image2.png diff.png

Image Information

# Get image details
magick identify image.jpg
# image.jpg JPEG 3024x4032 3024x4032+0+0 8-bit sRGB 4.2MB

magick identify -verbose image.jpg | head -30     # Full metadata

# Get dimensions as variables
WIDTH=$(magick identify -format '%w' image.jpg)
HEIGHT=$(magick identify -format '%h' image.jpg)

Installation

brew install imagemagick                   # macOS
apt install imagemagick                   # Ubuntu/Debian
# Or download from https://imagemagick.org/script/download.php

Best Practices

  1. mogrify for in-place β€” Use mogrify to modify files in-place; convert/magick for creating new files
  2. WebP for web β€” Convert to WebP with quality 80; 30-50% smaller than JPEG at similar quality
  3. Strip metadata β€” Use -strip to remove EXIF data; reduces file size and protects privacy
  4. Auto-orient β€” Always -auto-orient before processing; fixes rotation from phone cameras
  5. Thumbnail with crop β€” -resize WxH^ then -extent WxH for perfect thumbnails; fill β†’ center crop
  6. Resource limits β€” Set -limit memory 256MiB -limit disk 1GiB for batch jobs; prevents OOM on large images
  7. Pipeline with pipes β€” magick input.jpg - | magick - -resize 50% output.jpg for chaining without temp files
  8. SVG at high DPI β€” Use -density 300 before input for SVG/PDF; controls rasterization quality

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.