본문으로 건너뛰기
cccskills
무료GitHub에 공개

imagemagick-expert

ImageMagick CLIを使用した画像処理の専門家スキル。フォーマット変換、リサイズ、トリミング、回転、フィルタ適用、アニメーションGIF作成、PDF処理、バッチ処理を支援。

Use when processing images via CLI, converting formats, resizing, cropping, applying filters, creating animations, or batch processing images.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

실행 점수 미검증

설치 방법 보기

포함된 파일(6)

  • SKILL.md13.1 KB
  • assets/.gitkeep0 B
  • references/batch_processing.md9.4 KB
  • references/format_conversion.md7.5 KB
  • references/image_manipulation.md10.5 KB
  • scripts/.gitkeep0 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

ImageMagick Expert Skill

Overview

ImageMagickは画像の作成、編集、合成、変換を行うための強力なCLIツールセットです。200以上の画像フォーマットをサポートし、リサイズ、回転、トリミング、色調整、フィルタ適用、アニメーション作成など幅広い画像処理が可能です。

Primary Commands

CommandPurposeExample
magickメインコマンド(v7+)、画像変換・処理magick input.png output.jpg
convert画像変換・処理(レガシー、v6互換)convert input.png output.jpg
identify画像情報の取得identify -verbose image.png
mogrify画像のインプレース変換mogrify -resize 50% *.jpg
composite画像の合成composite overlay.png base.png result.png
montage複数画像のモンタージュ作成montage *.jpg -tile 3x3 montage.jpg

When to Use This Skill

  • 画像フォーマットの変換(PNG↔JPEG↔WebP↔GIF等)
  • 画像のリサイズ、トリミング、回転
  • バッチ処理で複数画像を一括変換
  • 画像へのエフェクト・フィルタ適用
  • アニメーションGIFの作成・編集
  • PDF↔画像の相互変換
  • 画像情報(サイズ、フォーマット、メタデータ)の取得
  • 画像の結合・モンタージュ作成

Workflow

  1. Identify Requirements - Determine the desired operation (convert, resize, filter, etc.) and output format
  2. Select Command - Choose appropriate ImageMagick command (magick, mogrify, identify, etc.)
  3. Build Command - Construct command with options and parameters based on Core Operations examples
  4. Execute - Run the command via Bash tool
  5. Verify Output - Check the result using identify or visual inspection
  6. Iterate - Adjust parameters if needed based on output quality

For batch operations, use mogrify for in-place edits or shell loops for custom naming patterns.

Prerequisites

# Check installation
magick --version

# macOS (Homebrew)
brew install imagemagick

# Linux (Ubuntu/Debian)
sudo apt-get install imagemagick

# Linux (CentOS/RHEL)
sudo yum install ImageMagick

Core Operations

Format Conversion

# Basic conversion
magick input.png output.jpg
magick input.jpg output.webp
magick input.gif output.png

# With quality setting (JPEG/WebP)
magick input.png -quality 85 output.jpg
magick input.png -quality 90 output.webp

# PNG compression level (0-9)
magick input.jpg -define png:compression-level=9 output.png

# Convert to grayscale
magick input.png -colorspace Gray output.png

# Convert to specific color depth
magick input.png -depth 8 output.png

Image Information

# Basic info (format, dimensions, color depth)
magick identify image.png

# Verbose info (all metadata)
magick identify -verbose image.png

# Specific properties
magick identify -format "%w x %h\n" image.png
magick identify -format "Format: %m\nSize: %wx%h\nDepth: %z-bit\n" image.png

# JSON output
magick identify -format "%[json:*]" image.png

# Batch info
magick identify *.jpg

Resize Operations

# Resize to width (maintain aspect ratio)
magick input.png -resize 800x output.png

# Resize to height (maintain aspect ratio)
magick input.png -resize x600 output.png

# Resize to fit within dimensions (maintain aspect ratio)
magick input.png -resize 800x600 output.png

# Resize to exact dimensions (ignore aspect ratio)
magick input.png -resize 800x600! output.png

