Token导航 LogoToken导航

Agent Skill · 图像处理

ai-image-generator(AI 图像生成器)

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

ai-image-generator 是图像处理类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为接触敏感数据;许可证信息还不明确,第三方扫描已通过,按安装量在图像处理类的 1,562 个 Skill 里排第 229。

总安装 14,589周安装 614GitHub Stars 750下载 5,108核验 2026-05-01

安装说明

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

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/jezweb/claude-skills --skill ai-image-generator

这个 Skill 是做什么的

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

用于辅助图像生成、图片编辑和视觉素材处理。适合根据文本生成图片或调用相关图像工具。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。需确认输入图片、版权来源、输出格式和模型限制。涉及人物或品牌素材时,应额外核对授权和真实性。

ai-image-generator 属于图像处理类 Skill,可作为该场景下的辅助能力补充。

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

上手步骤

4 步
  1. 1

    确认自己的宿主工具

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

  2. 2

    拿到安装命令

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

  3. 3

    安装后重启宿主

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

  4. 4

    按最小权限试用

    它需要接触敏感数据,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

ai-image-generator 怎么安装?

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

ai-image-generator 支持哪些 AI 工具?

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

ai-image-generator 需要什么权限?

权限级别是接触敏感数据。该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

ai-image-generator 是免费的吗?

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

ai-image-generator 用的人多吗?

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

ai-image-generator 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

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

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 需要接触敏感数据,装到常用环境前要先评估影响面。
  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理图像处理类任务、又不想每次都手写提示词的人。

不太适合

  • 环境里有大量密钥、凭证,不方便给第三方 Skill 读取的人。
  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 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通过
ai-image-generator

AI 图像生成器 · 本页

14,589750接触敏感数据未明确通过

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

SKILL.md 原文

AI Image Generator

Generate images using AI APIs (Google Gemini and OpenAI GPT). This skill teaches the prompting patterns and API mechanics for producing professional images directly from Claude Code.

Managed alternative: If you don't want to manage API keys, ImageBot provides a managed image generation service with album templates and brand kit support.

Model Selection

Choose the right model for the job:

NeedModelWhy
Photorealistic scenes / stock photosGemini 3.1 Flash ImageBest depth, complexity, environmental context
Final client scenes (higher detail)Gemini 3 Pro ImageHigher detail, better style consistency
Text on images (posters, OG with copy, infographics)GPT Image 2Text rendering actually works — including multi-script
10-variation style explorationGPT Image 2Native batch — one prompt, 10 variants sharing composition + palette
Multi-reference compositing (product + lifestyle)GPT Image 2Handles lighting, scale, perspective across references
Transparent icons / logosGPT Image 1.5Native RGBA alpha — GPT Image 2 cannot do transparency
Quick drafts / iterationGemini 2.5 Flash ImageFree tier (~500/day)

Rule of thumb: any image with readable text → GPT Image 2 (unless you need transparency, then GPT 1.5). Otherwise → Gemini.

Model IDs

ModelAPI IDProvider
Gemini 3.1 Flash Imagegemini-3.1-flash-image-previewGoogle AI
Gemini 3 Pro Imagegemini-3-pro-image-previewGoogle AI
Gemini 2.5 Flash Imagegemini-2.5-flash-imageGoogle AI
GPT Image 2 (default)gpt-image-2OpenAI
GPT Image 2 (ChatGPT-parity output)chatgpt-image-latestOpenAI
GPT Image 1.5 (transparency-only)gpt-image-1.5OpenAI

Verify model IDs before use — they change frequently:

curl -s "https://generativelanguage.googleapis.com/v1beta/models?key=$GEMINI_API_KEY" | python3 -c "import sys,json; [print(m['name']) for m in json.load(sys.stdin)['models'] if 'image' in m['name'].lower()]"

GPT Image 2 Specifics

Released 2026-04-22. Three capabilities that change when you'd reach for it.

1. Text rendering actually works

