gpt-image-2

Generate and edit images via ChatGPT subscription through a Codex CLI workflow.

1|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/ian-pascoe/dotfiles-chezmoi --skill gpt-image-2-ian-pascoe
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gpt-image-2
Source: https://github.com/ian-pascoe/dotfiles-chezmoi/tree/main/dot_agents/skills/gpt-image-2
Command: npx skills add https://github.com/ian-pascoe/dotfiles-chezmoi --skill gpt-image-2-ian-pascoe

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires codex, python3, and includes scripts (resource) components.

What problem does it solve?

This Skill lets you generate and edit images without separate OpenAI billing, by reusing an existing ChatGPT Plus or Pro subscription through the local Codex CLI.

Core Features & Use Cases

  • Text-to-Image Generation: Turn a written prompt into a new image directly from the agent workflow.
  • Image-to-Image Editing: Restyle, remix, or improve an attached reference image while preserving the underlying composition when needed.
  • Multi-Reference Composition: Combine multiple reference images for more complex edits, style transfer, and visual mashups.
  • Reliable Delivery: Captures the generated image from the Codex session rollout and writes it to a usable PNG, JPG, or WebP output file.

Quick Start

Use the gpt-image-2 skill to generate or edit an image from this prompt and save the result to the specified output path.

Frequently Asked Questions about gpt-image-2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate images using my ChatGPT subscription without paying for separate API access?

You can generate images using your existing ChatGPT Plus or Pro subscription by running the gpt-image-2 skill through a local Codex CLI session. This bypasses separate OpenAI API billing by capturing the image payload directly from the session rollout.

Can I perform text-to-image generation and style transfer directly from the command line?

Yes, text-to-image generation and style transfer can be executed directly from the command line. The skill operates within a local Codex CLI workflow, allowing you to trigger image generation and edits using text prompts and reference files.

What do I need to set up before doing reference-based image editing with Codex CLI?

To do reference-based image editing, you need a persisted Codex session with image_generation enabled, Python3 installed, and your input reference files available. The skill extracts the generated image payload from the session to save as an output file.

Does multi-reference composition work with this local image generation approach?

Multi-reference composition is fully supported, allowing you to combine multiple reference images for complex edits and visual mashups. The skill processes these references within your ChatGPT subscription limits and writes the final output to a usable file format.

Why does my image generation workflow require a persisted Codex session?

A persisted Codex session is required because the skill captures the generated image payload directly from the session rollout. Without an active, persisted session and image_generation enabled, the workflow cannot extract and save the output image.

What image output formats are supported when saving generated images?

The skill supports saving generated images as PNG, JPG, or WebP output files. It reliably captures the image payload from the Codex session rollout and writes it to your specified output path in your chosen format.