Token导航 LogoToken导航TokenDH.com
图像处理需要联网github未标认证来源可访问许可证需确认审计通过

gpt-image-2GPT Image 2 图像生成

Agent Skill

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

总安装

188

周安装

8

GitHub Stars

141

下载量

66
CodexClaudeCursorGemini CLI

安装说明

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

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

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

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

命令行安装

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

skills.shnpx skills
npx skills add https://github.com/glebis/claude-skills --skill gpt-image-2

简介

gpt-image-2 用于辅助图像生成、图片编辑和视觉素材处理,适合调用图像模型工作流。

  • 适用于根据文本生成图片、处理背景或整理视觉提示词的场景。
  • 使用时需确认输入图片、版权来源和输出格式,避免涉及未授权内容。
  • 建议核对人物、品牌或商品素材的授权与合规边界后再使用。
  • 安装前应评估是否会触发联网或文件读写,确保符合安全策略。

SKILL.md

GPT Image 2 — Interactive Image Generation

Generate and edit images via OpenAI's GPT Image 2 API with an interactive, guided workflow.

Interactive Flow

When the user invokes this skill, guide them through these steps using AskUserQuestion. Do not skip steps — the interactive flow is the core experience.

Step 1: What are we making?

Ask the user what they want to create. Offer these options:

  • Single image — one image from a text prompt
  • Photo edit — transform an existing photo into a style
  • Carousel — 5-10 cohesive slides for LinkedIn/Instagram
  • Variants — multiple versions of the same concept
  • Quick generate — skip questions, just run the prompt

If the user already provided a clear prompt (e.g. "generate an editorial image of a rocket"), skip to Step 3.

Step 2: Style selection

Show the user available presets grouped by category. Read presets.yaml and present them:

Visual styles (no text in image): editorial, blueprint, ink, risograph, wireframe, constellation, brutalist, grain

Text-heavy (leverages GPT Image 2 text rendering): infographic, slide, diagram, poster, menu, manga

Community favorites: trading-card, pixar, app-mockup, isometric, action-figure, cinematic, panorama

Custom — user describes their own style

Ask: "Which style? Or describe your own."

Step 3: Platform & sizing

Ask where this will be used:

  • YouTube thumbnail (1280×720)
  • Instagram square (1080×1080)
  • Slides/presentation (1920×1080)
  • Blog hero (1200×630)
  • X/Twitter (1600×900)
  • Story (1080×1920)
  • Custom size
  • No resize (use API default)

Step 4: Draft first, then final

Always generate a draft first unless the user says "skip draft" or uses --draft false.

  1. Generate with --draft (quality=low, ~$0.006/image)
  2. Show the image to the user using the Read tool
  3. Ask: "Like this direction? I can: (a) generate final quality, (b) adjust the prompt, (c) try a different style, (d) regenerate with a new seed"
  4. If approved, generate final with --quality high (~$0.21/image)
  5. Use --seed from the draft to maintain composition when upgrading to final

This draft→final flow saves ~97% on iteration costs.

Step 5: Show result and offer next actions

After generation, always:

  1. Show the image using the Read tool
  2. Open it with open <path> for full-resolution preview
  3. Report the cost
  4. Offer: "Want to (a) generate variants, (b) edit this further, (c) use as reference for more images, (d) done?"

Carousel Workflow

When the user wants a carousel (5-10 slides):

1. Story arc

Ask: "What's the story? Give me the key message and I'll draft a 10-slide arc."

Then propose a slide-by-slide plan like:

Slide 1: [Cover] — hook headline + hero image
Slide 2: [Problem] — bold statement
Slide 3: [Context] — illustration + explanation
...
Slide 10: [CTA] — call to action with URL

Ask the user to approve or modify the plan.

2. Style consistency

Use the same preset + seed range across all slides. For carousels:

  • Pick one visual style for all slides
  • Use --seed to lock composition patterns
  • Include pagination dots in prompts (e.g., "10 small dots at bottom, third dot highlighted orange")
  • Maintain consistent color palette and typography

3. Draft batch

Generate all slides as drafts first ($0.006 × 10 = $0.06 total). Show them all to the user as a contact sheet or one by one. Ask which ones to regenerate or adjust.

4. Final batch

Only generate finals for approved slides. Offer to generate all at once with -y flag.

Photo Edit Workflow

When the user wants to transform a photo:

  1. Ask for the source image (file path or clipboard)
  2. For clipboard: save with osascript to a temp file
  3. Show available styles and ask which to try
  4. Generate a draft edit first
  5. Show result, ask if they want adjustments
  6. Generate final when approved

Use --edit <path> for the API call.

Cost Awareness

Always communicate costs before generating:

QualityPer image10-slide carousel
--draft (low)$0.006$0.06
medium$0.05$0.50
high (default)$0.21$2.10
high + thinking$0.25-0.42$2.50-4.20

Thinking mode adds 20-100% cost. Only suggest it for text-heavy or complex compositions.

The script auto-confirms when cost < $0.50. Above that, it prompts the user.

Prompt Engineering Tips

When helping users write prompts, apply these patterns:

  1. Structure: Scene → Subject → Detail → Lighting → Constraint
  2. Front-load the subject: put the main thing first
  3. For text in images: quote exact text with single quotes: 'with the headline "Hello World"'
  4. Character consistency: maintain a 5-tuple: age + appearance + hairstyle + distinctive features + clothing
  5. Style tags at end: append tags like editorial-magazine, studio-product to converge batches
  6. Use --seed for iteration: lock composition, vary only the prompt details

CLI Reference

# Basic generation
scripts/gpt_image_2.py "prompt" output.png

# With preset and platform
scripts/gpt_image_2.py --preset editorial --platform square "subject" out.png

# Draft mode (~$0.006/image)
scripts/gpt_image_2.py --draft "prompt" out.png

# With thinking for complex layouts
scripts/gpt_image_2.py --thinking medium --preset diagram "OAuth flow" out.png

# Seed for reproducibility
scripts/gpt_image_2.py --seed 42 "prompt" out.png

# Edit existing photo
scripts/gpt_image_2.py --edit photo.png "transform into constellation style" out.png

# Variants with contact sheet
scripts/gpt_image_2.py --n 4 --preset ink "mountain" out.png

# Cost estimate
scripts/gpt_image_2.py --estimate --n 10 --quality high "batch test"

# Skip confirmation
scripts/gpt_image_2.py -y --n 10 "batch" out.png

# Dry run (show prompt without API call)
scripts/gpt_image_2.py --dry-run --preset editorial "test" out.png

Files

  • scripts/gpt_image_2.py — main CLI (Python, requires PyYAML)
  • presets.yaml — 21 style presets (visual + text-heavy + community)
  • platforms.yaml — 8 platform sizing presets
  • references/api_reference.md — full API documentation
  • ~/.config/gpt-image-2/config.yaml — user defaults
  • ~/.config/gpt-image-2/history.jsonl — generation log
  • ~/.config/gpt-image-2/last.json — last run (for again)

适合场景

01

用户想查找某类 Agent Skill 时

02

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

03

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

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

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

能力 4

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

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

平台分布

Codex

39.09%
按下载量换算26

Claude

30.28%
按下载量换算20

Cursor

17.11%
按下载量换算11

Gemini CLI

9.35%
按下载量换算6

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

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

来源信息

继续浏览同类 Skills