Official agent skill

Imagegen

by JetBrains in JetBrains/skills

A skill your agent uses when the user asks to generate or edit images via the OpenAI Image API (for example: generate image, edit/inpaint/mask, background removal or replacement, transparent…

OfficialApache-2.0Auto-check passedMedia & Creative

Install Imagegen

skills CLI
$ npx skills add JetBrains/skills --skill imagegen -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install JetBrains/skills imagegen --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/JetBrains/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/imagegen .claude/skills/imagegen && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
imagegen
GitHub stars
364
Used in
4 other repos
Token cost
~2.5k tokens
SKILL.md length
1,028 words
Files
11 (incl. scripts, references, assets)
Skills in repo
77
Repo updated
First seen
Licence
Apache-2.0

At a glance

A skill your agent uses when the user asks to generate or edit images via the OpenAI Image API (for example: generate image, edit/inpaint/mask, background removal or replacement, transparent…

  • Works in 8 steps: Decide intent: generate vs edit vs batch… → Collect inputs up front: prompt(s),… → If batch: write a temporary JSONL under… → …
  • The user asks to generate
  • SKILL.md covers When to use, Decision tree (generate vs…, Workflow and Temp and output conventions, plus 10 more sections
  • Runs Python scripts from its folder; calls uv and python3; needs OPENAI_API_KEY

What it does

Imagegen is an agent skill from JetBrains/skills, published by the product's own GitHub organization. Use when the user asks to generate or edit images via the OpenAI Image API (for example: generate image, edit/inpaint/mask, background removal or replacement, transparent background, product shots, concept art, covers, or batch variants); run the bundled CLI (scripts/imagegen.py) and require OPENAIAPIKEY for live calls.

Its SKILL.md is about 2.5k tokens, which your agent loads only when the skill is triggered. The skill folder holds 14 other files, including scripts, reference files and assets (for example `agents/openai.yaml`, `references/cli.md` and `references/codex-network.md`).

It sits in Media & Creative, covering Image generation and Image editing. It works with OpenAI. The repository describes itself as: Curated agent skills collection verified by JetBrains. The licence is Apache-2.0.

When your agent uses it

  • The user asks to generate
  • Edit images via the OpenAI Image API (for example: generate image
  • Edit/inpaint/mask
  • Background removal

Example prompts

  • “/imagegen”

Requirements

  • Python 3
  • A credential in OPENAI_API_KEY

Workflow steps

8 steps, taken from the first numbered list in SKILL.md.

  1. Decide intent: generate vs edit vs batch (see decision tree above).
  2. Collect inputs up front: prompt(s), exact text (verbatim), constraints/avoid list, and any input image(s)/mask(s). For multi-image edits…
  3. If batch: write a temporary JSONL under tmp/ (one job per line), run once, then delete the JSONL.
  4. Augment prompt into a short labeled spec (structure + constraints) without inventing new creative requirements.
  5. Run the bundled CLI (scripts/image_gen.py) with sensible defaults (see references/cli.md).
  6. For complex edits/generations, inspect outputs (open/view images) and validate: subject, style, composition, text accuracy, and…
  7. Iterate: make a single targeted change (prompt or mask), re-run, re-check.
  8. Save/return final outputs and note the final prompt + flags used.

What it can do on your machine

Read from SKILL.md and the folder at commit e0f258b. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • uv
    • python3

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Links to these hosts (documentation or services it may open):

    • platform.openai.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • OPENAI_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Imagegen loads about 2.5k tokens when it runs, and up to ~9.7k if it reads all its reference files. Until then it costs about 84 tokens; SKILL.md has 1,028 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~84
When it runs · the whole SKILL.md, loaded when a task matches
~2.5k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~9.7k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from JetBrains/skills at commit e0f258b, republished under its Apache-2.0 licence (© JetBrains). 1,028 words, ~2,501 tokens.

Download SKILL.mdSave it as .claude/skills/imagegen/SKILL.md (or your agent's skills folder). This skill also uses 10 other files; get the full folder from GitHub.
name
imagegen
description
Use when the user asks to generate or edit images via the OpenAI Image API (for example: generate image, edit/inpaint/mask, background removal or replacement, transparent background, product shots, concept art, covers, or batch variants); run the bundled CLI (`scripts/image_gen.py`) and require `OPENAI_API_KEY` for live calls.
metadata.short-description
Generate and edit images using OpenAI
metadata.author
OpenAI
metadata.source
https://github.com/openai/skills/tree/main/skills/.curated/imagegen

Image Generation Skill

Generates or edits images for the current project (e.g., website assets, game assets, UI mockups, product mockups, wireframes, logo design, photorealistic images, infographics). Defaults to gpt-image-1.5 and the OpenAI Image API, and prefers the bundled CLI for deterministic, reproducible runs.

When to use

  • Generate a new image (concept art, product shot, cover, website hero)
  • Edit an existing image (inpainting, masked edits, lighting or weather transformations, background replacement, object removal, compositing, transparent background)
  • Batch runs (many prompts, or many variants across prompts)

Decision tree (generate vs edit vs batch)

  • If the user provides an input image (or says “edit/retouch/inpaint/mask/translate/localize/change only X”) → edit
  • Else if the user needs many different prompts/assets → generate-batch
  • Else → generate

Workflow

  1. Decide intent: generate vs edit vs batch (see decision tree above).
  2. Collect inputs up front: prompt(s), exact text (verbatim), constraints/avoid list, and any input image(s)/mask(s). For multi-image edits, label each input by index and role; for edits, list invariants explicitly.
  3. If batch: write a temporary JSONL under tmp/ (one job per line), run once, then delete the JSONL.
  4. Augment prompt into a short labeled spec (structure + constraints) without inventing new creative requirements.
  5. Run the bundled CLI (scripts/image_gen.py) with sensible defaults (see references/cli.md).
  6. For complex edits/generations, inspect outputs (open/view images) and validate: subject, style, composition, text accuracy, and invariants/avoid items.
  7. Iterate: make a single targeted change (prompt or mask), re-run, re-check.
  8. Save/return final outputs and note the final prompt + flags used.

Temp and output conventions

  • Use tmp/imagegen/ for intermediate files (for example JSONL batches); delete when done.
  • Write final artifacts under output/imagegen/ when working in this repo.
  • Use --out or --out-dir to control output paths; keep filenames stable and descriptive.

Dependencies (install if missing)

Prefer uv for dependency management.

Python packages:

uv pip install openai pillow

If uv is unavailable:

python3 -m pip install openai pillow

Environment

  • OPENAI_API_KEY must be set for live API calls.

If the key is missing, give the user these steps:

  1. Create an API key in the OpenAI platform UI: https://platform.openai.com/api-keys
  2. Set OPENAI_API_KEY as an environment variable in their system.
  3. Offer to guide them through setting the environment variable for their OS/shell if needed.
  • Never ask the user to paste the full key in chat. Ask them to set it locally and confirm when ready.

If installation isn't possible in this environment, tell the user which dependency is missing and how to install it locally.

Defaults & rules

  • Use gpt-image-1.5 unless the user explicitly asks for gpt-image-1-mini or explicitly prefers a cheaper/faster model.
  • Assume the user wants a new image unless they explicitly ask for an edit.
  • Require OPENAI_API_KEY before any live API call.
  • Use the OpenAI Python SDK (openai package) for all API calls; do not use raw HTTP.
  • If the user requests edits, use client.images.edit(...) and include input images (and mask if provided).
  • Prefer the bundled CLI (scripts/image_gen.py) over writing new one-off scripts.
  • Never modify scripts/image_gen.py. If something is missing, ask the user before doing anything else.
  • If the result isn’t clearly relevant or doesn’t satisfy constraints, iterate with small targeted prompt changes; only ask a question if a missing detail blocks success.

Prompt augmentation

Reformat user prompts into a structured, production-oriented spec. Only make implicit details explicit; do not invent new requirements.

Show full SKILL.md (495 more words)Show less

Use-case taxonomy (exact slugs)

Classify each request into one of these buckets and keep the slug consistent across prompts and references.

Generate:

  • photorealistic-natural — candid/editorial lifestyle scenes with real texture and natural lighting.
  • product-mockup — product/packaging shots, catalog imagery, merch concepts.
  • ui-mockup — app/web interface mockups that look shippable.
  • infographic-diagram — diagrams/infographics with structured layout and text.
  • logo-brand — logo/mark exploration, vector-friendly.
  • illustration-story — comics, children’s book art, narrative scenes.
  • stylized-concept — style-driven concept art, 3D/stylized renders.
  • historical-scene — period-accurate/world-knowledge scenes.

Edit:

  • text-localization — translate/replace in-image text, preserve layout.
  • identity-preserve — try-on, person-in-scene; lock face/body/pose.
  • precise-object-edit — remove/replace a specific element (incl. interior swaps).
  • lighting-weather — time-of-day/season/atmosphere changes only.
  • background-extraction — transparent background / clean cutout.
  • style-transfer — apply reference style while changing subject/scene.
  • compositing — multi-image insert/merge with matched lighting/perspective.
  • sketch-to-render — drawing/line art to photoreal render.

Quick clarification (augmentation vs invention):

  • If the user says “a hero image for a landing page”, you may add layout/composition constraints that are implied by that use (e.g., “generous negative space on the right for headline text”).
  • Do not introduce new creative elements the user didn’t ask for (e.g., adding a mascot, changing the subject, inventing brand names/logos).

Template (include only relevant lines):

Use case: <taxonomy slug>
Asset type: <where the asset will be used>
Primary request: <user's main prompt>
Scene/background: <environment>
Subject: <main subject>
Style/medium: <photo/illustration/3D/etc>
Composition/framing: <wide/close/top-down; placement>
Lighting/mood: <lighting + mood>
Color palette: <palette notes>
Materials/textures: <surface details>
Quality: <low/medium/high/auto>
Input fidelity (edits): <low/high>
Text (verbatim): "<exact text>"
Constraints: <must keep/must avoid>
Avoid: <negative constraints>

Augmentation rules:

  • Keep it short; add only details the user already implied or provided elsewhere.
  • Always classify the request into a taxonomy slug above and tailor constraints/composition/quality to that bucket. Use the slug to find the matching example in references/sample-prompts.md.
  • If the user gives a broad request (e.g., "Generate images for this website"), use judgment to propose tasteful, context-appropriate assets and map each to a taxonomy slug.
  • For edits, explicitly list invariants ("change only X; keep Y unchanged").
  • If any critical detail is missing and blocks success, ask a question; otherwise proceed.

Examples

Generation example (hero image)
Use case: stylized-concept
Asset type: landing page hero
Primary request: a minimal hero image of a ceramic coffee mug
Style/medium: clean product photography
Composition/framing: centered product, generous negative space on the right
Lighting/mood: soft studio lighting
Constraints: no logos, no text, no watermark
Edit example (invariants)
Use case: precise-object-edit
Asset type: product photo background replacement
Primary request: replace the background with a warm sunset gradient
Constraints: change only the background; keep the product and its edges unchanged; no text; no watermark

Prompting best practices (short list)

  • Structure prompt as scene -> subject -> details -> constraints.
  • Include intended use (ad, UI mock, infographic) to set the mode and polish level.
  • Use camera/composition language for photorealism.
  • Quote exact text and specify typography + placement.
  • For tricky words, spell them letter-by-letter and require verbatim rendering.
  • For multi-image inputs, reference images by index and describe how to combine them.
  • For edits, repeat invariants every iteration to reduce drift.
  • Iterate with single-change follow-ups.
  • For latency-sensitive runs, start with quality=low; use quality=high for text-heavy or detail-critical outputs.
  • For strict edits (identity/layout lock), consider input_fidelity=high.
  • If results feel “tacky”, add a brief “Avoid:” line (stock-photo vibe; cheesy lens flare; oversaturated neon; harsh bloom; oversharpening; clutter) and specify restraint (“editorial”, “premium”, “subtle”).

More principles: references/prompting.md. Copy/paste specs: references/sample-prompts.md.

Guidance by asset type

Asset-type templates (website assets, game assets, wireframes, logo) are consolidated in references/sample-prompts.md.

CLI + environment notes

  • CLI commands + examples: references/cli.md
  • API parameter quick reference: references/image-api.md
  • If network approvals / sandbox settings are getting in the way: references/codex-network.md

Reference map

  • references/cli.md: how to run image generation/edits/batches via scripts/image_gen.py (commands, flags, recipes).
  • references/image-api.md: what knobs exist at the API level (parameters, sizes, quality, background, edit-only fields).
  • references/prompting.md: prompting principles (structure, constraints/invariants, iteration patterns).
  • references/sample-prompts.md: copy/paste prompt recipes (generate + edit workflows; examples only).
  • references/codex-network.md: environment/sandbox/network-approval troubleshooting.

© JetBrains, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 10 other files (scripts, references, assets) in imagegen of JetBrains/skills.

  • SKILL.md
  • LICENSE.txt
  • agents/openai.yaml
  • assets/imagegen-small.svg
  • assets/imagegen.png
  • references/cli.md
  • references/codex-network.md
  • references/image-api.md
  • references/prompting.md
  • references/sample-prompts.md
  • scripts/image_gen.py

Open the folder on GitHubat commit e0f258b

Used in 4 other repositories

We found 5 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 4 other GitHub owners. This page covers the copy in JetBrains/skills, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Imagegen next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Imagegen compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Imagegen this skillJetBrains/skills3644 repos~2.5kAutomated safety check: PassApache-2.0
AI Image Generation and Editingzhayujie/CowAgent47k—~1.3kAutomated safety check: PassMIT
GPT Image Generation CLIwuyoscar/GPT-Image2-Skill5.7k—~2.5kAutomated safety check: NotesMIT
BlockRun Image GenerationBlockRunAI/ClawRouter6.6k—~2.1kAutomated safety check: PassMIT
Codex API Image Generatoryc-duan/api-image101—~4.9kAutomated safety check: PassMIT
BananaTape Image Editor CLINomaDamas/bananatape188—~547Automated safety check: PassNone

Similar skills

  • Generates or edits images from text prompts through a Python script that picks an image backend based on which API keys are configured.

    47k GitHub stars~1.3k tokensUpdated today
    Media & CreativeAuto-check passed
  • GPT Image Generation CLI

    wuyoscar/GPT-Image2-Skill

    Generates and edits images with GPT Image 2 or 2.5 through a packaged CLI and a prompt gallery, after settling which model fits the request.

    5.7k GitHub stars~2.5k tokensUpdated 8 days ago
    Media & CreativeAuto-check: notes
  • BlockRun Image Generation

    BlockRunAI/ClawRouter

    Generates or edits images through ClawRouter's local image API, with a choice of models and sizes and payment handled automatically through x402.

    6.6k GitHub stars~2.1k tokensUpdated 3 days ago
    Media & CreativeAuto-check passed
  • Codex API Image Generator

    yc-duan/api-image

    Replaces Codex's built-in image tool with provider-based generation and editing, fetching reference images first whenever visual accuracy actually matters.

    101 GitHub stars~4.9k tokensUpdated 5 mo ago
    Media & CreativeAuto-check passed
  • BananaTape Image Editor CLI

    NomaDamas/bananatape

    Drives the BananaTape CLI to create, launch, list and delete local AI image editing projects from an agent, including headless smoke tests.

    188 GitHub stars~547 tokensUpdated 2 mo ago
    Media & CreativeAuto-check passed
  • Gpt Image 1 5

    intellectronica/agent-skills

    Generate and edit images using OpenAI's GPT Image 1.5 model.

    295 GitHub stars~1.5k tokensUpdated 5 mo ago
    Media & CreativeAuto-check passed

More from JetBrains/skills

All 77 skills in this repo
  • Playwright

    JetBrains/skills

    Official

    A skill your agent uses when the task requires automating a real browser from the terminal (navigation, form filling, snapshots, screenshots, data extraction, UI-flow debugging) via playwright-cli…

    364 GitHub starsUsed in 12 repos~986 tokens
    Auto-check passed
  • Skill Creator

    JetBrains/skills

    Official

    Guide for creating effective skills. An agent skill from JetBrains/skills.

    364 GitHub starsUsed in 122 repos~4.7k tokens
    Auto-check passed
  • Transcribe

    JetBrains/skills

    Official

    Transcribe audio files to text with optional diarization and known-speaker hints.

    364 GitHub starsUsed in 5 repos~776 tokens
    Auto-check passed
  • Speech

    JetBrains/skills

    Official

    A skill your agent uses when the user asks for text-to-speech narration or voiceover, accessibility reads, audio prompts, or batch speech generation via the OpenAI Audio API; run the bundled CLI…

    364 GitHub starsUsed in 4 repos~1.9k tokens
    Auto-check passed
  • Screenshot

    JetBrains/skills

    Official

    A skill your agent uses when the user explicitly asks for a desktop or system screenshot (full screen, specific app or window, or a pixel region), or when tool-specific capture capabilities are…

    364 GitHub starsUsed in 6 repos~2k tokens
    Auto-check passed
  • Vercel Deploy

    JetBrains/skills

    Official

    Deploy applications and websites to Vercel. An agent skill from JetBrains/skills.

    364 GitHub starsUsed in 6 repos~716 tokens
    Auto-check passed

Works with

Questions about Imagegen

What does Imagegen do?

A skill your agent uses when the user asks to generate or edit images via the OpenAI Image API (for example: generate image, edit/inpaint/mask, background removal or replacement, transparent…. Imagegen is an agent skill from JetBrains/skills, published by the product's own GitHub organization.py) and require OPENAIAPIKEY for live calls.

When should I use Imagegen?

Imagegen fits situations like: the user asks to generate; edit images via the OpenAI Image API (for example: generate image; edit/inpaint/mask; background removal.

How do I install Imagegen in Claude Code?

Run `npx skills add JetBrains/skills --skill imagegen -a claude-code`. Or copy the skill folder (imagegen in JetBrains/skills) into .claude/skills/imagegen in your project. Claude Code loads it when a task matches its description.

How do I install Imagegen in Codex?

Run `npx skills add JetBrains/skills --skill imagegen -a codex`. Or copy the skill folder (imagegen in JetBrains/skills) into .agents/skills/imagegen in your project. Codex loads it when a task matches its description.

Can I use Imagegen in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add JetBrains/skills --skill imagegen -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/imagegen, .gemini/skills/imagegen, .github/skills/imagegen and .opencode/skills/imagegen in your project.

What does Imagegen need to run?

Going by SKILL.md and its folder, Imagegen needs Python for the scripts in its folder, the command-line tools its instructions call (uv and python3) and credentials named OPENAI_API_KEY. Our summary lists: Python 3; A credential in OPENAI_API_KEY.

Does Imagegen access the network?

SKILL.md names 1 domain. As links in the text: platform.openai.com. This is read from the text; nothing was executed.

Is Imagegen safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Imagegen use?

Imagegen is published under the Apache-2.0 licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Imagegen use?

About 2.5k tokens (SKILL.md is roughly 10k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 7.2k tokens, read only when the agent opens those files.

What are the alternatives to Imagegen?

Skills that share tags, products or a category with Imagegen: AI Image Generation and Editing (zhayujie/CowAgent, 47k stars), GPT Image Generation CLI (wuyoscar/GPT-Image2-Skill, 5.7k stars), BlockRun Image Generation (BlockRunAI/ClawRouter, 6.6k stars) and Codex API Image Generator (yc-duan/api-image, 101 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Imagegen?

JetBrains (a GitHub organization, an official publisher) maintains it in JetBrains/skills, which has 364 GitHub stars. The repository holds 77 skills in this directory. The repository was last updated on June 29, 2026.

Source: JetBrains/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.