plugins/image-gen/skills/image-gen/SKILL.md
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.
npx skillsauth add nicknisi/claude-plugins image-genInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Multi-provider image generation. Default provider is Gemini (nano-banana-pro); pass --provider openai to use gpt-image-2.
The skill ships a pre-bundled Node script — no tsx or dependency install required on the user side. Invoke with node. Run node ${CLAUDE_PLUGIN_ROOT}/skills/image-gen/dist/generate_image.js --help at any time for the full flag reference printed by the script itself.
Generate:
node ${CLAUDE_PLUGIN_ROOT}/skills/image-gen/dist/generate_image.js \
--prompt "your description" --filename "output.png" \
[--provider gemini|openai] [--resolution 1K|2K|4K] [--size WxH] [--quality low|medium|high|auto] [--api-key KEY]
Edit (image-to-image):
node ${CLAUDE_PLUGIN_ROOT}/skills/image-gen/dist/generate_image.js
--prompt "editing instructions" --filename "output.png"
--input-image "path/to/input.png" [--mask "path/to/mask.png"]
## Flag reference
| Flag | Values | Notes |
|------|--------|-------|
| `--prompt` | text | Required. |
| `--filename` | path | Required. Output PNG. |
| `--provider` | `gemini` \| `openai` | Default: `gemini` (or `openai` if only `OPENAI_API_KEY` is set). |
| `--resolution` | `1K` \| `2K` \| `4K` | Default `1K`. `4K` clamps to `3840x2160` on OpenAI. |
| `--size` | `WxH` | OpenAI only. Overrides `--resolution`. Max edge 3840, multiples of 16. |
| `--quality` | `low` \| `medium` \| `high` \| `auto` | OpenAI only. Default `auto`. Ignored on Gemini. |
| `--input-image` | path | Switches to edit mode. Repeatable on Gemini for multi-image composition; OpenAI accepts only one. |
| `--mask` | path | OpenAI only. Inpainting mask. Requires `--input-image`. |
| `--api-key` | key | Overrides env for selected provider. |
| `-h`, `--help` | — | Print CLI help and exit. |
## Resolution
- `1K` (default) — 1024px
- `2K` — 2048px
- `4K` — 4096px on Gemini; silently clamped to `3840x2160` on OpenAI (OpenAI's hard cap is 3840).
- `--size WxH` (OpenAI only) overrides `--resolution`. Max edge 3840, both edges must be multiples of 16.
## Quality (OpenAI only)
`low | medium | high | auto` (default `auto`). Ignored on Gemini with a warning.
## Masks (OpenAI only)
`--mask <path>` enables inpainting. Requires `--input-image`. Error if used with Gemini.
## API keys
Resolution order:
1. `--api-key` flag (applied to selected provider)
2. Provider-specific env:
- Gemini: `GEMINI_API_KEY` or `GOOGLE_API_KEY`
- OpenAI: `OPENAI_API_KEY`
## Filename convention
YYYY-MM-DD-HH-MM-SS-descriptive-name.png
Use OpenAI at 2K for anything with readable labels or callouts. Save to the appropriate content dir (e.g., src/content/blog/post-name/). Prefer clean, minimalist styles.
tools
Generate a /goal command to execute an ideation project's specs autonomously. Reads the contract, builds a goal prompt with phase ordering and spec paths, copies it to clipboard, and prints it. The user pastes the /goal command to start autonomous execution. Use when the user says 'goal', 'run as goal', 'get goal prompt', 'goal prompt', or wants to execute specs via /goal instead of /ideation:autopilot.
development
Go up a layer of abstraction and map the surrounding architecture. Use when the user is unfamiliar with an area of code, asks "how does this fit in", "what calls this", "give me the big picture", "where am I", "map this out", "I'm lost", "explain this area", or needs to understand how a file, module, or function connects to the rest of the system. Also use when the user says /zoom-out or "zoom out" mid-conversation — even without a specific file reference, orient them based on whatever code is currently in context.
development
Build a throwaway prototype to answer a design question before committing to real implementation. Generates either a runnable terminal app (for state machines, data models, business logic) or several radically different UI variations on one route (for visual/layout decisions). Use when the user wants to prototype, spike, POC, sanity-check a data model, mock up a UI, explore design options, or says "prototype this", "spike this out", "let me play with it", "try a few designs", "sketch this in code", "I want to try something before building it for real", "quick and dirty version", or "validate this approach" — even if they don't use the word "prototype."
development
Comprehensive, codebase-wide quality sweep that dispatches parallel subagents to find and fix structural issues. Covers deduplication, type consolidation, dead code removal, circular dependencies, weak types, defensive try/catch, deprecated paths, and AI slop. Primary support for JS/TS projects (knip, madge, TypeScript types); other languages get grep-based analysis. Use when the user asks to "deep clean the whole repo", "run a full codebase audit", "nuclear cleanup", "deslop everything", or "sweep the entire codebase for quality issues". Do NOT use for single-file fixes, branch-scoped diffs (use de-slopify instead), or targeted refactors.