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
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.