gpt-image-2-combined
Enables generating images from text prompts using OpenAI's GPT-Image-2 model within Claude Code and Codex conversations.
README
gpt-image-2-skill
GPT-Image-2 prompt skill + MCP server for Claude Code and Codex.
Describe your intent → get a production-ready prompt → generate the image, all in one conversation.
Synthesized from three community repos:
- YouMind-OpenLab/awesome-gpt-image-2 — 2000+ curated prompts
- ZeroLu/awesome-gpt-image — top creator picks from X/Twitter
- freestylefly/awesome-gpt-image-2 — 470+ reverse-engineered cases, 20+ industrial templates
Requirements
- Node.js ≥ 18
- Claude Code (CLI or desktop)
- OpenAI API key with Images API access
Installation
Step 1 — Run the installer
npx gpt-image-2-combined install
This one command will:
- Copy the Skill to
~/.claude/skills/gpt-image-2-combined/ - Register the MCP server in
~/.claude.json - Create
~/.gpt-image-2/.envfor your API key
Step 2 — Add your OpenAI API key
Open ~/.gpt-image-2/.env and fill in your key:
# ~/.gpt-image-2/.env
OPENAI_API_KEY=sk-...
Don't have a key? Get one at platform.openai.com/api-keys.
Step 3 — Restart Claude Code
The Skill and MCP server load on startup. Restart once after installation.
That's it. Verify the Skill is available by typing /gpt-image-2-combined in Claude Code.
Usage
Full flow (prompt → image in one conversation)
1. Invoke the Skill to craft a prompt
/gpt-image-2-combined 幫我做一張章魚的 Apple keynote 風格科普海報
The Skill will:
- Detect your intent and language
- Match the best template (
poster-nature-sciencein this case) - Fill in the 6-block structure (subject, composition, style, text, format, constraints)
- Output a production-ready, copyable prompt
2. Generate the image via MCP
Once you have the prompt, ask Claude to generate it:
用這個 prompt 生成圖片
Claude calls the generate_image MCP tool, which:
- Sends the prompt to OpenAI Images API (GPT-Image-2)
- Downloads the result
- Saves it to
~/Pictures/gpt-image-2/ - Returns the local file path and CDN URL
3. Done
✅ Image generated and saved.
File : ~/Pictures/gpt-image-2/img-2025-06-19T10-30-00.png
URL : https://...
Size : 1024x1536 Quality: standard
Skill only (prompt engineering without image generation)
If you only need a well-crafted prompt to paste into ChatGPT or another tool:
/gpt-image-2-combined make a sports campaign poster for a running shoe brand
Copy the output prompt and use it anywhere.
Template categories
| Category | Templates | Examples |
|---|---|---|
| UI & Interfaces | App, Dashboard, Social Screenshot, Live Stream | ui-app-standard, ui-social-screenshot |
| Infographics | Standard, Scale Diagram | infographic-standard, infographic-scale-diagram |
| Posters & Typography | Campaign, Sports, Typography, Ink Double Exposure, Science | poster-sports-campaign, poster-nature-science |
| Products & E-commerce | Hero shot, Detail page, Packaging | product-commerce |
| Brand & Logos | Identity, Touchpoint board | brand-identity |
| Photography | Realism, RAW phone, Candid street, 360 Panorama | photo-raw-phone, photo-360-panorama |
| Illustration & Art | Anime, Watercolor, Ink, Decorative | illustration-art |
| Characters | Design sheet, 3D collectible toy | character-design-sheet |
| Scenes & Storytelling | Storyboard, Narrative, Worldbuilding | scene-storytelling |
| Games & Entertainment | Game screenshot, Pixel art grid | game-screenshot |
| History & Classical | Scroll, Dynasty, Poetry visual | history-classical |
| Documents | White paper, Manual, Report page | document-publishing |
| Special Tricks | Micro text, Screen-shot effect, JSON agent format | trick-micro-text |
MCP tool reference
The MCP server exposes one tool: generate_image.
| Parameter | Type | Default | Description |
|---|---|---|---|
prompt |
string | required | Full image-generation prompt |
size |
string | 1024x1024 |
1024x1024 / 1536x1024 / 1024x1536 |
quality |
string | standard |
standard or hd |
filename |
string | auto | Base filename without extension |
Configuration
All config lives in ~/.gpt-image-2/.env:
# Required
OPENAI_API_KEY=sk-...
# Optional — verify exact model name at platform.openai.com/docs/models
GPT_IMAGE_MODEL=gpt-image-alpha
# Optional — where generated images are saved
GPT_IMAGE_OUTPUT_DIR=/Users/you/Pictures/gpt-image-2
What's inside
gpt-image-2-skill/
├── agents/skills/gpt-image-2-combined/
│ ├── SKILL.md ← Claude Skill (prompt engine)
│ ├── agents/
│ │ ├── openai.yaml ← Codex agent spec
│ │ └── claude.yaml ← Claude agent spec
│ └── references/
│ └── combined-tricks.md ← All templates and tricks
├── mcp/
│ └── src/index.js ← MCP server (calls OpenAI API)
├── scripts/
│ ├── cli.mjs ← npx entry point
│ └── install.mjs ← install logic
├── .claude-plugin/
│ └── marketplace.json ← Claude Code marketplace registration
├── .github/workflows/
│ ├── publish.yml ← auto npm publish on git tag
│ └── test.yml ← cross-platform install test
└── .env.example ← API key template
Manual installation (alternative)
If you prefer to clone and install locally:
git clone https://github.com/albert850904/gpt-image-2-skill.git
cd gpt-image-2-skill
npm install
npm run install:skill
Releasing a new version
# bump version in package.json, then:
git tag v1.0.1 && git push --tags
GitHub Actions publishes to npm automatically on every tag push.
Credits
| Repo | Contribution |
|---|---|
| freestylefly/awesome-gpt-image-2 | Industrial templates, 6-block structure, JSON agent format, Skill architecture |
| ZeroLu/awesome-gpt-image | RAW photo tricks, game screenshot tricks, special effect prompts |
| YouMind-OpenLab/awesome-gpt-image-2 | Full category coverage, multi-language prompt examples |
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。