Token导航 LogoToken导航TokenDH.com
图像处理只读github未标认证来源可访问许可证需确认审计提醒

image-forge图像锻造

Agent Skill

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

总安装

1,004

周安装

41

GitHub Stars

22

下载量

321
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/tdimino/claude-code-minoan --skill image-forge

简介

用于辅助图像生成、图片编辑、视觉素材处理或图像模型工作流。

  • 适合让 Agent 根据文本生成图片、处理背景、整理视觉提示词或调用相关图像工具。
  • 使用时需要确认输入图片、版权来源、输出格式和模型限制。
  • 涉及人物、品牌、商品或公开展示素材时,应额外核对授权、真实性和内容合规边界。
  • 当前无额外底部简介,可参考来源仓库获取完整功能说明。

SKILL.md

Image Forge

Pixel-precise image editing with three-tier routing: deterministic CLI tools for exact operations, AI models for semantic edits, vision models for analysis.

Routing Decision

Use AI when the edit requires understanding what is in the image. Use ImageMagick when the edit requires knowing exactly what to do to the pixels.

Tier 1: Deterministic (magick, sips, rembg)

Use for operations with exact, numeric parameters:

TaskToolCommand
Resize to exact dimensionsmagickmagick in.jpg -resize 800x600! out.jpg
Resize fit (preserve aspect)magickmagick in.jpg -resize 800x600 out.jpg
Resize fill + cropmagickmagick in.jpg -resize 800x600^ -gravity center -extent 800x600 out.jpg
Resize shrink onlymagickmagick in.jpg -resize '800x600>' out.jpg
Crop at offsetmagickmagick in.jpg -crop 600x400+100+50 +repage out.jpg
Center cropmagickmagick in.jpg -gravity center -crop 600x400+0+0 +repage out.jpg
Auto-trim whitespacemagickmagick in.jpg -fuzz 10% -trim +repage out.jpg
Format convertmagickmagick in.png -quality 85 out.jpg
Add textmagickmagick in.jpg -fill white -pointsize 36 -annotate +10+50 'Text' out.jpg
Composite overlaymagickmagick bg.png fg.png -geometry +50+100 -composite out.png
Watermarkmagickmagick photo.jpg wm.png -gravity SouthEast -geometry +10+10 -compose Dissolve -define compose:args=25 -composite out.jpg
Adjust brightness/contrastmagickmagick in.jpg -brightness-contrast 10x20 out.jpg
Adjust saturationmagickmagick in.jpg -modulate 100,130,100 out.jpg
Grayscalemagickmagick in.jpg -colorspace Gray out.jpg
Sepiamagickmagick in.jpg -sepia-tone 80% out.jpg
Blurmagickmagick in.jpg -blur 0x3 out.jpg
Sharpenmagickmagick in.jpg -sharpen 0x1 out.jpg
Remove backgroundrembgrembg i in.jpg out.png
Strip metadatamagickmagick in.jpg -strip out.jpg
Set DPImagickmagick in.jpg -density 300 out.jpg
Batch resizebatch_ops.pypython3 scripts/batch_ops.py *.jpg --op resize --width 800 --output resized/
Montage/contact sheetmagickmagick montage *.jpg -geometry 200x200+5+5 -tile 4x out.jpg
Quick format convert (macOS)sipssips -s format jpeg in.png --out out.jpg
Quick resize (macOS)sipssips -Z 800 in.jpg --out out.jpg

Tier 2: AI Semantic (nano-banana-pro / Gemini)

Delegate to the nano-banana-pro skill when the edit requires understanding image content:

  • Remove a person/object from a photo
  • Change sky, weather, time of day
  • Apply artistic style transfer
  • Inpaint/outpaint regions
  • Generate new image from scratch
  • Content-aware fill after object removal

Tier 3: Vision Analysis (Claude Read tool)

Use the Read tool to inspect images before/after edits:

  • Verify an edit succeeded
  • Describe image contents
  • Check composition and framing
  • Identify colors, objects, text in image

Scripts

All scripts are in ~/.claude/skills/image-forge/scripts/. Run with python3.

image_info.py — Inspect Image Metadata

python3 ~/.claude/skills/image-forge/scripts/image_info.py photo.jpg
python3 ~/.claude/skills/image-forge/scripts/image_info.py photo.jpg --field dimensions
python3 ~/.claude/skills/image-forge/scripts/image_info.py photo.jpg --field width

Returns clean JSON: dimensions, format, color space, depth, alpha, DPI, ICC profile, EXIF.

image_pipeline.py — Declarative Edit Pipeline

Write a JSON spec, get a single chained magick command. No intermediate files.

# Create spec
cat > /tmp/pipeline.json << 'EOF'
{
    "input": "photo.jpg",
    "output": "result.png",
    "steps": [
        {"op": "resize", "width": 800, "height": 600, "mode": "fill"},
        {"op": "brightness_contrast", "brightness": 5, "contrast": 10},
        {"op": "annotate", "text": "Title", "gravity": "South", "pointsize": 36, "fill": "white", "stroke": "black", "strokewidth": 2},
        {"op": "composite", "overlay": "watermark.png", "gravity": "SouthEast", "opacity": 25},
        {"op": "quality", "value": 90},
        {"op": "strip"}
    ]
}
EOF

# Dry run (print command)
python3 ~/.claude/skills/image-forge/scripts/image_pipeline.py /tmp/pipeline.json --dry-run

# Execute
python3 ~/.claude/skills/image-forge/scripts/image_pipeline.py /tmp/pipeline.json

Available operations:

OpParameters
resizewidth, height, mode (fit/fill/exact/shrink/enlarge/percent), filter
cropw/width, h/height, x, y, gravity
trimfuzz (%)
annotatetext, font, pointsize, fill, stroke, strokewidth, gravity, x, y
compositeoverlay, gravity, x, y, opacity, compose, resize
rotateangle, background
blursigma, radius
sharpensigma, radius
unsharpsigma, radius, amount, threshold
modulatebrightness, saturation, hue (100 = no change)
brightness_contrastbrightness, contrast
levelsblack, white, gamma
gammavalue
sigmoidal_contraststrength, midpoint
colorizecolor, amount (%)
sepiathreshold (%)
grayscale(none)
negate(none)
auto_level(none)
normalize(none)
auto_orient(none)
flip / flop(none)
bordercolor, size
extentwidth, height, background, gravity
shadowopacity, sigma, x, y
transparentcolor, fuzz (%)
alpha_removebackground
alpha_set(none)
qualityvalue (1-100)
strip(none)
densityvalue (DPI)
drawprimitive, fill, stroke, strokewidth
rawargs (string or array of raw magick args)

smart_crop.py — Gravity-Based Smart Crop

python3 ~/.claude/skills/image-forge/scripts/smart_crop.py photo.jpg --target 800x600
python3 ~/.claude/skills/image-forge/scripts/smart_crop.py photo.jpg --target 800x600 --gravity north
python3 ~/.claude/skills/image-forge/scripts/smart_crop.py photo.jpg --target 1080x1080 --output cropped/
python3 ~/.claude/skills/image-forge/scripts/smart_crop.py photo.jpg --target 800x600 --dry-run

Gravities: center, north, south, east, west, northwest, northeast, southwest, southeast.

batch_ops.py — Parallel Batch Processing

python3 ~/.claude/skills/image-forge/scripts/batch_ops.py *.jpg --op resize --width 800 --output resized/
python3 ~/.claude/skills/image-forge/scripts/batch_ops.py *.png --op format --to jpg --quality 85 --output converted/
python3 ~/.claude/skills/image-forge/scripts/batch_ops.py *.jpg --op thumbnail --width 200 --height 200 --output thumbs/
python3 ~/.claude/skills/image-forge/scripts/batch_ops.py *.jpg --op strip --output clean/
python3 ~/.claude/skills/image-forge/scripts/batch_ops.py *.jpg --op watermark --overlay wm.png --opacity 25 --output marked/
python3 ~/.claude/skills/image-forge/scripts/batch_ops.py *.jpg --op resize --width 800 --parallel 8 --output resized/

Operations: resize, thumbnail, format, strip, auto_orient, watermark, crop.

montage_builder.py — Contact Sheets

python3 ~/.claude/skills/image-forge/scripts/montage_builder.py *.jpg --output contact.jpg
python3 ~/.claude/skills/image-forge/scripts/montage_builder.py *.jpg --cols 3 --thumb 300x300 --label --output grid.jpg
python3 ~/.claude/skills/image-forge/scripts/montage_builder.py *.jpg --background '#1a1a2e' --border 2 --output dark_grid.jpg

Quick Recipes

Social Media Crops

# Instagram square
magick in.jpg -resize 1080x1080^ -gravity center -extent 1080x1080 instagram.jpg

# Instagram story
magick in.jpg -resize 1080x1920^ -gravity center -extent 1080x1920 story.jpg

# Twitter/X header
magick in.jpg -resize 1500x500^ -gravity center -extent 1500x500 header.jpg

# OG image
magick in.jpg -resize 1200x630^ -gravity center -extent 1200x630 og.jpg

Watermark

# Text watermark
magick photo.jpg -fill 'rgba(255,255,255,0.3)' -gravity SouthEast \
  -font Helvetica -pointsize 24 -annotate +10+10 '© 2026' out.jpg

# Image watermark at 25%
magick photo.jpg wm.png -gravity SouthEast -geometry +10+10 \
  -compose Dissolve -define compose:args=25 -composite out.jpg

Borders and Shadows

# Solid border
magick in.jpg -bordercolor '#333' -border 10 out.jpg

# Drop shadow
magick in.png \( +clone -background black -shadow 60x5+5+5 \) \
  +swap -background none -layers merge +repage shadow.png

Color Effects

# Vintage
magick in.jpg -modulate 105,80,100 -fill '#704214' -colorize 15% \
  -sigmoidal-contrast 3x60% vintage.jpg

# High contrast B&W
magick in.jpg -colorspace Gray -sigmoidal-contrast 10x50% bw.jpg

Geometry Syntax Quick Reference

SyntaxMeaning
800x600Fit within box, preserve aspect
800x600!Force exact (distort)
800x600>Shrink only if larger
800x600<Enlarge only if smaller
800x600^Fill box (minimum dimension matches)
50%Scale by percentage
+X+YOffset from gravity anchor

Shell escaping: Quote geometry with >, <, ^:

magick in.jpg -resize '800x600>' out.jpg

Critical Reminders

  1. Always +repage after -crop — Virtual canvas offset persists without it
  2. -modulate order is B,S,H — Brightness, Saturation, Hue (not H,S,L)
  3. Settings persist, operators execute immediately — Order matters in magick commands
  4. Use rembg for background removalrembg i input.jpg output.png (add -a for alpha matting)
  5. Quote geometry>, <, ^ are shell metacharacters
  6. -alpha off is permanent in IM7 — Use -alpha deactivate/-alpha activate for temporary toggle
  7. Inspect before editing — Run image_info.py first to know dimensions, format, alpha state
  8. Pipeline for multi-step — Use image_pipeline.py instead of chaining shell commands

References

Detailed references in ~/.claude/skills/image-forge/references/:

  • magick-reference.md — Complete ImageMagick 7 command reference (resize, crop, color, text, drawing, batch, identify)
  • compositing.md — All compositing operators (Duff-Porter, mathematical, lighting, HSL, special)
  • recipes.md — 30+ recipes (borders, shadows, watermarks, social sizing, color effects, sprites, batch patterns)

Dependencies

ToolVersionInstall
ImageMagick7.1.2-7 (Q16-HDRI)brew install imagemagick
rembg2.0.72uv pip install rembg
sipsmacOS built-in
Pillow10.4.0uv pip install Pillow

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

34.44%
按下载量换算111

Claude

31.51%
按下载量换算101

Cursor

19.08%
按下载量换算61

Gemini CLI

9.57%
按下载量换算31

安全审计

Gen Agent Trust Hub

通过

Socket

可疑

Snyk

通过

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

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

来源信息

继续浏览同类 Skills