# Resize by percentage
magick input.png -resize 50% output.png

# Resize only if larger (shrink only)
magick input.png -resize "800x600>" output.png

# Resize only if smaller (enlarge only)
magick input.png -resize "800x600<" output.png

# High-quality resize (Lanczos filter)
magick input.png -filter Lanczos -resize 800x output.png

# Thumbnail (faster, for previews)
magick input.png -thumbnail 200x200 output.png

Crop and Trim

# Crop WxH+X+Y (width x height from position X,Y)
magick input.png -crop 400x300+100+50 output.png

# Center crop
magick input.png -gravity center -crop 400x300+0+0 output.png

# Trim whitespace/borders
magick input.png -trim output.png

# Trim with fuzz tolerance (for near-white)
magick input.png -fuzz 10% -trim output.png

# Add border after trim
magick input.png -trim -bordercolor white -border 10 output.png

# Crop to square (center)
magick input.png -gravity center -crop 1:1 output.png

Rotation and Flip

# Rotate clockwise
magick input.png -rotate 90 output.png
magick input.png -rotate 180 output.png
magick input.png -rotate 270 output.png

# Rotate counter-clockwise
magick input.png -rotate -90 output.png

# Rotate with background fill
magick input.png -background white -rotate 45 output.png

# Auto-rotate based on EXIF
magick input.jpg -auto-orient output.jpg

# Flip (vertical mirror)
magick input.png -flip output.png

# Flop (horizontal mirror)
magick input.png -flop output.png

Effects and Filters

Blur and Sharpen

# Gaussian blur (radius x sigma)
magick input.png -blur 0x8 output.png
magick input.png -gaussian-blur 0x3 output.png

# Motion blur (radius x sigma, angle)
magick input.png -motion-blur 0x12+45 output.png

# Sharpen
magick input.png -sharpen 0x1 output.png

# Unsharp mask (more control)
magick input.png -unsharp 0x1+1+0.05 output.png

# Noise reduction
magick input.png -despeckle output.png
magick input.png -noise 2 output.png

Color Adjustments

# Brightness-Contrast (brightness x contrast)
magick input.png -brightness-contrast 10x5 output.png

# Modulate (brightness, saturation, hue) - percentages
magick input.png -modulate 110,120,100 output.png

# Level adjustment (black-point, gamma, white-point)
magick input.png -level 10%,1.2,90% output.png

# Auto-level (stretch contrast)
magick input.png -auto-level output.png

# Normalize (enhance contrast)
magick input.png -normalize output.png

# Enhance (simple improvement)
magick input.png -enhance output.png

# Negate (invert colors)
magick input.png -negate output.png

# Sepia tone
magick input.png -sepia-tone 80% output.png

# Colorize
magick input.png -colorize 30%,0%,0% output.png  # Add red tint

Artistic Effects

# Charcoal sketch
magick input.png -charcoal 2 output.png

# Pencil sketch
magick input.png -sketch 0x10+120 output.png

# Oil painting
magick input.png -paint 4 output.png

# Emboss
magick input.png -emboss 0x1 output.png

# Edge detection
magick input.png -edge 1 output.png

# Posterize
magick input.png -posterize 4 output.png

# Solarize
magick input.png -solarize 50% output.png

# Vignette
magick input.png -vignette 0x50 output.png

# Polaroid effect
magick input.png -polaroid 0 output.png

Animation and GIF

Create Animation

# Create GIF from multiple images
magick -delay 100 frame_*.png animation.gif

# Delay in centiseconds (100 = 1 second)
magick -delay 50 *.png animation.gif  # 0.5 second per frame

# Set loop count (0 = infinite)
magick -delay 100 -loop 0 *.png animation.gif

# Different delays per frame
magick \( -delay 100 frame1.png \) \( -delay 200 frame2.png \) \( -delay 100 frame3.png \) animation.gif

# Resize during creation
magick -delay 100 *.png -resize 400x animation.gif

Optimize GIF

# Optimize layers
magick animation.gif -layers Optimize optimized.gif

