Gpt Image logo

Gpt Image

Community
Yuki001
gpt-image

Execute image generation, editing, and chroma-key transparent-background workflows with GPT Image 2 / gpt-image-2 through the bundled scripts. Use when GPT Image is the selected backend and a supplied prompt or edit instruction must be executed for text-to-image generation, reference-image editing, multi-reference editing, masked inpainting, or chroma-key background removal. Treat the supplied prompt as authoritative; this skill does not search prompt galleries, choose art direction, or perform general prompt planning.

Overview

PublisherYuki001
Repositorygame-dev-skills
Skill namegpt-image
Stars
104
Forks
13
Bundled files
5
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Yuki001 on GitHub. Read the source before you install it.

Installation

Install the Gpt Image AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/Yuki001/game-dev-skills/tree/main/skills/gpt-image
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Yuki001/game-dev-skills.git /tmp/game-dev-skills
mkdir -p .claude/skills
cp -r /tmp/game-dev-skills/skills/gpt-image .claude/skills/gpt-image
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Gpt Image in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Gpt Image on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Gpt Image is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

GPT Image Executor

Execution-only runbook for GPT Image generation and editing. Use the packaged CLI; do not reimplement image API code.

Responsibility boundary

  • Accept the prompt or edit instruction produced by the user or an upstream workflow.
  • Do not browse prompt examples, invent an art direction, compare creative concepts, or rewrite the prompt semantically.
  • Apply only backend-required formatting and parameter mapping. If a required execution input is missing or contradictory, ask one concise question.
  • Generate or edit images only through this skill's packaged CLI.
  • Do not create a new SDK wrapper or ad-hoc generation script unless the user explicitly asks to modify this repository.

Operating loop

  1. Classify operation: generate, edit, inpaint, multi-reference, or chroma-key background removal.
  2. Preflight without mutation: verify the CLI, Python 3.11+, required packages, input files, output destination, and credential availability.
  3. Map execution parameters: pass the supplied prompt unchanged in meaning; select endpoint flags, size, quality, count, format, and output path from explicit requirements or conservative defaults.
  4. Execute via CLI: call the packaged command directly.
  5. Report: return output path(s), material flags or defaults, and actionable API errors.

Requirements

  • Python 3.11+ with openai>=1.55.
  • Pillow for chroma-key background removal only.
  • OPENAI_API_KEY for the default OpenAI endpoint. Calls may incur API charges.
  • Do not reinstall dependencies, overwrite skill folders, create or modify .env, or write API keys unless the user explicitly requests setup.

CLI

bash
python "$SKILL_DIR/scripts/src/gpt_image_cli/cli.py" -p "PROMPT" [-f OUT] [-i REF...] [-m MASK] [options]

Key and cost rules

  • The CLI reads OPENAI_API_KEY from process env, then .env, then ~/.env, without overriding an existing environment value.
  • Set OPENAI_BASE_URL in the environment to use a compatible endpoint. The OpenAI API is the default.
  • If the host has platform-managed image generation and that is the selected backend, use the host capability instead of this CLI.
  • If OPENAI_API_KEY is unset, report it; do not write or print secrets.
  • Respect a user's request to avoid local-key use. Do not work around their credential choice.

Flags

FlagValuesUse
-p, --promptstringRequired prompt or edit instruction
-f, --filepathOutput path; auto-named if omitted
-i, --imagerepeatable pathUse edits endpoint; supports multiple references
-m, --maskPNG pathInpaint with alpha mask; requires -i
--modeldefault gpt-image-2Image model
--size1k, 2k, 4k, portrait, landscape, square, wide, tall, or literalCanvas size
--qualitylow, medium, high, autoCost and quality
-n, --nintegerNumber of images
--backgroundauto, opaqueBackground behavior; use opaque for chroma-key removal
--remove-backgroundflagAfter the API response, run the bundled chroma-key remover on every output and replace each keyed PNG/WebP with its alpha result
--moderationauto, lowGeneration moderation setting
--input-fidelitylow, highEdit fidelity; dropped for gpt-image-2, which rejects it
--formatpng, jpeg, webpOutput encoding
--compression0-100JPEG or WebP compression
--userstringOptional end-user identifier

Quality policy:

  • low: cheap drafts, broad exploration, many variants.
  • medium: normal exploration, style probing, balanced cost.
  • high: final assets, Chinese text, posters, diagrams, UI, paper figures, dense labels.

Size policy:

  • default or social square: 1k / 1024x1024
  • poster, mobile, or beauty: portrait
  • landscape, gameplay, or photo: landscape
  • print or paper figure: 2k
  • widescreen hero: 4k
  • vertical story or banner: tall

Timeout policy:

  • 1k, portrait, landscape, or square: 180000 ms (3 minutes)
  • 2k, 4k, or multi-image batches (-n > 1): 360000 ms (6 minutes)