Posters, OG images with headlines, infographics with labels, UI mockups, pricing cards. Text is rendered reliably, including non-Latin scripts (Japanese, Korean, Hindi, Bengali). Primary reason to switch from Gemini — Gemini doesn't render readable text at all.

2. Multi-variation batching

One prompt, up to 10 images in a single call. Variants share composition and palette but differ in detail. Good for style exploration before committing, A/B options for a client, rapid ideation.

3. Multi-reference compositing

Feed reference images alongside your prompt — product shots, lifestyle scenes, logos. The model places the product into the scene with correct lighting, scale, perspective. Enables "product in context" workflows without multi-turn editing.

Modes

  • Instant (default, all plans) — generates without a planning pass. Fast, good enough for most cases.
  • Thinking (Plus/Pro/Business plans) — plans layout before drawing. Use when element counts matter ("3 icons in a row", "5 feature bullets") or text must land in specific regions. Fewer re-rolls on complex compositions.

Aspect ratios

3:1 ultra-wide through 1:3 ultra-tall, plus 1:1, 3:2, 2:3, 16:9, 9:16. Wider range than other models — useful for website banners (ultra-wide hero) or mobile story formats (ultra-tall).

Resolution

Up to 2K on the long edge standard. 4K in beta.

Generation time

Up to 2 minutes on complex prompts. Build async UX — don't block on the response. Show progress or spin off and poll.

Constraints

  • No transparent backgrounds. Fall back to gpt-image-1.5 when you need PNG transparency.
  • API Org Verification may be required before the endpoint fires — enable in your OpenAI account settings if you hit auth errors on first call.

Pricing (per 1024×1024 image)

QualityCost
Low$0.006
Medium$0.053
High$0.211

Token pricing: $5/M text in, $10/M text out, $8/M image in, $30/M image out.

The 5-Part Prompting Framework

Build prompts in this order for consistent results:

1. Image Type

Set the genre: "A photorealistic photograph", "An isometric illustration", "A flat vector icon"

2. Subject

Who or what, with specific details: "of a warm, approachable Australian woman in her early 30s, smiling naturally"

3. Environment

Setting and spatial relationships: "in a bright modern home with terracotta decor on wooden shelves behind her"

4. Technical Specs

Camera and lighting: "Shot at 85mm f/2.0, natural window light, head and shoulders framing"

5. Constraints

What to exclude: "Photorealistic, no text, no watermarks, no logos"

Example (Good vs Bad)

BAD — keyword soup:
"professional woman, spa, warm lighting, high quality, 4K"

GOOD — narrative direction:
"A professional skin treatment scene in a warm clinical setting.
A practitioner wearing blue medical gloves uses a microneedling pen
on the client's forehead. The client lies on a white treatment bed,
eyes closed, relaxed. Warm golden-hour light from a window to the
left. Terracotta-toned wall visible in the background. Shot at
85mm f/2.0, shallow depth of field. No text, no watermarks."

Workflow

1. Determine Image Need

PurposeAspect RatioModel
Hero banner (no text)16:9 or 21:9Gemini
Hero banner with headline copy16:9 or 3:1 ultra-wideGPT Image 2
Service card4:3 or 3:4Gemini
Profile / avatar1:1Gemini
Icon / badge (transparent)1:1GPT Image 1.5
OG / social share (no text)1.91:1Gemini
OG / social share with copy1.91:1GPT Image 2
Poster / infographic / pricing card / any typography-heavyvariesGPT Image 2
Style exploration (10 variants of one concept)anyGPT Image 2 (batch)
Instagram post1:1 or 4:5Gemini
Mobile hero9:16Gemini

2. Build the Prompt

Use the 5-part framework. Refer to references/prompting-guide.md for detailed photography parameters.

3. Generate via API

Gemini (Python — handles shell escaping correctly)
python3 << 'PYEOF'
import json, base64, urllib.request, os, sys

GEMINI_API_KEY = os.environ.get("GEMINI_API_KEY")
if not GEMINI_API_KEY:
    print("Set GEMINI_API_KEY environment variable"); sys.exit(1)

