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 imagestesting
--- name: linear-pipeline description: The Fable orchestrator for a single dispatched Linear ticket. Holds almost no context itself; it receives `--issue <ID> --detached`, decides the stage sequence, and fans out a sub-agent per stage, passing forward only each stage's artifact (never re-derived, never inlined into its own context). Step zero, before any planning or stage routing, is a boundary triage against `canon/security-boundary.md` (#199): a match tags Ronan Connolly and stops the run, no
development
--- name: in-your-face description: Capture a chat-only answer into a durable artifact (markdown + HTML, PDF when cheap) and launch it automatically so the user cannot miss it. Use when user says "in your face", "don't let me lose this", "save that answer", "make that durable", or right after answering a substantive side question (a recipe, comparison, how-to, or generated prompt) that would otherwise die with the context. category: workflow argument-hint: [--no-open] [--vault <short>] [hint of
tools
One-shot headless OpenAI Codex CLI calls for background/admin AI tasks — summaries, classification, extraction, admin glue. The default engine for anything that runs AI constantly in the background (daemon-driven, per-event), because it bills the flat ChatGPT subscription instead of Claude usage or per-token API spend, and it keeps working while Claude is rate-limited. NEVER for coding — coding stays Claude. Use when a skill or daemon needs a cheap always-on AI call, when the user says "use codex", "ask codex", "codex as backup", or when building a background summarizer/classifier into a listener or loop. Reads auth from ~/.codex/auth.json (ChatGPT account, no API key).
research
Turn a warranty rejection, repair quote, or RMA email into a cited decision brief — legal read (NL/EU consumer law), is the part user-serviceable, live part and new-unit prices, repair-vs-DIY-vs-new economics, before-you-send-it checklist, deadlines. Use when the user pastes or screenshots a repair quote, warranty rejection, "not covered" email, onderzoekskosten fee, or asks "should I repair or replace this".