# Optimize colors (reduce palette)
magick animation.gif -colors 64 optimized.gif

# Optimize with coalesce first
magick animation.gif -coalesce -layers Optimize optimized.gif

# Reduce file size
magick animation.gif -fuzz 5% -layers Optimize optimized.gif

Extract Frames

# Extract all frames
magick animation.gif frame_%03d.png

# Extract specific frame (0-indexed)
magick animation.gif[0] first_frame.png
magick animation.gif[5] sixth_frame.png

# Extract range
magick animation.gif[0-4] frame_%d.png

Modify Animation

# Change speed (double speed)
magick animation.gif -delay 50 faster.gif

# Reverse animation
magick animation.gif -reverse reversed.gif

# Add frame to existing GIF
magick animation.gif new_frame.png -append updated.gif

# Coalesce (flatten for editing)
magick animation.gif -coalesce frames_%03d.png

PDF Processing

PDF to Images

# Convert all pages to PNG
magick -density 300 document.pdf page_%03d.png

# Specific page (0-indexed)
magick -density 300 document.pdf[0] first_page.png
magick -density 300 document.pdf[2] third_page.png

# Page range
magick -density 300 document.pdf[0-2] page_%d.png

# With quality settings
magick -density 300 -quality 90 document.pdf page_%03d.jpg

# Transparent background
magick -density 300 -background white -alpha remove document.pdf page_%03d.png

Images to PDF

# Multiple images to PDF
magick *.jpg output.pdf

# With compression
magick *.jpg -compress jpeg -quality 85 output.pdf

# Specific page size
magick *.jpg -page A4 output.pdf

# Resize to fit
magick *.jpg -resize 595x842 output.pdf  # A4 at 72dpi

Batch Processing

Using mogrify (In-Place)

# Convert all PNG to JPEG
mogrify -format jpg *.png

# Resize all images
mogrify -resize 800x *.jpg

# Output to different directory
mogrify -path ./resized -resize 50% *.jpg

# Multiple operations
mogrify -resize 800x -quality 85 -format jpg *.png

Using Shell Loop

# Process with custom naming
for f in *.png; do
    magick "$f" -resize 800x "${f%.png}_resized.png"
done

# Convert with counter
i=1; for f in *.jpg; do
    magick "$f" -resize 400x "thumb_$(printf "%03d" $i).jpg"
    ((i++))
done

# Parallel processing
find . -name "*.png" | xargs -P 4 -I {} magick {} -resize 50% {}.resized.png

Using find

# Recursive processing
find . -name "*.jpg" -exec magick {} -resize 800x {} \;

# With output directory
find . -name "*.png" -exec sh -c 'magick "$1" -resize 50% "./output/$(basename "$1")"' _ {} \;

Composite and Montage

Image Composition

# Overlay image
magick base.png overlay.png -composite result.png

# With gravity
magick base.png overlay.png -gravity center -composite result.png

# With transparency
magick base.png \( overlay.png -alpha set -channel A -evaluate set 50% \) -composite result.png

# Watermark
magick photo.jpg -gravity southeast \( watermark.png -resize 200x \) -composite output.jpg

Montage

# Basic grid
magick montage *.jpg -tile 3x3 -geometry +5+5 montage.jpg

# With labels
magick montage *.jpg -tile 3x3 -geometry +5+5 -label "%f" montage.jpg

# Custom size
magick montage *.jpg -tile 4x -geometry 200x200+10+10 montage.jpg

# With background
magick montage *.jpg -tile 3x3 -geometry +5+5 -background white montage.jpg

Common Workflows

Thumbnail Generation

# Square thumbnail with center crop
magick input.jpg -thumbnail 200x200^ -gravity center -extent 200x200 thumb.jpg

# Thumbnail with border
magick input.jpg -thumbnail 200x200 -bordercolor gray -border 2 thumb.jpg

Web Optimization

# JPEG optimization
magick input.jpg -strip -interlace Plane -quality 85 output.jpg

# WebP conversion
magick input.jpg -quality 80 output.webp