model = "gemini-3.1-flash-image-preview"
url = f"https://generativelanguage.googleapis.com/v1beta/models/{model}:generateContent?key={GEMINI_API_KEY}"

prompt = """A professional photograph of a modern co-working space in
Newcastle, Australia. Natural light floods through floor-to-ceiling
windows. Three people collaborate at a standing desk — one pointing
at a laptop screen. Exposed brick wall, potted fiddle-leaf fig,
coffee cups on the desk. Shot at 35mm f/4.0, environmental portrait
style. No text, no watermarks, no logos."""

payload = json.dumps({
    "contents": [{"parts": [{"text": prompt}]}],
    "generationConfig": {
        "responseModalities": ["TEXT", "IMAGE"],
        "temperature": 0.8
    }
}).encode()

req = urllib.request.Request(url, data=payload, headers={
    "Content-Type": "application/json",
    "User-Agent": "ImageGen/1.0"
})

resp = urllib.request.urlopen(req, timeout=120)
result = json.loads(resp.read())

# Extract image from response
for part in result["candidates"][0]["content"]["parts"]:
    if "inlineData" in part:
        img_data = base64.b64decode(part["inlineData"]["data"])
        output_path = "hero-image.png"
        with open(output_path, "wb") as f:
            f.write(img_data)
        print(f"Saved: {output_path} ({len(img_data):,} bytes)")
        break
PYEOF
GPT Image 1.5 — Transparent Icons

Use gpt-image-1.5 specifically for the transparent PNG case. GPT Image 2 cannot do transparency.

python3 << 'PYEOF'
import json, base64, urllib.request, os, sys

OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
if not OPENAI_API_KEY:
    print("Set OPENAI_API_KEY environment variable"); sys.exit(1)

url = "https://api.openai.com/v1/images/generations"

payload = json.dumps({
    "model": "gpt-image-1.5",
    "prompt": "A minimal, clean plumbing wrench icon. Flat design, single consistent stroke weight, modern style. On a transparent background.",
    "n": 1,
    "size": "1024x1024",
    "background": "transparent",
    "output_format": "png"
}).encode()

req = urllib.request.Request(url, data=payload, headers={
    "Content-Type": "application/json",
    "Authorization": f"Bearer {OPENAI_API_KEY}"
})

resp = urllib.request.urlopen(req, timeout=120)
result = json.loads(resp.read())

img_data = base64.b64decode(result["data"][0]["b64_json"])
with open("icon-wrench.png", "wb") as f:
    f.write(img_data)
print(f"Saved: icon-wrench.png ({len(img_data):,} bytes)")
PYEOF
GPT Image 2 — Text-heavy or Batch Variations

Use gpt-image-2 when text has to render readably, or when you want 10 variants in one call. No transparency — if you need transparent bg, use 1.5 above.

python3 << 'PYEOF'
import json, base64, urllib.request, os, sys, pathlib

OPENAI_API_KEY = os.environ.get("OPENAI_API_KEY")
if not OPENAI_API_KEY:
    print("Set OPENAI_API_KEY environment variable"); sys.exit(1)

url = "https://api.openai.com/v1/images/generations"

# 10-variation batch of a pricing card with rendered text
payload = json.dumps({
    "model": "gpt-image-2",
    "prompt": (
        "A modern pricing card for a web hosting plan. "
        "Headline 'Starter' in bold sans-serif. "
        "Price '$29/month' directly below in large type. "
        "Three feature lines: 'Unlimited bandwidth', 'SSD storage', 'Free SSL'. "
        "Clean flat design, soft drop shadow, deep blue accent colour. "
        "White card on light grey background."
    ),
    "n": 10,
    "size": "1024x1024",
    "quality": "medium",
    "output_format": "png"
}).encode()

req = urllib.request.Request(url, data=payload, headers={
    "Content-Type": "application/json",
    "Authorization": f"Bearer {OPENAI_API_KEY}"
})

# Timeout: up to 2 min for complex prompts
resp = urllib.request.urlopen(req, timeout=180)
result = json.loads(resp.read())

