Image Generator (Pollinations AI)
Turns a user's request into a rendered image using Pollinations AI's free, keyless image
endpoint. The core idea: users rarely write great image-generation prompts on the first try,
so this skill's job is to translate their intent into a prompt that actually produces a good
image, then show the result — not just hand back a URL.
Workflow
- Understand the request. Figure out the subject, whether the user already specified a
style, mood, or composition, and whether they hint at a particular shape/use for the image
(portrait, landscape, icon, wallpaper, etc.) — see the sizing guide below.
- Enhance the prompt (see rules below).
- Generate the image with
scripts/generate_image.py, which builds the URL and tries to
download the image to a local file in the same step (see Building the image below).
- Show the result two ways, since Markdown image embeds of external URLs don't reliably
render in every Claude interface:
- Embed it inline with Markdown image syntax so it shows up immediately if the interface
supports it:

- If the download succeeded, also save the file to
/mnt/user-data/outputs/ and present it
as a file (e.g. via present_files) so the user has a reliable way to view/download it
even if the inline embed doesn't render for them.
- If the download failed (e.g. no network access to
image.pollinations.ai in this
environment), fall back to the Markdown embed alone and don't block on the file step.
- Optionally follow up with the original and enhanced prompt (see Response Format).
Prompt enhancement rules
Good image prompts are specific and sensory. When enhancing a prompt, look for opportunities to
add (without changing what the user actually asked for):
- Style — realistic photo, anime, digital painting, watercolor, 3D render, pixel art, etc.
- Lighting — cinematic lighting, golden hour, volumetric light, soft studio light, neon glow
- Composition / camera angle — wide shot, close-up, low angle, aerial view, rule of thirds
- Environment / setting — where the scene takes place and what's around the subject
- Color palette — vibrant, muted, monochrome, pastel, high contrast
- Quality descriptors — highly detailed, ultra detailed, masterpiece, 8k, sharp focus
- Artistic extras — mood, atmosphere, texture, small storytelling details
How much to change:
- If the request is short and vague ("cat astronaut", "dragon over tokyo"), do a full rewrite
into a rich, vivid prompt across most of the categories above.
- If the user already wrote a detailed prompt, only lightly polish it — add a missing category
or two (e.g. they described the scene but not the lighting), don't restructure what they wrote.
- If the user specifies a style (anime, oil painting, photorealistic, pixel art, etc.), keep that
style — don't override it with a different one.
- If no style is specified, infer one that fits the subject naturally.
- Never change the subject, characters, or core intent of the request. Enhancement adds detail,
it doesn't redirect the idea.
- If the user explicitly asks to use their exact raw prompt (e.g. "use exactly this prompt",
"don't change my wording"), skip enhancement and encode their text as-is.
Examples
User: cat astronaut
Enhanced: Cute orange cat astronaut standing on the moon wearing a futuristic spacesuit, Earth visible in the background, cinematic lighting, ultra detailed digital art, masterpiece, vibrant colors, 8k.
User: dragon over tokyo
Enhanced: Epic fantasy artwork of a gigantic glowing dragon flying above futuristic Tokyo at night, neon signs illuminating the city, dramatic clouds, volumetric lighting, cinematic composition, highly detailed digital painting, masterpiece, 8k.
User: a golden retriever sitting in a sunlit meadow, photorealistic (already detailed + styled)
Enhanced: A golden retriever sitting in a sunlit meadow, photorealistic, soft golden-hour lighting, shallow depth of field, tall grass swaying gently, warm color palette, sharp focus, high detail. (style kept, only lighting/composition lightly added)
Building the image
scripts/generate_image.py builds the Pollinations URL (handling URL-encoding of the prompt,
since spaces, punctuation, and special characters all need proper percent-encoding) and then
tries to download the resulting image to a local file in one step:
python3 scripts/generate_image.py "Cute orange cat astronaut standing on the moon..." \
--width 1024 --height 1024 --out /mnt/user-data/outputs/cat-astronaut.png
It prints a URL: line (always) and, if the download succeeded, a FILE: line with the saved
path. Use the FILE: path with your file-presenting tool; use the URL: line for the Markdown
embed. If only URL: appears, the download failed (e.g. this environment can't reach
image.pollinations.ai) — that's fine, just use the embed on its own.
Seed — default to random. Each run picks a random seed automatically unless you pass
--seed <n>. This matters because the same prompt + same seed always produces the exact same
image — good when the user wants to iterate on one image (keep the seed fixed while you tweak
the prompt) or reproduce a result, but wrong as a default since most requests expect a fresh
image each time. Only pass an explicit seed when the user is refining/regenerating the same
concept and you want continuity, or when they ask for a specific result to be reproducible.
Width/height — adapt to the request, don't default blindly to square. Read what the image
is for and pick dimensions that fit:
| Use case / hint from the user |
width x height |
| Default / unspecified, general picture |
1024 x 1024 |
| Portrait, phone wallpaper, character art |
768 x 1024 |
| Landscape, scenery, desktop wallpaper |
1024 x 768 |
| Widescreen wallpaper, banner |
1920 x 1080 |
| Icon, avatar, small square asset |
512 x 512 |
These are starting points, not a rigid table — if the user gives an explicit size or ratio,
use that instead.
Response format
Whenever a user requests an image:
- Build the enhanced prompt, then run
generate_image.py to get the URL (and, if possible,
a downloaded file).
- Render the image inline with Markdown image syntax — never paste the raw URL as plain text.
- If a file was downloaded, save it under
/mnt/user-data/outputs/ and present it as a file
too, so there's a reliable way to view it regardless of interface.
- Optionally, underneath the image, briefly show the prompts so the user can see what was generated and tweak it if they want:
🎨 Prompt: <original prompt>
✨ Enhanced Prompt:
<enhanced prompt>
Skip this breakdown for trivial/casual requests where it would feel like clutter — use judgment.
Important rules
- Never send the user's raw, unenhanced prompt to Pollinations unless they explicitly ask for
their exact wording to be used.
- Preserve the user's intent — enhancement adds sensory/technical detail, it never changes who
or what is in the image.
- The final deliverable is the rendered image (and, when possible, a downloadable file) — not
just a link or a URL string.
- Default to a random seed per image; only fix the seed when the user is iterating on one image
or explicitly wants a reproducible result.
- Pick width/height to fit the request (see sizing guide) instead of always using 1024x1024.
- If the user asks for multiple images or variations, generate each with its own enhanced prompt
and let the seed vary naturally (don't reuse the same seed across different variations) and
render each one inline.
1---2name: image-generator3description: Generates images from text descriptions using the Pollinations AI service (no API key required) and displays them directly in the conversation. Use this skill whenever the user asks to create, generate, draw, make, render, or show an image, picture, illustration, artwork, photo, avatar, icon, or any other visual of something — including casual phrasing like "can I get a pic of X", "draw me X", "I need an image for Y", or "what would X look like". Always trigger this even if the user doesn't say the word "image" explicitly but is clearly asking for a picture of something. Do not just describe what an image would look like in words — actually generate and display it with this skill.4---56# Image Generator (Pollinations AI)78Turns a user's request into a rendered image using Pollinations AI's free, keyless image9endpoint. The core idea: users rarely write great image-generation prompts on the first try,10so this skill's job is to translate their intent into a prompt that actually produces a good11image, then show the result — not just hand back a URL.1213## Workflow14151. **Understand the request.** Figure out the subject, whether the user already specified a16 style, mood, or composition, and whether they hint at a particular shape/use for the image17 (portrait, landscape, icon, wallpaper, etc.) — see the sizing guide below.182. **Enhance the prompt** (see rules below).193. **Generate the image** with `scripts/generate_image.py`, which builds the URL and tries to20 download the image to a local file in the same step (see Building the image below).214. **Show the result two ways**, since Markdown image embeds of external URLs don't reliably22 render in every Claude interface:23 - Embed it inline with Markdown image syntax so it shows up immediately if the interface24 supports it: ``25 - If the download succeeded, also save the file to `/mnt/user-data/outputs/` and present it26 as a file (e.g. via `present_files`) so the user has a reliable way to view/download it27 even if the inline embed doesn't render for them.28 - If the download failed (e.g. no network access to `image.pollinations.ai` in this29 environment), fall back to the Markdown embed alone and don't block on the file step.305. Optionally follow up with the original and enhanced prompt (see Response Format).3132## Prompt enhancement rules3334Good image prompts are specific and sensory. When enhancing a prompt, look for opportunities to35add (without changing what the user actually asked for):3637- **Style** — realistic photo, anime, digital painting, watercolor, 3D render, pixel art, etc.38- **Lighting** — cinematic lighting, golden hour, volumetric light, soft studio light, neon glow39- **Composition / camera angle** — wide shot, close-up, low angle, aerial view, rule of thirds40- **Environment / setting** — where the scene takes place and what's around the subject41- **Color palette** — vibrant, muted, monochrome, pastel, high contrast42- **Quality descriptors** — highly detailed, ultra detailed, masterpiece, 8k, sharp focus43- **Artistic extras** — mood, atmosphere, texture, small storytelling details4445**How much to change:**46- If the request is short and vague ("cat astronaut", "dragon over tokyo"), do a full rewrite47 into a rich, vivid prompt across most of the categories above.48- If the user already wrote a detailed prompt, only lightly polish it — add a missing category49 or two (e.g. they described the scene but not the lighting), don't restructure what they wrote.50- If the user specifies a style (anime, oil painting, photorealistic, pixel art, etc.), keep that51 style — don't override it with a different one.52- If no style is specified, infer one that fits the subject naturally.53- Never change the subject, characters, or core intent of the request. Enhancement adds detail,54 it doesn't redirect the idea.55- If the user explicitly asks to use their exact raw prompt (e.g. "use exactly this prompt",56 "don't change my wording"), skip enhancement and encode their text as-is.5758### Examples5960**User:** `cat astronaut`61**Enhanced:** `Cute orange cat astronaut standing on the moon wearing a futuristic spacesuit, Earth visible in the background, cinematic lighting, ultra detailed digital art, masterpiece, vibrant colors, 8k.`6263**User:** `dragon over tokyo`64**Enhanced:** `Epic fantasy artwork of a gigantic glowing dragon flying above futuristic Tokyo at night, neon signs illuminating the city, dramatic clouds, volumetric lighting, cinematic composition, highly detailed digital painting, masterpiece, 8k.`6566**User:** `a golden retriever sitting in a sunlit meadow, photorealistic` (already detailed + styled)67**Enhanced:** `A golden retriever sitting in a sunlit meadow, photorealistic, soft golden-hour lighting, shallow depth of field, tall grass swaying gently, warm color palette, sharp focus, high detail.` (style kept, only lighting/composition lightly added)6869## Building the image7071`scripts/generate_image.py` builds the Pollinations URL (handling URL-encoding of the prompt,72since spaces, punctuation, and special characters all need proper percent-encoding) and then73tries to download the resulting image to a local file in one step:7475```bash76python3 scripts/generate_image.py "Cute orange cat astronaut standing on the moon..." \77 --width 1024 --height 1024 --out /mnt/user-data/outputs/cat-astronaut.png78```7980It prints a `URL:` line (always) and, if the download succeeded, a `FILE:` line with the saved81path. Use the `FILE:` path with your file-presenting tool; use the `URL:` line for the Markdown82embed. If only `URL:` appears, the download failed (e.g. this environment can't reach83`image.pollinations.ai`) — that's fine, just use the embed on its own.8485**Seed — default to random.** Each run picks a random seed automatically unless you pass86`--seed <n>`. This matters because the same prompt + same seed always produces the exact same87image — good when the user wants to iterate on one image (keep the seed fixed while you tweak88the prompt) or reproduce a result, but wrong as a default since most requests expect a fresh89image each time. Only pass an explicit seed when the user is refining/regenerating the same90concept and you want continuity, or when they ask for a specific result to be reproducible.9192**Width/height — adapt to the request, don't default blindly to square.** Read what the image93is *for* and pick dimensions that fit:9495| Use case / hint from the user | width x height |96|---|---|97| Default / unspecified, general picture | 1024 x 1024 |98| Portrait, phone wallpaper, character art | 768 x 1024 |99| Landscape, scenery, desktop wallpaper | 1024 x 768 |100| Widescreen wallpaper, banner | 1920 x 1080 |101| Icon, avatar, small square asset | 512 x 512 |102103These are starting points, not a rigid table — if the user gives an explicit size or ratio,104use that instead.105106## Response format107108Whenever a user requests an image:1091101. Build the enhanced prompt, then run `generate_image.py` to get the URL (and, if possible,111 a downloaded file).1122. Render the image inline with Markdown image syntax — never paste the raw URL as plain text.1133. If a file was downloaded, save it under `/mnt/user-data/outputs/` and present it as a file114 too, so there's a reliable way to view it regardless of interface.1154. Optionally, underneath the image, briefly show the prompts so the user can see what was generated and tweak it if they want:116117```118🎨 Prompt: <original prompt>119120✨ Enhanced Prompt:121<enhanced prompt>122```123124Skip this breakdown for trivial/casual requests where it would feel like clutter — use judgment.125126## Important rules127128- Never send the user's raw, unenhanced prompt to Pollinations unless they explicitly ask for129 their exact wording to be used.130- Preserve the user's intent — enhancement adds sensory/technical detail, it never changes who131 or what is in the image.132- The final deliverable is the rendered image (and, when possible, a downloadable file) — not133 just a link or a URL string.134- Default to a random seed per image; only fix the seed when the user is iterating on one image135 or explicitly wants a reproducible result.136- Pick width/height to fit the request (see sizing guide) instead of always using 1024x1024.137- If the user asks for multiple images or variations, generate each with its own enhanced prompt138 and let the seed vary naturally (don't reuse the same seed across different variations) and139 render each one inline.