# PNG optimization
magick input.png -strip -define png:compression-level=9 output.png

Photo Enhancement

# Auto-enhance
magick input.jpg -auto-orient -auto-level -normalize output.jpg

# Subtle sharpening
magick input.jpg -unsharp 0x0.5+0.5+0 output.jpg

Troubleshooting

Common Issues

IssueCauseSolution
convert: not authorizedPolicy restrictionEdit /etc/ImageMagick-*/policy.xml
Memory errorLarge imageUse -limit memory 2GB
Slow processingHigh resolutionUse -thumbnail instead of -resize
Color shift (JPEG)Color profileUse -strip or -colorspace sRGB

Policy Configuration

For PDF processing issues, edit policy.xml:

<!-- Allow PDF read/write -->
<policy domain="coder" rights="read|write" pattern="PDF" />

Memory Limits

# Set memory limits
magick -limit memory 2GB -limit map 4GB input.png output.png

# Check current limits
magick -list resource

Output

This skill provides conversational guidance and ImageMagick CLI command examples. No files are automatically generated - you execute the suggested commands via the Bash tool to process images according to your requirements.

Resources

Reference Documentation

For detailed information, refer to:

  • references/format_conversion.md - Format-specific options and best practices
  • references/image_manipulation.md - Advanced manipulation techniques
  • references/batch_processing.md - Batch processing patterns and scripts

Scripts

The scripts/ directory is reserved for future automation scripts. Currently, all operations use ImageMagick CLI commands directly.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Track and update action item status from natural language updates like 'Seanのメールには返信しておいた' or 'Lu対応予定'. Integrates with daily-comms-ops workflow. Use when managing action items across communication channels.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 23일 업데이트

AI活用提案の専門コンサルタントスキル。LLM・AIエージェントの活用事例知識を基に、業界別、部門別、シーン別に最適なAI導入提案を行います。システム化、業務改善、効率化を得意とし、具体的な活用事例、期待効果、導入ステップを含む実践的な提案を提供します。Use when proposing AI/LLM adoption strategies for specific industries, departments, or business scenarios.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 23일 업데이트

Generate AI-powered BPO service proposals for Japanese companies in the US market. Use when creating outsourcing proposals with AI service menus, ROI estimation, implementation roadmaps, and bilingual (JA/EN) proposal documents for 在米日系企業向けAI実装.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 23일 업데이트

AI(LLM)が生成した日本語テキストの「AI臭」を検出・診断し、人間らしい文章にリライトするスキル。 Use when: 「AIっぽい文章を直して」「人間らしくリライトして」「AI臭を消して」「この文章をもっと自然にして」 「テキストのAI感を減らして」「機械っぽさを取りたい」 "make this sound more human", "remove AI tone", "humanize this text", "detect if this is AI-generated". 6つのAI特有パターン(視覚的マーカー、単調なリズム、マニュアル的構成、非コミット姿勢、抽象語の濫用、 定型メタファー)を正規表現ベースで検出し、0-100のAI臭スコアを算出。3つの人間化技法 (バランスを崩す・客観を崩す・論理を崩す)でリライトを実行する。 Note: 検出スクリプトは日本語テキスト専用。英語テキストの場合はClaude自身がreferences/を参照して分析・リライトする。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 23일 업데이트

Generate audit-ready internal control design documents from As-Is business process inventories. Produces control IDs, assertion mappings, procedures, SoD analysis, KPIs, materiality thresholds, and implementation roadmaps. Use when building internal controls for new audit engagements, SOX/J-SOX compliance, or process improvement initiatives.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 23일 업데이트

Review audit-related documents (control design documents, bottleneck analyses, requirements definitions, etc.) for quality, scoring them 0-100 with a severity-rated findings list. Use when reviewing audit documents, checking control design quality, or verifying cross-document consistency. Supports documents governed by US GAAP, IFRS, or J-GAAP.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

takusaotome/claude-skills-library102026년 10월 23일 업데이트

takusaotome의 스킬 모두 보기

이 스킬의 문제 신고