pathlib.Path("variations").mkdir(exist_ok=True)
for i, item in enumerate(result["data"], 1):
    img_data = base64.b64decode(item["b64_json"])
    path = f"variations/pricing-card-{i:02d}.png"
    with open(path, "wb") as f:
        f.write(img_data)
    print(f"Saved: {path} ({len(img_data):,} bytes)")

print(f"\nGenerated {len(result['data'])} variants. Pick the best; delete the rest.")
PYEOF

Batch workflow: generate 10 → review them side-by-side → pick 1-2 → optionally regenerate with tighter prompt on the winning direction. Faster than single-shot + iterate.

4. Save and Optimise

Save generated images to .jez/artifacts/ or the user's specified path.

Post-processing (optional):

# Convert to WebP for web use
python3 -c "
from PIL import Image
img = Image.open('hero-image.png')
img.save('hero-image.webp', 'WEBP', quality=85)
print(f'WebP: {img.size[0]}x{img.size[1]}')
"

# Trim whitespace from transparent icons
python3 -c "
from PIL import Image
img = Image.open('icon.png')
trimmed = img.crop(img.getbbox())
trimmed.save('icon-trimmed.png')
"

5. Quality Check (Optional)

Send the generated image back to a vision model for QA:

# Send to Gemini Flash for critique
critique_prompt = """Review this image for:
1. AI artifacts (extra fingers, floating objects, text errors)
2. Technical accuracy (wrong equipment, unsafe positioning)
3. Composition issues (awkward cropping, cluttered background)
4. Style consistency with a professional stock photo

List any issues found, or say 'PASS' if the image is production-ready."""

If issues are found, append them as negative guidance to the original prompt and regenerate.

Multi-Turn Editing

Gemini supports editing a generated image across conversation turns. The key requirement: preserve thought signatures from model responses.

# Turn 1: Generate base image
contents = [{"role": "user", "parts": [{"text": "Scene prompt..."}]}]

# The response includes thoughtSignature on parts — preserve them ALL

# Turn 2: Edit the image
contents = [
    {"role": "user", "parts": [{"text": "Original prompt"}]},
    {"role": "model", "parts": response_parts_with_signatures},  # Keep intact
    {"role": "user", "parts": [{"text": "Edit: change the wall colour to blue. Keep everything else exactly the same."}]}
]

Edit prompt pattern: Always specify what to KEEP unchanged, not just what to change. The model treats unlisted elements as free to modify.

GOOD: "Edit this image: keep the people, desk, and window unchanged.
Only change: wall colour from terracotta to ocean blue."

BAD: "Now make the wall blue."
(Model may change everything else too)

API Key Setup

ProviderGet key atEnv variable
Google Geminiaistudio.google.comGEMINI_API_KEY
OpenAIplatform.openai.comOPENAI_API_KEY
export GEMINI_API_KEY="your-key-here"
export OPENAI_API_KEY="your-key-here"

Common Mistakes

MistakeFix
Using curl for Gemini promptsUse Python — shell escaping breaks on apostrophes
"Beautiful, professional, high quality"Use concrete specs: "85mm f/1.8, golden hour light"
Not specifying what to excludeAlways end with "No text, no watermarks, no logos"
Requesting transparent PNG from GeminiGemini cannot do transparency — use GPT Image 1.5 with background: "transparent"
Requesting transparent PNG from GPT Image 2GPT Image 2 cannot do transparency — fall back to gpt-image-1.5 for this case only
Using GPT Image 1.5 for text on imagesGPT Image 1.5 text rendering is unreliable — use gpt-image-2 for any readable text
Blocking a request to GPT Image 2Generation can take up to 2 min on complex prompts — use 180s timeout, build async UX
American defaults for AU businessesExplicitly specify "Australian" + local architecture, vegetation
Generic data for model IDVerify current model IDs — they change frequently

平台分布

Codex

36.34%
按下载量换算1,856

Claude

29.79%
按下载量换算1,522

Cursor

19.5%
按下载量换算996

Gemini CLI

9.1%
按下载量换算465

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

接触敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

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

继续浏览同类 Skills