RG

robonuggets/gpt-image-2-skill

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

74 stars 质量 41 趋势 14

GPT 图片2(ChatGPT Images 2.0)技能,适用于Claude代码——同类最佳排版,双端点(T2I + 编辑),Fal AI集成,结构化JSON提示模式

概览

通过Fal AI生成或编辑OpenAI的GPT Image 2——精细排版领域的佼佼者。 一个Claude Code技能,可以将GPT图片2(ChatGPT Images 2.0)连接到你的代理,只需一个直接插入文件。两个端点:文本转图像和图像编辑(可选遮罩)。同步API,无轮询,单次发布。 GPT 图片2目前是 的最佳公开模型。当图片是排版时可以使用它: - 黑板、商店招牌、手写海报 - 菜单板、包装样板、杂志封面 - 界面截图/应用商店模型 - 社交卡、横幅、多语言设计 如果是写实肖像或严格保留风格,可以用其他型号(Nano Banana、Flux)。对于文字量大,这款更胜一筹。 把 SKILL.md 文件复制到你的Claude Code项目的.claude/skills/gpt-image-2/目录。 该技能包含一个结合Node、Python和bash的辅助工具——image_urls用于编辑端点,文本转图像时省略。 - — 单个POST返回图片URL。

概述(AI 翻译)

通过Fal AI使用OpenAI的GPT Image 2生成或编辑图像——该平台是精细排版领域的佼佼者。

一个Claude Code技能,可以将GPT图片2(ChatGPT Images 2.0)连接到你的代理,只需一个直接插入文件。两个端点:文本转图像和图像编辑(可选遮罩)。同步API,无轮询,单次发布。

为什么选择这个型号

GPT 图片2目前是图像内部可读文本的最佳公开模型。当图片是排版时使用它:

  • 黑板、商店招牌、手写海报
  • 菜单板、包装样图、杂志封面
  • 界面截图/应用商店模型
  • 社交卡、横幅、多语言设计

如果是写实肖像或严格保留风格,可以用其他型号(Nano Banana、Flux)。对于文字量大,这款更胜一筹。

快速启动

1.安装技能

将SKILL.md文件复制到你的Claude Code项目的.claude/skills/gpt-image-2/目录中。

2.添加你的Fal AI密钥

去 fal.ai/dashboard/keys 拿钥匙。

3.生成

告诉克劳德密码:

或者补充一下:

两个终点

端点 当 所需输入
openai/gpt-image-2 从提示词生成 prompt

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

GPT Image 2 Skill

Generate or edit images with OpenAI’s GPT Image 2 — best-in-class for fine typography — via Fal AI.

A Claude Code skill that wires GPT Image 2 (ChatGPT Images 2.0) into your agent in one drop-in file. Two endpoints: text-to-image AND image edit (with optional masks). Sync API, no polling, single POST.

Why this model

GPT Image 2 is currently the best public model for legible text inside images. Use it when the picture is the typography:

  • Chalkboards, store signs, hand-lettered posters
  • Menu boards, packaging mockups, magazine covers
  • UI screenshot / app store mockups
  • Social cards, banners, multilingual designs

For photoreal portraits or strict style preservation, use a different model (Nano Banana, Flux). For everything text-heavy, this wins.

Quick Start

1. Install the skill

Copy the SKILL.md file to your Claude Code project’s .claude/skills/gpt-image-2/ directory.

2. Add your Fal AI key

echo "FAL_KEY=your-fal-ai-key" >> .env

Get a key at fal.ai/dashboard/keys.

3. Generate

Tell Claude Code:

Generate a vintage diner chalkboard reading "TODAY SPECIAL — Lobster Roll $24"

Or for an edit:

Edit https://example.com/photo.png — same scene but everyone is on their phones now

Two endpoints

Endpoint When Required input
openai/gpt-image-2 Generate from a prompt prompt
openai/gpt-image-2/edit Modify an existing image prompt + image_urls (+ optional mask_url)

The skill ships with one combined helper in Node, Python, and bash — pass image_urls to use the edit endpoint, omit for text-to-image.

What You Get

  • Sync API — single POST returns the image URL. No polling, no taskId.
  • Up to 4 images per call for picking from variants.
  • Custom dimensions up to 3840×2160 (aspect ratio ≤ 3:1, multiples of 16).
  • Image edit with optional masks for surgical region edits.
  • Combined helper in Node, Python, and bash — same shape across languages.

Defaults

Param Default Why
quality medium Best cost/quality sweet spot (~$0.05/image). High is ~3.5x more — reserve for finals where typography really matters.
image_size landscape_4_3 (T2I) / auto (Edit) Sensible defaults, override per call.
num_images 1 Bump to 4 for variants.
output_format png

Prompting patterns

The community has converged on two patterns the skill documents:

  1. Structured JSON prompts for multi-element scenes (posters, infographics, comics, app mockups). Pass the prompt as a JSON object with explicit slots (type, subject, style, background, header, layout). Notably better than prose for complex layouts.
  2. Raycast-style placeholders — {argument name="quote" default="Stay hungry, stay foolish"} — for parameterizable prompt templates.
在 GitHub 查看完整 README

推荐工具

换一个关键词,或者移除筛选条件。

安装

npx skillfish add robonuggets/gpt-image-2-skill
新手?先看 mcpskill.org 教程 →