agentleFS
MarkusBittermanMarkusBitterman/claude-imagemagick-plugin/skills/imagemagick/SKILL.md

imagemagick

Skill1 starsChanged 5 months agoApache-2.0View on GitHub

This skill should be used when the user asks to "resize an image", "convert an image" (PNG/JPEG/WebP/AVIF/HEIC/GIF/TIFF/etc.), "crop", "compress", "optimize", "composite", "watermark", "annotate", "montage", "make a thumbnail", "strip metadata", "batch process images", "make an animated GIF", "generate an image", "add a drop shadow", "make a placeholder/test image", "render text as an image", "make it look like paper/polaroid/folded", "make a favicon", "reduce the number of colors", "fix washed-out colors", "convert a color profile (ICC)", "dither an image", "draw shapes/lines on an image", "apply a displacement or warp", "make a tiny-planet photo", "tilt-shift effect", "add a vignette", "make a blurred image placeholder (LQIP)", "generate a favicon set", "watermark a folder of photos", "make a branded/styled QR code", or otherwise manipulate, inspect, or generate raster images from the command line with ImageMagick or GraphicsMagick.

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. badgids/Story-Film-Skills★ 4same name
    2. rogue-dev-studio/ai-agents-rogue★ 2same name
    3. woyorus/agent-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository4 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 1 is distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Never overwrite the user's originals unless explicitly asked.

    line 15
  2. Very specific:

    Read a specific frame/page with index syntax: input.gif[0], document.pdf[0-2] — quote these in the shell.

    line 26
  3. Very specific:

    After -crop, the image keeps its virtual canvas offset.

    line 59

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

ImageMagick

Guidance for performing image operations with the ImageMagick command-line tools.

First steps

  1. Confirm the toolchain: magick -version (ImageMagick 7). If only convert/identify exist without magick, it is ImageMagick 6; if only gm exists, it is GraphicsMagick. See references/gm-and-im6.md for syntax differences.
  2. Inspect before you transform: magick identify <file> for a one-liner, magick identify -verbose <file> for full detail (color profile, alpha, EXIF, quality estimate).
  3. Never overwrite the user's originals unless explicitly asked. Write outputs to new filenames or a separate directory.

IM7 command model

magick [input-settings] input.img [operators] output.img
  • magick replaces convert. The bare convert still works in IM7 but is deprecated (and on Windows collides with a system tool). Prefer magick.
  • Order matters. Settings (e.g. -quality, -density, -background) persist and affect later operations; operators (e.g. -resize, -crop, -rotate) act immediately on the images currently in the stack. Settings placed before an input affect reading (-density 300 input.pdf); operators placed after affect the loaded image.
  • The output file is always the last argument. Its extension selects the encoder; force one explicitly with a prefix: png32:out.png, jpeg:out.img.
  • Read a specific frame/page with index syntax: input.gif[0], document.pdf[0-2] — quote these in the shell; brackets glob in zsh/bash.

Core operations quick reference

TaskCommand
Convert formatmagick in.png out.webp
Resize to fit within boxmagick in.jpg -resize 800x600 out.jpg
Thumbnail (strips metadata, fast)magick in.jpg -thumbnail 200x200 out.jpg
Exact size, cropped to fillmagick in.jpg -resize 800x600^ -gravity center -extent 800x600 out.jpg
Crop regionmagick in.png -crop 400x300+50+100 +repage out.png
Rotatemagick in.jpg -rotate 90 out.jpg
JPEG quality/size tradeoffmagick in.png -quality 85 out.jpg
Strip EXIF/metadatamagick in.jpg -strip out.jpg
Flatten transparency onto colormagick in.png -background white -flatten out.jpg
Animated GIF from framesmagick -delay 10 -loop 0 frame*.png out.gif
Contact sheetmagick montage *.jpg -tile 4x -geometry +5+5 sheet.png
Compare two imagesmagick compare -metric RMSE a.png b.png diff.png

Geometry syntax (800x600, ^, !, >, <, %) is subtle — see references/geometry.md. Multi-step recipes (watermarking, PDF rasterization, batch patterns) are in references/recipes.md. For creating images from nothing — synthesized canvases, typesetting text files, shadows/polaroids/vignettes — see references/generative.md and the worked scripts/fold-paper.sh example. Encoder specifics (PNG8/32, WebP/AVIF/HEIC/JXL options, multi-res ICO, TIFF compression) are in references/formats.md; colorspaces, ICC profiles, palettes and dithering in references/color.md; the -draw vector language in references/drawing.md; -fx math, deep -distort, and morphology in references/fx-and-distort.md.

Batch processing

  • mogrify edits in place and is the most common way users destroy originals. Always use -path to redirect output: magick mogrify -path out/ -resize 50% *.jpg (create out/ first).
  • For anything nontrivial, prefer an explicit shell loop with magick — it is easier to verify and interrupt. magick does not create output directories; make them first:
    mkdir -p resized
    for f in *.png; do magick "$f" -resize 1200x "resized/${f%.png}.jpg"; done

Pitfalls

  • -resize 800x600 fits within the box preserving aspect ratio; it does not produce exactly 800×600. Use ^ + -extent for exact fill, or ! to force distortion.
  • After -crop, the image keeps its virtual canvas offset; add +repage or later operations behave strangely.
  • PDF/SVG input rasterizes at 72 DPI by default — set -density 300 before the input filename for usable resolution. PDF support requires Ghostscript and may be blocked by the system policy.xml.
  • Converting to JPEG silently drops the alpha channel (usually onto black). Flatten onto an explicit -background first.
  • magick compare exits 1 when the images differ (0 = identical, 2 = error). That nonzero exit is normal output, but it aborts scripts running under set -e — append || true or check for exit 2 specifically.
  • Very large images can exhaust memory; check/raise limits with -limit memory 2GiB -limit disk 4GiB or inspect magick identify -list resource.
  • HDRI builds (Q16-HDRI in -version) allow out-of-range pixel values; add -clamp before writing if results look blown out after arithmetic operations.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.