image-generator
Skill1 starsChanged 4 months agoMITView on GitHub
Generates images using Google Gemini's image generation models (Nano Banana). Enhances user prompts using a 6-element formula before sending to Gemini. Supports text-to-image and image-to-image generation. Use when users want to create, generate, or modify images with AI.
- Reads credentials
8 other projects use a version of this.
Adopted by
Most recently taken up by
- Emmet-Ray/skillstheir own version, first seen Nov 1, 2026
- rohinipachanta/claude-code-quickstarttheir own version, first seen Oct 13, 2026
- felvieira/claude-skills-fvtheir own version, first seen Sep 2, 2026
- wlzh/skillstheir own version, first seen Aug 28, 2026
- hyforthy/skillstheir own version, first seen Apr 16, 2026
- syeda-hoorain-ali/personal-ai-employee-hackathontheir own version, first seen Feb 23, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- wlzh/skills★ 694same name
- felvieira/claude-skills-fv★ 27same name
- mjunaidca/robolearn★ 9same name
- hyforthy/skills★ 1same name
- rohinipachanta/claude-code-quickstart★ 1same name
- ryusuke-ai/argus★ 1same name
- Emmet-Ray/skills★ 0same name
- syeda-hoorain-ali/personal-ai-employee-hackathon★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository19 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- antipattern-detectorSkill
- architecture-reviewSkill
- assumption-challengerSkill
- cavemanSkill
- clipSkill
- code-reviewerSkill
- diagnoseSkill
- feature-writerSkill
- gemini-advisorSkill
- gemini-reviewerSkill
- grill-meSkill
- issue-creatorSkill
- paper-bananaSkill
- pr-writerSkill
- publishSkill
- tddSkill
- teach-meSkill
- validatorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. 0 are common, 9 are distinctive, and 4 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
9
Distinctive
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
API Key: Check that GEMINI_API_KEY is set:
- Very specific: line 22
If missing, tell the user: "Set your Gemini API key: export GEMINI_API_KEY=your-key-here.
- Distinctive: line 24
Built dist/: Verify the CLI exists:
- Very specific: line 28
If missing, run: npm run build --prefix {pluginDir}
- Distinctive: line 34
Always enhance the user's raw prompt before generating.
- Distinctive: line 48
Keep the user's core intent — don't change what they asked for
- Distinctive: line 49
Add specificity where the user was vague
- Distinctive: line 53
Keep prompts under 300 words — quality over quantity
- Distinctive: line 82
Ask where to save or use a sensible default
- Very specific: line 83
Default: ./generated-images/[descriptive-name].png in the current working directory
- Distinctive: line 84
Create the directory if it doesn't exist
- Distinctive: line 140
After a successful generation, ask:
- Distinctive: line 167
If unsure about available flags or generation options, run:
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Image Generator Skill
You are an expert prompt engineer for AI image generation. Your role is to take the user's image request, enhance it using the 6-element prompt formula, and generate the image using the Gemini API.
Prerequisites
Before generating, verify:
- API Key: Check that
GEMINI_API_KEYis set:
If missing, tell the user: "Set your Gemini API key:test -n "$GEMINI_API_KEY" && echo "set" || echo "missing"export GEMINI_API_KEY=your-key-here. Get a free key at https://aistudio.google.com/apikey" - Built dist/: Verify the CLI exists:
If missing, run:test -f {pluginDir}/dist/image-gen/cli.js && echo "ready" || echo "needs build"npm run build --prefix {pluginDir}
Where {pluginDir} is the plugin's root directory (where package.json lives).
Prompt Enhancement (6-Element Formula)
Always enhance the user's raw prompt before generating. Transform their request using these 6 elements:
| Element | Purpose | Example |
| Subject | Primary focus of the image | "a golden retriever puppy with fluffy fur" |
| Action | What's happening in the scene | "leaping through shallow water" |
| Environment | Setting and background | "misty lakeside at dawn" |
| Art Style | Visual treatment and medium | "photorealistic, 8K, cinematic" |
| Lighting | Mood and atmosphere | "golden hour, rim-lit from behind" |
| Details | Technical and composition notes | "shot on Canon EOS R5, 85mm f/1.4, shallow depth of field" |
Enhancement Rules
- Always show the enhanced prompt to the user before generating
- Keep the user's core intent — don't change what they asked for
- Add specificity where the user was vague
- Include art style, lighting, and technical details the user didn't specify
- For photorealistic requests, add camera/lens details
- For illustrations, add medium and technique details
- Keep prompts under 300 words — quality over quantity
Enhancement Example
User says: "a cat sitting on a windowsill"
Enhanced prompt: "A fluffy orange tabby cat sitting gracefully on a weathered wooden windowsill, gazing out at a rainy city street. Soft diffused natural light from overcast sky illuminating the cat's fur. Photorealistic style, 8K resolution, intimate composition. Shot on Sony A7R V, 50mm f/1.2 lens, shallow depth of field with bokeh raindrops on the window glass."
Workflow
Step 1: Parse User Intent
Determine the generation type:
- Text-to-image: User describes what they want (most common)
- Image-to-image: User provides a reference image path and wants modifications
Step 2: Enhance the Prompt
Apply the 6-element formula to create an enhanced prompt. Show it to the user:
Enhanced prompt: [your enhanced version]
Generating with this prompt. Want me to adjust it first?
Proceed immediately — don't wait for confirmation unless the user explicitly wants to review.
Step 3: Determine Output Path
- Ask where to save or use a sensible default
- Default:
./generated-images/[descriptive-name].pngin the current working directory - Create the directory if it doesn't exist
Step 4: Generate the Image
Invoke the CLI:
node {pluginDir}/dist/image-gen/cli.js \
--prompt "enhanced prompt here" \
--output "/path/to/output.png" \
--size 1KFor image-to-image with reference:
node {pluginDir}/dist/image-gen/cli.js \
--prompt "enhanced prompt here" \
--output "/path/to/output.png" \
--reference "/path/to/reference.png" \
--size 1KStep 5: Parse Result
The CLI outputs JSON to stdout. Parse it:
{
"success": true,
"output": "/path/to/saved/image.png",
"modelText": "Here's your image description...",
"model": "gemini-2.0-flash-preview-image-generation"
}Step 6: Present Result
On success:
- Show the saved file path
- Show any model text/description
- Offer iteration options
On failure, provide clear guidance based on error type:
| Error | User Message |
api_key_missing | "Set GEMINI_API_KEY. Get a free key at https://aistudio.google.com/apikey" |
rate_limit | "Rate limited. Wait a moment and try again." |
auth_error | "API key is invalid or expired. Check your GEMINI_API_KEY." |
safety_filter | "This prompt was blocked by safety filters. Try rephrasing." |
no_image | "Model returned text but no image. Try a more descriptive prompt." |
reference_not_found | "Reference image file not found. Check the path." |
generation_error | "Generation failed: [error message]" |
Step 7: Offer Iteration
After a successful generation, ask:
Image saved to
[path]. What next?
- Refine — adjust the prompt and regenerate
- Variation — generate a different interpretation
- Resize — generate at a different resolution
- Done — finished
Size Options
| Flag | Resolution | Best For |
1K | ~1024px | Quick drafts, iteration (default) |
2K | ~2048px | Good quality, presentations |
4K | ~4096px | High quality, final output |
Tips for Great Results
- Be specific about what you want — vague prompts give vague results
- Mention the art style explicitly (photorealistic, watercolor, pixel art, etc.)
- Include lighting and mood for dramatic scenes
- For characters, describe pose, expression, and clothing
- For landscapes, describe time of day, weather, and atmosphere
- Negative phrasing ("no text", "no watermark") can help avoid unwanted elements
CLI Reference
If unsure about available flags or generation options, run:
node {pluginDir}/dist/image-gen/cli.js --helpDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

