image-gen
GitHub支持通过 Gemini 或 OpenAI 生成和编辑图像,提供多分辨率、掩码修补及文本精准生成能力。
Trigger Scenarios
Install
npx skills add nicknisi/claude-plugins --skill image-gen -g -y
SKILL.md
Frontmatter
{
"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-imagerepeatedly 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:
node ${CLAUDE_PLUGIN_ROOT}/skills/image-gen/dist/generate_image.js --help
Generate:
node ${CLAUDE_PLUGIN_ROOT}/skills/image-gen/dist/generate_image.js \
--prompt "your description" --filename "output.png"
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"
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.
Version History
- 6a6decd Current 2026-08-19 21:41
- c3164c9 2026-07-24 21:11


