image-gen · nicknisi — Claude Code skill for image generation
image-gen is a Claude Code skill that generates or edits images with Gemini or OpenAI. It handles illustrations, diagrams, and graphics with readable labels.
MIT ★ 114 updated 2026-08-11
/plugin marketplace add nicknisi/claude-plugins
/plugin install image-gen@nicknisiWhat image-gen does
The skill sends image generation and editing requests to Gemini (nano-banana-pro) or OpenAI gpt-image-2. Gemini handles illustrations and quick diagrams; OpenAI is the choice when rendered text matters or an edit needs a mask. It can combine multiple input images and supports 1K, 2K, and 4K output.
A bundled Node script, generate_image.js, performs the work, so there is no separate dependency installation. You need a provider API key: Gemini reads GEMINI_API_KEY or GOOGLE_API_KEY, while OpenAI reads OPENAI_API_KEY. Without the matching key, the provider request cannot run. Check the script’s available options with --help.
What it helps with
- generate an illustration from a prompt
- edit an existing image with written directions
- combine several source images into one composition
- make a diagram with legible labels
Example prompts for the agent
- Create an illustration for this page and save it as
output.png. - Edit
input.pngby adding labels, then save the result asoutput.png. - Make a diagram with readable labels and use OpenAI for image generation.
How to install image-gen
1Plugin marketplace
/plugin marketplace add nicknisi/claude-plugins/plugin install image-gen@nicknisiThis installs the whole image-gen plugin with all its skills
2Skills CLI (Vercel)
npx skills add nicknisi/claude-plugins --skill image-gen -a claude-code3Manually: put the files in place
~/.claude/skills/image-gen/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/image-gen/
1Skills CLI (Vercel)
npx skills add nicknisi/claude-plugins --skill image-gen -a codex2Manually: put the files in place
.agents/skills/image-gen/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add nicknisi/claude-plugins --skill image-gen -a cursor2Manually: put the files in place
.cursor/skills/image-gen/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install nicknisi/claude-plugins plugins/image-gen/skills/image-gen2Manually: put the files in place
.github/skills/image-gen/SKILL.md1Skills CLI (Vercel)
npx skills add nicknisi/claude-plugins --skill image-gen -a gemini-cli2Platform CLI
gemini skills install https://github.com/nicknisi/claude-plugins --path plugins/image-gen/skills/image-genManually: put the files in place
.devin/skills/image-gen/SKILL.mdThe legacy .windsurf/skills/ path still works
Claude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about image-gen
How do I install image-gen in Claude Code?
In Claude Code, add the marketplace with /plugin marketplace add nicknisi/claude-plugins, then install the skill with /plugin install image-gen@nicknisi.
What does image-gen do?
It creates images from prompts and edits existing images through Gemini or OpenAI. Choose OpenAI when accurate text in the image matters.
Which API key does image-gen need?
Gemini uses GEMINI_API_KEY or GOOGLE_API_KEY; OpenAI uses OPENAI_API_KEY. The --api-key option can override the environment key.
Source text
SKILL.md · MIT
---
name: image-gen
description: >-
Generate or edit images via Google Gemini (nano-banana-pro) or OpenAI
gpt-image-2. Trigger on "generate image", "create diagram", "edit image",
or "make illustration". Supports 1K/2K/4K resolution, masked inpainting,
and text-accurate generation.
---
# Image Generation & Editing
Multi-provider image generation. Default provider is Gemini (nano-banana-pro); pass `--provider openai` to use gpt-image-2.
## Which provider to pick
- **Gemini (default):** general illustrations, quick diagrams, visual imagery. Accepts `--input-image` repeatedly for multi-image composition.
- **OpenAI:** anything where text rendering matters (infographics, slide-like images, dense-label diagrams, logos with text), or when you need masked inpainting on edits.
## Usage
The skill ships a pre-bundled Node script — no tsx or dependency install needed. The script's `--help` is the authoritative flag reference; run it rather than guessing:
```bash
node ${CLAUDE_PLUGIN_ROOT}/skills/image-gen/dist/generate_image.js --help
```
Generate:
```bash
node ${CLAUDE_PLUGIN_ROOT}/skills/image-gen/dist/generate_image.js \
--prompt "your description" --filename "output.png"
```
Edit (image-to-image):
```bash
node ${CLAUDE_PLUGIN_ROOT}/skills/image-gen/dist/generate_image.js \
--prompt "editing instructions" --filename "output.png" \
--input-image "path/to/input.png"
```
## API keys
Read from the environment unless `--api-key` overrides: Gemini uses `GEMINI_API_KEY` or `GOOGLE_API_KEY`; OpenAI uses `OPENAI_API_KEY`. If only `OPENAI_API_KEY` is set, the provider defaults to OpenAI.
## Conventions
- Name files `YYYY-MM-DD-HH-MM-SS-descriptive-name.png`.
- For blog diagrams, use OpenAI at `2K` — anything with readable labels or callouts needs its text fidelity. Save to the post's content dir (e.g. `src/content/blog/post-name/`) and prefer clean, minimalist styles.
- The script prints the saved path. Report that path to the user; do not read the image back.
© Nick Nisi · MIT · nicknisi/claude-plugins
Similar skills
All skills for Design →image-gen by other authors comes first.