Endpoint routing

ModeTriggerEndpoint
Text-to-imageno -i/v1/images/generations
Reference editone or more -i/v1/images/edits
Inpaint-i + -m/v1/images/edits with mask

Surface enough of API errors for debugging. Exit codes are 0 for success, 1 for API error or refusal, and 2 for invalid arguments or a missing key.

Transparent-background workflow

Use chroma-key removal for transparent assets. The only supported path is --background opaque --remove-background.

Default sequence:

  1. Choose a key color unlikely to appear in the subject: default #00ff00, use #ff00ff for green subjects, and avoid #0000ff for blue subjects.
  2. Append only the following execution constraints to the supplied prompt, replacing the key color when needed:
text
Create the requested subject on a perfectly flat solid #00ff00 chroma-key background for background removal.
The background must be one uniform color with no shadows, gradients, texture, reflections, floor plane, or lighting variation.
Keep the subject fully separated from the background with crisp edges and generous padding.
Do not use #00ff00 anywhere in the subject.
No cast shadow, no contact shadow, no reflection, no watermark, and no text unless explicitly requested.
  1. Generate a PNG with --background opaque --remove-background. The CLI flag does not modify the prompt or decide whether chroma-key removal is appropriate; it only applies the bundled post-processor after generation. Continue to use the normal skill judgment above to decide when to pass it.
  2. The flag invokes the bundled helper with the system workflow's calibrated defaults, equivalent to:
bash
python "$SKILL_DIR/scripts/remove_chroma_key.py" \
  --input generated.png \
  --out transparent.png \
  --auto-key border \
  --soft-matte \
  --transparent-threshold 12 \
  --opaque-threshold 220 \
  --despill

Use the helper command directly only when post-processing an image that already exists. For a new CLI generation, prefer --remove-background so generation and post-processing share one command. The flag supports batches and processes every returned image. It requires Pillow and a final .png or .webp output; it preserves the keyed source at the requested path if post-processing fails.

  1. Verify an alpha channel exists, the corners are transparent, subject coverage is plausible, interior detail remains intact, and no obvious key-color fringe is present.
  2. If a thin fringe remains, retry once with --edge-contract 1. Use --edge-feather 0.25 only when the edge is visibly stair-stepped and the subject is not shiny or reflective.

Write the final output as .png or .webp to preserve alpha. Never overwrite an existing output unless explicitly requested; use --force only with authorization. If the matte removes subject details or the subject contains the key color, regenerate with a contrasting key color instead of increasing tolerance aggressively.

Chroma-key removal is unsuitable for hair, fur, feathers, smoke, glass, liquids, translucent materials, reflective objects, soft shadows, realistic product grounding, or subjects that conflict with every practical key color. If the chroma-key result fails validation or the subject is unsuitable, report the limitation instead of switching models or inventing another transparency path.

remove_chroma_key.py options

OptionMeaning
--input PATHRequired source image
--out PATHRequired .png or .webp alpha output
--key-color HEXExact key color; default #00ff00
--auto-key none|corners|borderSample the key color instead; prefer border for generated images
--tolerance 0..255Hard-key distance; default 12
--soft-matte + --transparent-threshold / --opaque-thresholdEnable a smooth alpha ramp; defaults 12 / 96, while this workflow uses 12 / 220
--despill, --spill-cleanupEquivalent flags that reduce key-color edge spill
--edge-contract 0..16, --edge-feather 0..64Shrink or soften the alpha edge
--forceOverwrite an existing output

API reference

Read references/openai-cookbook.md only when API behavior, supported parameters, or model semantics are uncertain. Do not use it to expand or rewrite the supplied prompt.

Verification

  • Before calling the API, confirm endpoint mode, size, quality, output path, and required reference or mask files.
  • For edits and inpainting, verify every -i path and any -m path exist.
  • After the CLI call, report the paths printed by the CLI and surface stderr on failure.
  • For transparent outputs, follow the alpha, corner, coverage, interior-detail, and fringe checks in the transparent-background workflow.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Gpt Image AI skill do?

Execute image generation, editing, and chroma-key transparent-background workflows with GPT Image 2 / gpt-image-2 through the bundled scripts. Use when GPT Image is the selected backend and a supplied prompt or edit instruction must be executed for text-to-image generation, reference-image editing, multi-reference editing, masked inpainting, or chroma-key background removal. Treat the supplied prompt as authoritative; this skill does not search prompt galleries, choose art direction, or perform general prompt planning.

Why use Gpt Image on TypingMind?

Because you install it once and use it with any model. Gpt Image is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Gpt Image in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Yuki001/game-dev-skills/tree/main/skills/gpt-image. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Gpt Image?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Gpt Image?

As many as you like. As long as a model supports skills, you can use Gpt Image with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Gpt Image AI skill free?

It is published on GitHub by Yuki001. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