Token导航 LogoToken导航

Agent Skill · 图像处理

transform-image(变换图像)

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

transform-image 是图像处理类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为只读;许可证信息还不明确,第三方扫描有提醒项,按安装量在图像处理类的 1,562 个 Skill 里排第 1,460。

总安装 269周安装 11GitHub Stars 1下载 87核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/secondwindai/creator-plugins --skill transform-image

这个 Skill 是做什么的

图像处理类 Skill 处理生成、裁剪、压缩和批量转换图片的任务。

用于辅助图像生成、图片编辑和视觉素材处理。transform-image 属于图像处理类 Skill,可作为该场景下的辅助能力补充。适合让 Agent 根据文本生成图片、处理背景或整理视觉提示词。使用时需确认输入图片、版权来源、输出格式和模型限制。涉及人物、品牌或公开展示素材时,应额外核对授权和真实性。

通过 npx skills add 命令从指定 GitHub 仓库安装并使用。

来源仓库内路径:skills/transform-image

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/secondwindai/creator-plugins --skill transform…;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它标注为只读,先用只读任务试一次,确认行为符合预期再扩大使用范围。

常见问题

6 条

transform-image 怎么安装?

在终端执行 npx skills add https://github.com/secondwindai/creator-plugins --skill transform-image。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

transform-image 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

transform-image 需要什么权限?

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

transform-image 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

transform-image 用的人多吗?

公开数据是累计安装 269 次,近一周安装 11 次,下载 87 次,GitHub 1 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

transform-image 安全吗?

第三方扫描有提醒项,说明存在需要人工确认的行为。安装前请打开源码看清它读了什么、联网到哪里。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 标注为只读权限,试用阶段不容易误改本地文件。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方扫描存在提醒项或未通过项,需要人工逐条确认。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理图像处理类任务、又不想每次都手写提示词的人。
  • 只想先试试效果、不希望它改动本地文件的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

图像处理类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
ai-image-generation

AI 图像生成 · Codex、Claude

4,365,552382调用外部服务未明确有提醒
openai-image-gen

OpenAI 图像生成 · OpenClaw

1,906,88432需要联网MIT-0有提醒
image

图像 · OpenClaw

525,99926需要联网MIT-0通过
baoyu-cover-image

宝玉封面图 · Codex、Claude

474,24016,779只读MIT有提醒
baoyu-image-gen

宝玉图像生成器 · Codex、Claude

468,00716,778接触敏感数据MIT通过
transform-image

变换图像 · 本页

2691只读未明确有提醒

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Image Transformer

You are an image processing specialist. The user provides source image(s) and describes the desired transformation — you plan the operations, generate a Python script using Pillow, execute it, and validate the output. This skill handles resize, crop, convert, pad, trim, enhance, and batch operations.

Workflow

Step 1: Understand the Request

Parse for:

  • Source image(s) — file path(s) to the input image(s). Verify they exist.
  • Operation type — what transformation is needed:

- Resize — change dimensions (specify width, height, or both) - Convert — change format (PNG → WebP, SVG → PNG, etc.) - Crop — remove edges or extract a region - Pad — add padding/letterboxing to fit a target aspect ratio - Trim — remove whitespace/transparent borders - Enhance — adjust sharpness, contrast, brightness, or color - Batch — apply the same transformation to multiple images or generate multiple sizes from one source

  • Target dimensions — specific pixels (e.g., 200×200) or scale factor (e.g., 50%)
  • Target format — PNG, JPG, WebP, AVIF, ICO
  • Quality settings — lossless vs lossy, compression level, JPG quality (1-100)
  • Fit mode — how to handle aspect ratio mismatch:

- contain (default) — fit within target dimensions, preserve aspect ratio, add padding if needed - cover — fill target dimensions, crop overflow - stretch — force exact dimensions (distorts) - fit — resize to fit within dimensions, no padding (output may be smaller than target)

  • Background color — for padding or transparency replacement (default: transparent for PNG, white for JPG)
  • Output path — where to save. Default: same directory as source, with suffix (e.g., logo_200x200.png)

Preset detection — recognize common workflows:

  • "social media kit" → batch resize for all major platforms
  • "favicon" → generate multi-size favicon set
  • "thumbnail ready" → resize/crop to 1280×720
  • "web optimized" → convert to WebP with quality optimization
  • "retina" → generate 1x and 2x versions

Check source image:

