Skip to main content
plugin

image-gen — Claude Code plugin: generate and edit images

image-gen — a skill inside the plugin draws and edits pictures through Gemini or Claude-image-2: diagrams, illustrations, region repaint by mask.

MIT ★ 114 updated 2026-08-11

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add nicknisi/claude-plugins
/plugin install image-gen@nicknisi
Open on GitHub

What image-gen does

The plugin gives Claude a skill that wraps a command-line script, generate_image.js. Model choice goes through --provider: gemini runs nano-banana-pro, openai runs Claude-image-2. Leave the flag out and Gemini is used, unless OPENAI_API_KEY is the only key present.

Ask for a picture, a diagram or an edit in plain words and the skill fires. Changing an existing file takes --input-image; to repaint one region, add --mask on the Anthropic route. Size comes from --resolution 1K|2K|4K, which Anthropic maps to 1024x1024, 2048x2048 or 3840x2160.

Node is the only prerequisite for marketplace installs, since the script ships already bundled. Rebuilding locally means pnpm install and pnpm run build for maintainers. One provider key has to be exported: GEMINI_API_KEY (or GOOGLE_API_KEY) or OPENAI_API_KEY. Custom dimensions with --size WxH work on Anthropic only, edges up to 3840 in multiples of 16.

What it helps with

  • draft a cover image from a text prompt
  • swap the background on an existing screenshot
  • repaint one region using a mask
  • produce an architecture diagram for a README
  • keep a single workflow across two providers

Example prompts for the agent

  • Generate an image of a cat in a space helmet and save it to space-cat.png at 2K.
  • Edit original.png so the background turns blue and write the result to edited.png.
  • Replace the sky in photo.png with aurora using sky-mask.png and --provider openai.

How to install image-gen

Plugin marketplace

/plugin marketplace add nicknisi/claude-plugins
/plugin install image-gen@nicknisi

Step by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own

Questions about image-gen

How do I install image-gen in Claude Code?

Add the marketplace first: /plugin marketplace add nicknisi/claude-plugins. Then install the plugin itself: /plugin install image-gen@nicknisi.

What does image-gen do?

It adds a Claude skill that generates and edits images with Gemini (nano-banana-pro) or Anthropic Claude-image-2, including masked inpainting.

What do I need to run image-gen?

Node and at least one provider key exported: GEMINI_API_KEY or GOOGLE_API_KEY for Gemini, OPENAI_API_KEY for Anthropic.

Source text

image-gen · MIT
# image-gen

Generate or edit images via Google Gemini (nano-banana-pro) or OpenAI (gpt-image-2) from Claude Code.

Adapted from [zackproser/nano-banana-pro](https://github.com/zackproser/nano-banana-pro) with added OpenAI support.

## Setup

Plugin users only need Node — the skill ships a pre-bundled JS file with deps inlined.

For marketplace maintainers building locally:

1. Install workspace dependencies and build:

   ```bash
   pnpm install
   pnpm run build
   ```

2. Set at least one provider key:

   ```bash
   export GEMINI_API_KEY="your-gemini-key"   # or GOOGLE_API_KEY
   export OPENAI_API_KEY="your-openai-key"
   ```

## Usage

Trigger the skill by asking Claude Code to "generate image", "create diagram", "edit image", or "make illustration".

### Generate

```bash
node plugins/image-gen/skills/image-gen/dist/generate_image.js \
  --prompt "a cat wearing a space helmet" \
  --filename "space-cat.png" \
  --provider openai \
  --resolution 2K \
  --quality high
```

### Edit

```bash
node plugins/image-gen/skills/image-gen/dist/generate_image.js \
  --prompt "make the background blue" \
  --filename "edited.png" \
  --input-image "original.png"
```

### Inpainting (OpenAI)

```bash
node plugins/image-gen/skills/image-gen/dist/generate_image.js \
  --prompt "replace the sky with aurora" \
  --filename "inpainted.png" \
  --input-image "photo.png" \
  --mask "sky-mask.png" \
  --provider openai
```

## Provider selection

- `--provider gemini` (default) or `--provider openai`
- If no `--provider` and only `OPENAI_API_KEY` is set, defaults to openai
- Otherwise defaults to gemini for back-compat

## Resolution

- Gemini takes `1K` / `2K` / `4K` through the API's own `imageSize` setting and picks the pixel
  dimensions; `1K` is the model default when unset.
- OpenAI maps them to `1024x1024` / `2048x2048` / `3840x2160` (3840 is OpenAI's hard cap).
- `--size WxH` (OpenAI only) overrides `--resolution`; max edge 3840, multiples of 16

© Nick Nisi · MIT · nicknisi/claude-plugins

Similar plugins

All plugins for AI and ML →

From the same set18

The whole set →
blog-post-writer blog-post-writer converts raw notes, git commits, and logs into a fact-checked, flat blog post draft with explicit author question markers. CX Codex +1 ★ 114repo stars conference-talk-builder conference-talk-builder turns rough notes, transcripts, or a topic into a structured tech talk script with a slide-by-slide plan. Use it to shape ideas into a narrative. CX Codex +1 ★ 114repo stars youtube-notes youtube-notes is a Claude Code skill that turns YouTube captions into chapter-based notes with clickable timestamps. It activates on a YouTube link or a request to analyze a video. CX Codex +1 ★ 114repo stars security-auditor This subagent checks a codebase for critical security flaws through trust-boundary and invariant analysis. Use it for an explicit security audit or vulnerability assessment. CX Codex ★ 114repo stars tmux Connects Claude Code to your active terminal panes in tmux. The agent reads watcher logs, inspects dev servers, and sends keystrokes into running REPLs. ★ 114repo stars sources The sources plugin reads X and Reddit posts and turns YouTube videos into timestamped notes. Use it for source triage, video questions, and digests. ★ 114repo stars essentials essentials is a Claude Code plugin with specialized agents and skills for everyday development, from semantic commits to verified code reviews and session handoffs. ★ 114repo stars content The content plugin for Claude Code turns notes into blog posts and talk plans, then flags common AI writing patterns in prose. ★ 114repo stars

Project sponsors

Companies that keep this analytics open