gpt-image-2-combined

gpt-image-2-combined

Enables generating images from text prompts using OpenAI's GPT-Image-2 model within Claude Code and Codex conversations.

Category
Visit Server

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:


Requirements


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/.env for 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-science in 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

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.

Official
Featured
TypeScript
Magic Component Platform (MCP)

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.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

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.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

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.

Official
Featured
TypeScript
Kagi MCP Server

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.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

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.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured