skills/generate-image/SKILL.md
Generate images from text prompts via Google Gemini (Nano Banana 2). Outputs PNG files. Use for thumbnails, slide imagery, infographic assets, social cards, or standalone image generation.
npx skillsauth add RonanCodes/ronan-skills generate-imageInstall 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.
Produce images from text prompts using Google Gemini's image generation model (Nano Banana 2). Outputs PNG files to a specified path or to the vault's artifacts directory.
/generate-image "a flat illustration of an e-commerce dashboard" [--output <path>] [--size <WxH>] [--count <n>]
/generate-image "product comparison infographic" --vault <name> --for <artifact-type>
--output — output path. Default: /tmp/generate-image-<timestamp>.png.--size — image dimensions. Default: 1024x1024. Options: 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait).--count — number of images to generate (1-4). Default: 1.--vault — save output to vaults/<vault>/artifacts/images/.--for — context hint: thumbnail, slide, infographic, social-card. Adjusts the system prompt for better results.--style — style modifier: flat, photorealistic, diagram, illustration, icon. Default: auto-detected from prompt.if [ -z "$GEMINI_API_KEY" ]; then
echo "❌ GEMINI_API_KEY not set."
echo ""
echo "Get your key at: https://aistudio.google.com/apikey"
echo "Then set it: export GEMINI_API_KEY=AI..."
echo "Or add to: ~/.claude/.env"
exit 1
fi
Enhance the user's raw prompt with context based on --for and --style:
BASE_PROMPT="$USER_PROMPT"
# Add style context
case "$FOR_CONTEXT" in
thumbnail)
SYSTEM_HINT="Create a clean, eye-catching thumbnail image suitable for a video or article card. Bold visuals, minimal text, high contrast."
;;
slide)
SYSTEM_HINT="Create a presentation slide background or illustration. Clean, professional, with space for overlaid text. Use dark backgrounds (#0f172a) with accent colors (amber #e0af40, cyan #5bbcd6, green #7dcea0)."
;;
infographic)
SYSTEM_HINT="Create a visual element for an infographic. Flat design, clear iconography, data-visualization style. Use amber (#e0af40), cyan (#5bbcd6), green (#7dcea0) on dark (#0f172a)."
;;
social-card)
SYSTEM_HINT="Create a social media card image (LinkedIn/Twitter). Professional, branded feel. 1200x630 optimal aspect ratio."
;;
*)
SYSTEM_HINT=""
;;
esac
case "$STYLE" in
flat) STYLE_HINT="Flat design style with solid colors and clean shapes." ;;
photorealistic) STYLE_HINT="Photorealistic style with natural lighting and textures." ;;
diagram) STYLE_HINT="Technical diagram style with clean lines and labels." ;;
illustration) STYLE_HINT="Hand-drawn illustration style with soft lines." ;;
icon) STYLE_HINT="Simple icon style, minimal detail, bold shapes." ;;
*) STYLE_HINT="" ;;
esac
FULL_PROMPT="$SYSTEM_HINT $STYLE_HINT $BASE_PROMPT"
OUTPUT="${OUTPUT_PATH:-/tmp/generate-image-$(date +%s).png}"
MODEL="nano-banana-pro-preview" # Nano Banana 2 — image generation
# Gemini image generation via the generateContent endpoint with image output
RESPONSE=$(curl -s "https://generativelanguage.googleapis.com/v1beta/models/${MODEL}:generateContent?key=${GEMINI_API_KEY}" \
-H "Content-Type: application/json" \
-d "$(cat <<PAYLOAD
{
"contents": [{
"parts": [{
"text": "$FULL_PROMPT"
}]
}],
"generationConfig": {
"responseModalities": ["TEXT", "IMAGE"]
}
}
PAYLOAD
)")
# Extract the base64 image data from the response
IMAGE_DATA=$(echo "$RESPONSE" | python3 -c "
import json, sys, base64
data = json.load(sys.stdin)
parts = data.get('candidates', [{}])[0].get('content', {}).get('parts', [])
for part in parts:
if 'inlineData' in part:
print(part['inlineData']['data'])
break
")
if [ -z "$IMAGE_DATA" ]; then
echo "❌ Image generation failed. API response:"
echo "$RESPONSE" | python3 -m json.tool 2>/dev/null || echo "$RESPONSE"
exit 1
fi
echo "$IMAGE_DATA" | base64 -d > "$OUTPUT"
if [ "$COUNT" -gt 1 ]; then
BASE="${OUTPUT%.png}"
mv "$OUTPUT" "${BASE}-1.png"
for i in $(seq 2 "$COUNT"); do
# Re-call API with slight prompt variation
VARIED_PROMPT="$FULL_PROMPT (variation $i of $COUNT, different composition)"
# ... same API call as Step 3 ...
echo "$IMAGE_DATA" | base64 -d > "${BASE}-${i}.png"
done
fi
if [ -n "$VAULT_NAME" ]; then
VAULT_DIR="vaults/$VAULT_NAME"
IMG_DIR="$VAULT_DIR/artifacts/images"
mkdir -p "$IMG_DIR"
SLUG=$(echo "$USER_PROMPT" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | cut -c1-50)
DATE=$(date +%Y-%m-%d)
DEST="$IMG_DIR/${SLUG}-${DATE}.png"
cp "$OUTPUT" "$DEST"
# Write sidecar
cat > "${DEST%.png}.meta.yaml" <<EOF
generator: [email protected]
generated-at: $(date -u +"%Y-%m-%dT%H:%M:%SZ")
model: $MODEL
prompt: "$USER_PROMPT"
style: ${STYLE:-auto}
for: ${FOR_CONTEXT:-standalone}
size: ${SIZE:-1024x1024}
EOF
OUTPUT="$DEST"
fi
✅ Image generated
Prompt: <first 80 chars of prompt>...
Model: nano-banana-pro-preview (Nano Banana 2)
Size: <WxH>
Style: <style>
Output: <output path>
Open: open <output path>
| Variable | Required | Default | Description |
|----------|----------|---------|-------------|
| GEMINI_API_KEY | yes | — | API key from aistudio.google.com/apikey |
Gemini image generation pricing (as of 2026):
When --for slide, --for infographic, or --for social-card is used, the prompt automatically includes the Observatory palette:
#e0af40 — for headings and highlights#5bbcd6 — for engine/process elements#7dcea0 — for outputs and positive indicators#0f172aThis keeps generated images visually consistent with other artifacts.
generate-slides — can call this to generate slide background imagesgenerate-infographic — can use generated images as visual elements in SVG infographicsgenerate-video — thumbnail generation for video artifacts.claude/skills/generate-infographic/SKILL.md — SVG infographic that could use generated images.claude/skills/generate-slides/SKILL.md — slide deck that could use background imagesdevelopment
Close the loop on a Linear ticket when its work ships - move the status and post a deploy comment with the PR link, what shipped, and a try-it link, mentioning the collaborator. Used as the tail of /ro:linear-nightshift for every merged mirror, or manually after an ad-hoc build. Triggers on "linear update", "update the linear ticket", "mark NUT-x done", "tell eoin it shipped", "/ro:linear-update".
devops
Run a night-shift against a collaborator's Linear board. Pulls the team's Grilled tickets (/ro:linear-grill moves a ticket to Grilled once its questions are answered), VERIFIES the questions were actually answered (unanswered → bounce the ticket to the "Question for <name>" state), mirrors verified tickets to ephemeral GitHub issues with ready-for-agent, then runs the standard /ro:night-shift machinery on GitHub. Tail-calls /ro:linear-update for everything that merged + deployed. Triggers on "linear nightshift", "nightshift linear", "drain the linear board", "run the shift off linear", "/ro:linear-nightshift".
development
Grill a collaborator's Linear tickets and move every processed ticket to where it belongs. Resolves the board from the repo's .ro-linear.json, reads the collaborator's Backlog / Ready-for-agent issues, then per ticket either posts 3-5 decision-extracting questions (state moves to "Question for <name>") or confirms it build-ready (state moves to "Grilled", the gate /ro:linear-nightshift consumes); shipped-and-confirmed tickets close as Done. The async-collaborator counterpart of /ro:day-shift for people who never touch GitHub. Triggers on "grill linear", "grill eoin's tickets", "linear grill", "add questions to the linear tickets", "/ro:linear-grill".
development
--- name: about-page description: Add a standard About page to any web app, what it is, the tech stack, and an FAQ, wired into a footer link with a sticky footer. Built with Spartan + Tailwind (the canonical component layer) and falls back to semantic HTML so it ships reliably. Use whenever building, polishing, or shipping an app, every app should have one. Triggers on "add an about page", "about page", "footer about link", or as a standard step in app build/polish. category: frontend argument-h