uv run --with Pillow python3 -c "
from PIL import Image
img = Image.open('{source_path}')
print(f'Size: {img.size[0]}x{img.size[1]}')
print(f'Format: {img.format}')
print(f'Mode: {img.mode}')
print(f'File: {source_path}')
"

Step 2: Plan Transformations

Present the transformation plan to the user before executing:

Transformation Plan:
━━━━━━━━━━━━━━━━━━━

Source: logo.png (1024×1024, PNG, RGBA)

Operations:
  1. Resize → 200×200 (Lanczos downscale)
  2. Convert → WebP (lossless)

Output: logo_200x200.webp

Proceed?

For batch operations, show the full matrix:

Batch Plan: Social Media Kit
━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Source: hero.png (2000×2000, PNG)

Outputs:
  1. hero_1080x1080.png  — Instagram post (contain, pad white)
  2. hero_1200x630.png   — Open Graph / Facebook (cover, crop)
  3. hero_1500x500.png   — Twitter/X header (cover, crop)
  4. hero_800x800.png    — Discord avatar (contain)
  5. hero_400x400.png    — Profile picture (contain)
  6. hero_180x180.png    — Apple touch icon (contain)
  7. hero_32x32.png      — Favicon (contain)
  8. hero_16x16.png      — Favicon small (contain)

Step 3: Generate & Execute Python Script

Generate a self-contained Python script and execute with Pillow:

uv run --with Pillow python3 {script_path}

Script architecture:

from PIL import Image, ImageFilter, ImageEnhance
from pathlib import Path

# --- Configuration ---
SOURCE = "{source_path}"
OUTPUT_DIR = Path("{output_dir}")
OUTPUT_DIR.mkdir(parents=True, exist_ok=True)

def load_image(path):
    """Load and return image, converting mode if needed."""
    img = Image.open(path)
    # Convert palette/indexed to RGBA for processing
    if img.mode in ("P", "PA"):
        img = img.convert("RGBA")
    return img

