imagemagick-image-operations

Translates natural-language image requests into capability-checked ImageMagick CLI commands.

Updated Sep 10, 2026
One-click install
npx skills add https://github.com/SongTonyLi/imagemagick-image-operations-skill --skill imagemagick-image-operations-songtonyli
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: imagemagick-image-operations
Source: https://github.com/SongTonyLi/imagemagick-image-operations-skill
Command: npx skills add https://github.com/SongTonyLi/imagemagick-image-operations-skill --skill imagemagick-image-operations-songtonyli

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve? ImageMagick's behavior varies by build, and silent failures (wrong output format, missing coders, destructive in-place overwrites) are common. This Skill lets an agent turn plain-English image requests into correct, verified magick commands while detecting missing delegates, policy restrictions, and silent format fallbacks before they corrupt results. ## Core Features & Use Cases - Full image operation coverage: inspection and EXIF, format conversion and compression, resizing, cropping, rotation, color and tone, transparency, compositing, watermarking, text and drawing, effects, montages, animation, batch processing, image comparison, and PDF/SVG/PSD rasterization. - Runtime capability detection: preflight checks of -list format, delegates, and policy, plus round-trip probes, so the agent never promises formats the local build cannot actually write (e.g., a broken HEIC coder that silently writes a PNG). - Safety guardrails: protects originals from destructive mogrify runs, treats untrusted files as an attack surface with FORMAT: prefixes and resource limits, and validates every output's real format, dimensions, and alpha state. - Use Case: Ask "Get this JPEG under 200 kilobytes" or "Remove the GPS location from these photos" and receive a verified command whose output is checked with identify and semantic assertions. ## Quick Start Ask the agent to resize every JPEG in a folder to 1200 pixels wide into a new output directory using ImageMagick.

Frequently Asked Questions about imagemagick-image-operations

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I resize or convert images with ImageMagick from natural language?

Describe the outcome you want, such as making a 300x300 square thumbnail or converting PNGs to JPEG, and the agent builds the correct magick command. It inspects the input first, orders settings before operators, and validates the output dimensions and format afterward.

How do I batch convert a folder of images with mogrify safely?

Use mogrify with -path pointing to a new output directory, since mogrify overwrites its inputs in place by default. The skill enforces this pattern and never passes -- to mogrify, which would create a file literally named -- while exiting 0.

Why does ImageMagick write the wrong format without any error?

When the output coder cannot be resolved, ImageMagick silently falls back to the input's format, writes it under the requested filename, and exits 0. The fix is an explicit FORMAT: prefix on the output and verifying the result with identify -format '%m'.

Does ImageMagick support HEIC, AVIF, or JXL on my machine?

Support depends on the build, not the version string; magick -version can advertise delegates whose coder modules are missing from disk. The skill's preflight script detects this delegate/coder mismatch and uses a round-trip encode probe as the only reliable check.

Why does ImageMagick refuse to read PDF files?

Many distributions disable PDF, PS, and EPS in policy.xml for security, producing an 'operation not allowed by the security policy' error. Detect it with magick -list policy; it is a deliberate restriction, not a missing Ghostscript installation.

Is it safe to run ImageMagick on untrusted image files?

Untrusted input is a real attack surface given ImageMagick's CVE history with MSL, MVG, and URL coders. The skill quotes all paths, requires ./ or FORMAT: prefixes, rejects @ listfiles, sets -limit resource caps, and recommends a restrictive policy.xml.