image-gen
Skill1 starsChanged 23 days agoMITView on GitHub
Generate raster images (PNG/JPEG/WebP) from a text prompt via Google's Gemini image model ("Nano Banana") through a direct API call — no browser automation, no screenshot-cropping. Use whenever a task calls for an actual image to be generated — an illustration, icon, mascot, banner, product photo mockup, texture, or any other raster artwork — not just when Gemini is named explicitly. Requires GEMINI_API_KEY set in the user's shell environment.
- Reads credentials
- Installs packages
49 other projects use a version of this.
Adopted by
Most recently taken up by
- krishagel/geoffreytheir own version, first seen Nov 15, 2026
- suitedaces/dorabottheir own version, first seen Nov 14, 2026
- notque/vexjoy-agenttheir own version, first seen Nov 10, 2026
- lohi-ai/babysittheir own version, first seen Nov 8, 2026
- artemmarketolog/image-gentheir own version, first seen Nov 8, 2026
- ITch8/customs-data-skillstheir own version, first seen Nov 8, 2026
Used with
Projects with it also use spotify, trello and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
QuixiAISkillspotify
Search Spotify, inspect current playback and devices, and control playback with explicit approval
Also in 3 projects that use this
QuixiAISkilltrello
List Trello boards, lists, and cards and create or update cards with explicit approval
Also in 3 projects that use this
AnthropicSkilldaily-briefing
Morning rundown - today's meetings with account context, opps closing soon with stale flags, waiting customer emails, and the day's top actions. Use when the user says "daily briefing", "daily brief", "morning briefing", "what's my day", "what's on my plate today", "prep my day", "start my day", "morning rundown", or on a schedule.
Also in 3 projects that use this
silvainfmSkillpaid-ads
When the user wants help with paid advertising campaigns on Google Ads, Meta (Facebook/Instagram), LinkedIn, Twitter/X, or other ad platforms. Also use when the user mentions 'PPC,' 'paid media,' 'ad copy,' 'ad creative,' 'ROAS,' 'CPA,' 'ad campaign,' 'retargeting,' or 'audience targeting.' This skill covers campaign strategy, ad creation, audience targeting, and optimization.
Also in 3 projects that use this
AnthropicSkillweather
The optional standing status report ("the weather"): compile open incidents, build health, merge-queue stats, and deploy lag into one always-current report page, and post to the channel only when a defined event fires. Use when the weather routine fires, or when someone asks to run/update the weather report.
Also in 3 projects that use this
mitsuhikoSkillsummarize
Fetch a URL or convert a local file (PDF/DOCX/HTML/etc.) into Markdown using `uvx markitdown`, optionally it can summarize
Also in 3 projects that use this
Other versions49 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 49
- ethereum/ethereum-org-website★ 6ksame name
- fastclaw-ai/fastclaw★ 1.4ksame name
- QuixiAI/agi-memory★ 623same name
- QuixiAI/Hexis★ 623same name
- dotslashsimran/simcraft★ 451same name
- notque/vexjoy-agent★ 450same name
- notque/claude-code-toolkit★ 448same name
- suitedaces/dorabot★ 247same name
- wpsnote/wpsnote-skills★ 184same name
- microsoft/Huabu★ 183same name
39 more not listed
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 repository18 other files it gives its agents.
- AGENTS.mdAGENTS.md
- context7-cliSkill
- decision-protocolSkill
- frontend-designSkill
- gitlab-accessSkill
- hallmarkSkill
- harness-cleanerSkill
- k8s-debugSkill
- retroSkill
- sdd-workflowSkill
- ste100Skill
- teammate-protocolSkill
- team-wikiSkill
- technical-seoSkill
- ux-copySkill
- vector-genSkill
- web-design-guidelinesSkill
- writing-for-agentsSkill
The file
We split this skill into the rules it gives an agent
5 rules. 0 are common, 3 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 36 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 34
If the key is missing or empty, the script fails loudly with a clear message rather than silently doing nothing.
- Distinctive: line 40
Every invocation costs real money (per-image, not a fixed monthly fee) — there is no free-tier ceiling backstopping careless use.
- Distinctive: line 100
Use this for actual raster image generation of any kind.
- Very specific: line 101
Don't use this for logo/wordmark typography-only work, UI mockups, or landing page layout — those are better served by the design skill or …
- Very specific: line 104
If the target output must be a true vector (editable SVG paths), this script won't give you that — it returns raster images.
“Common” is measured: kept by at least 6 in 10 of the 36 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 Generation Skill
Bundles a small, zero-dependency Node script that calls the Gemini Developer API's image model directly over REST and writes clean image files to disk — a general raster-image-generation utility, not scoped to any particular project, brand, or subject matter. A direct API call avoids the failure modes of driving an AI image tool's web UI through browser automation (screenshot-cropping the result bakes in cursor icons, UI chrome, and wrong backgrounds).
This is a plain general-purpose tool — the script takes a prompt and optional reference images as arguments and returns image files. Any project needing an image generated uses the same tool rather than reinventing it or copying it into a project repo.
Prerequisite: GEMINI_API_KEY
The script reads this from the environment, not from any file. On macOS keep it in
the Keychain with envchain (brew install envchain), never in a shell profile:
printf '%s\n' "$KEY" | envchain --set agents GEMINI_API_KEY # once, key from your clipboard or a prompt
envchain agents node generate-ai.mjs --prompt "..." --out-dir <dir>Elsewhere, any way that puts GEMINI_API_KEY in the process environment works. This is a personal
credential — it must never live inside a project repo, committed or not. Get a key
from Google AI Studio if you don't have one.
If the key is missing or empty, the script fails loudly with a clear message rather than silently doing nothing. It never prints, logs, or writes the key value anywhere.
Use it responsibly — this is billed per call, not a flat subscription
Every invocation costs real money (per-image, not a fixed monthly fee) — there is no free-tier ceiling backstopping careless use. Don't generate more candidates than the task actually needs "just in case," don't loop retries blindly on a bad prompt without first fixing the prompt, and don't regenerate something that already exists and is still good. Default to the minimum count that lets a human make a real decision (often 1, rarely more than 2-3), and iterate the prompt/reference images between calls rather than brute-forcing many candidates per attempt.
How to run it
node ./scripts/generate-ai.mjs \
--prompt "<detailed description of the desired image>" \
--out-dir <directory to write results into> \
[--ref <path-to-reference-image>]... \
[--count 3] \
[--name candidate] \
[--model <model id>] \
[--background <colour>] \
[--meta]--prompt— required. Be specific and exhaustive: subject, composition, exact details required, palette, background, and anything that must not appear (the model does not infer omissions correctly by default).--ref— repeatable. Pass one or more existing images (PNG/JPG/WebP) as visual reference input to keep a new generation visually consistent with something already approved (same subject, same style, a specific pose/angle) rather than getting a fresh, unrelated result each time.--out-dir— required. Files are written here as plain PNG/JPEG/WebP; nothing is committed to git by this script — that decision belongs to whoever calls it.--count— how many independent candidates to generate (the model returns one image per call, so this loops the request rather than trusting a batch parameter).--background— adds the instruction for one flat solid background colour, edge to edge. Use it when the image goes on to tracing or cut-out: a flat background keeps the subject separable by colour.--meta— writes<file>.jsonbeside each image: the final prompt, model, response metadata (finishReason, usage), the sha256 of the image and of each reference, and the time. Keep it with the image; the record is how the image is reproduced or audited.--model— default isDEFAULT_MODELinscripts/generate-ai.mjs, the one place the id lives. Check the current ids athttps://ai.google.dev/gemini-api/docs/modelsand the dated deprecations athttps://ai.google.dev/gemini-api/docs/changelogbefore assuming the default is still right; changeDEFAULT_MODELthere.finishReason: IMAGE_RECITATION— the model refused this prompt, not the model id or the key. A bare prompt ("a red circle") triggers it; rephrase with subject, style and palette. Run smoke tests with a descriptive prompt.
An accepted image is the source
Once a person accepts an image, it is the source file. Change it with a new call
that passes it as --ref and says "change only X, keep everything else", never
by rewriting the original prompt and generating again: a new generation gives a
different image. Record the accepted file's sha256 (--meta does) before the
first edit.
When to reach for this vs. something else
- Use this for actual raster image generation of any kind.
- Don't use this for logo/wordmark typography-only work, UI mockups, or landing
page layout — those are better served by the
designskill or thefrontend-design/hallmarkskills. - If the target output must be a true vector (editable SVG paths), this script
won't give you that — it returns raster images. Diagrams and
infographics come from the
vector-genskill; accept raster and vectorize afterward only if actually needed. A logo or symbol from a raster idea goes through themarkform ofvector-gen(references/logo-craft.md): trace, reduce to flat colours, set the lettering from a font in code.
Known limitation to flag to the user
Gemini's own image model does not currently support Vertex AI or gcloud-based
auth as a lower-friction alternative in every environment — this script only
supports the Gemini Developer API key path. If the user already has GCP/Vertex AI
set up and prefers that auth path, that would need to be added as a second mode
rather than assumed to already work here.
Does 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.