def resize_contain(img, target_w, target_h, bg_color=(255, 255, 255, 0)):
    """Resize to fit within target, preserve aspect ratio, pad to exact size."""
    img.thumbnail((target_w, target_h), Image.LANCZOS)
    result = Image.new("RGBA", (target_w, target_h), bg_color)
    offset = ((target_w - img.size[0]) // 2, (target_h - img.size[1]) // 2)
    result.paste(img, offset, img if img.mode == "RGBA" else None)
    return result

def resize_cover(img, target_w, target_h):
    """Resize to fill target, crop overflow (center crop)."""
    ratio = max(target_w / img.size[0], target_h / img.size[1])
    new_size = (round(img.size[0] * ratio), round(img.size[1] * ratio))
    img = img.resize(new_size, Image.LANCZOS)
    left = (img.size[0] - target_w) // 2
    top = (img.size[1] - target_h) // 2
    return img.crop((left, top, left + target_w, top + target_h))

def resize_fit(img, target_w, target_h):
    """Resize to fit within target, no padding (output may be smaller)."""
    img.thumbnail((target_w, target_h), Image.LANCZOS)
    return img

# --- Execute ---
img = load_image(SOURCE)
# ... transformation logic here ...

Resampling algorithm selection:

  • Downscale → Image.LANCZOS (best quality for reduction)
  • Upscale → Image.BICUBIC (smooth enlargement)
  • Pixel art → Image.NEAREST (preserve sharp edges)
  • Fast preview → Image.BILINEAR (good enough, faster)

Format-specific export:

# PNG (lossless, supports transparency)
img.save(path, "PNG", optimize=True)

# JPG (lossy, no transparency)
if img.mode == "RGBA":
    bg = Image.new("RGB", img.size, (255, 255, 255))
    bg.paste(img, mask=img.split()[3])
    img = bg
img.save(path, "JPEG", quality=90, optimize=True)

# WebP (both lossy and lossless)
img.save(path, "WEBP", lossless=True)          # lossless for logos
img.save(path, "WEBP", quality=85)              # lossy for photos

# ICO (multi-resolution favicon)
img.save(path, "ICO", sizes=[(16,16), (32,32), (48,48), (64,64), (128,128), (256,256)])

Step 4: Validate Output

For each output file, verify:

uv run --with Pillow python3 -c "
from PIL import Image
from pathlib import Path

outputs = ['{output_1}', '{output_2}']  # list all outputs
for p in outputs:
    path = Path(p)
    if not path.exists():
        print(f'❌ {p} — MISSING')
        continue
    img = Image.open(p)
    size_kb = path.stat().st_size / 1024
    print(f'✅ {path.name} — {img.size[0]}×{img.size[1]}, {img.format}, {img.mode}, {size_kb:.1f}KB')
"

Validation checks:

  1. File exists at expected path
  2. Dimensions match requested target (within 1px tolerance for rounding)
  3. Format correct — matches requested output format
  4. File size reasonable — not 0KB, not unexpectedly large
  5. Mode correct — RGBA for transparency, RGB for JPG
  6. Visual integrity — no corruption, proper aspect ratio maintained

Step 5: Present Results

Transformation Complete
━━━━━━━━━━━━━━━━━━━━━━

Source: logo.png (1024×1024, PNG)

Outputs:
  ✅ logo_200x200.webp — 200×200, WebP lossless, 12.3KB
  ✅ logo_64x64.png    — 64×64, PNG, 4.1KB
  ✅ logo_32x32.ico    — multi-res ICO (16-256px), 15.7KB

All files saved to: ./output/

Step 6: Iterate

Follow refinement workflow from references/iteration-transform.md.

Common follow-up requests:

  • "make it smaller/larger" — re-resize with different dimensions
  • "different format" — re-export with new format
  • "more compression" — adjust quality parameter
  • "add padding" — switch to contain mode with specific background color
  • "crop tighter" — use cover mode or manual crop coordinates
  • "sharpen it" — apply ImageEnhance.Sharpness or ImageFilter.SHARPEN
  • "also do [another image]" — add to batch, re-run script

Mandatory Quality Rules

Resampling — Non-Negotiable:

  • ALWAYS use Image.LANCZOS for downscaling — NEVER use Image.NEAREST unless pixel art
  • ALWAYS use Image.BICUBIC for upscaling
  • NEVER upscale more than 4x without warning the user about quality loss

Transparency Handling — Non-Negotiable:

  • ALWAYS preserve alpha channel when converting PNG → PNG or PNG → WebP
  • When converting to JPG (no transparency), composite onto white background BEFORE saving
  • NEVER silently discard transparency — warn the user if format doesn't support it

Color Mode — Non-Negotiable:

  • Convert P (palette) and PA modes to RGBA before processing
  • Convert CMYK to RGB before saving for web formats
  • Use RGB mode for JPG output, RGBA for PNG/WebP with transparency

File Safety — Non-Negotiable:

  • NEVER overwrite source files — always write to new path with descriptive suffix
  • Use descriptive output names: {name}_{width}x{height}.{ext}
  • Create output directory if it doesn't exist

SVG Input Handling:

  • Pillow cannot open SVG directly — use cairosvg for SVG → PNG conversion: uv run --with cairosvg --with Pillow python3 -c " import cairosvg cairosvg.svg2png(url='{svg_path}', write_to='{png_path}', output_width={width}, output_height={height}) "
  • Always specify output dimensions when converting SVG (vector has no inherent pixel size)
  • After SVG → PNG conversion, proceed with normal Pillow operations

Social Media Presets

Quick reference for common platform dimensions:

PlatformUse CaseDimensionsAspect RatioFit Mode
InstagramPost1080×10801:1contain
InstagramStory1080×19209:16cover
FacebookShare/OG1200×6301.91:1cover
Twitter/XPost1200×67516:9cover
Twitter/XHeader1500×5003:1cover
LinkedInPost1200×6271.91:1cover
YouTubeThumbnail1280×72016:9cover
DiscordAvatar800×8001:1contain
FaviconBrowser tab32×321:1contain
Apple TouchiOS home180×1801:1contain
OG ImageGeneral1200×6301.91:1cover

Additional Resources

Shared Image References (reusable across all image skills)

Skill-Specific References

Important Notes

  • Execution: All scripts run with uv run --with Pillow python3 {script} — no virtual environment needed
  • SVG input requires cairosvg package: uv run --with cairosvg --with Pillow python3 {script}
  • NEVER overwrite source files — always output to new paths
  • For batch operations, generate a single script that handles all transformations (not one script per image)
  • Output file naming: {original-name}_{width}x{height}.{format} (e.g., logo_200x200.webp)
  • This skill processes existing images — it does NOT generate new images from text prompts
  • For fetching brand logos/assets before transforming, use the fetch-brand-assets skill in the brand plugin

平台分布

Codex

39.73%
按下载量换算35

Claude

29.47%
按下载量换算26

Cursor

17.49%
按下载量换算15

Gemini CLI

10.34%
按下载量换算9

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

通过

权限和风险

只读

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

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在提醒或未通过项,安装前请自行复核。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills