home / skills / aviz85 / claude-skills-library / nano-banana-poster

This skill helps you generate eye-catching posters using Google's Gemini, with configurable aspect ratios and assets, saving time on marketing visuals.

npx playbooks add skill aviz85/claude-skills-library --skill nano-banana-poster

Review the files below or copy the command above to add this skill to your agents.

Files (7)
skill.md
3.1 KB
---
name: nano-banana-poster
description: "Generate images and posters with Google Gemini. Use for: create image, generate visual, AI image generation, marketing poster."
version: "1.0.0"
author: aviz85
tags:
  - image-generation
  - ai
  - gemini
  - poster
  - visual
setup: "./SETUP.md"
setup_complete: false
---

# Nano Banana Poster Generator

> **First time?** If `setup_complete: false` above, run `./SETUP.md` first, then set `setup_complete: true`.

Generate images using Google's Gemini model with optional reference assets.

## Quick Start

```bash
cd ~/.claude/skills/nano-banana-image/scripts

# Basic generation (default 3:2 horizontal)
npx ts-node generate_poster.ts "A futuristic city at sunset"

# With aspect ratio (3:2 horizontal, 2:3 vertical, 16:9 wide, 9:16 tall)
npx ts-node generate_poster.ts --aspect 3:2 "A wide landscape poster"
npx ts-node generate_poster.ts -a 9:16 "A vertical story format"

# With reference assets
npx ts-node generate_poster.ts --assets "my-logo" "Create banner with logo"

# Combined: aspect ratio + assets
npx ts-node generate_poster.ts --aspect 16:9 --assets "logo" "YouTube thumbnail"
```

## Aspect Ratio

**IMPORTANT:** Always use the default 3:2 aspect ratio unless the user explicitly requests a different format (like "vertical", "story", "square", etc.). Do NOT change the aspect ratio on your own.

Control image dimensions with `--aspect` or `-a`:

| Ratio | Use Case |
|-------|----------|
| `3:2` | Horizontal **(DEFAULT - use this unless user specifies otherwise)** |
| `1:1` | Square - Instagram, profile pics |
| `2:3` | Vertical - Pinterest, posters |
| `16:9` | Wide - YouTube thumbnails, headers |
| `9:16` | Tall - Stories, reels, TikTok |

```bash
npx ts-node generate_poster.ts --aspect 3:2 "Your prompt"
npx ts-node generate_poster.ts -a 16:9 "Your prompt"
```

## Adding Assets

Use `--assets` with full paths to include reference images:

```bash
# Single asset
npx ts-node generate_poster.ts --assets "/full/path/to/image.jpg" "Your prompt"

# Multiple assets (comma-separated)
npx ts-node generate_poster.ts --assets "/path/a.jpg,/path/b.png" "Use both images"
```

**Supported formats:** `.jpg`, `.jpeg`, `.png`, `.webp`, `.gif`

**IMPORTANT:** Assets are NOT automatically included. You must explicitly pass them via `--assets`.

## Save to Gallery

Save good results for future style reference:

```bash
npx ts-node generate_poster.ts --save-to-gallery "my-style" "prompt"
```

Creates `assets/gallery/my-style.jpg` + `.meta.json` with prompt info.

## API Configuration

Create `scripts/.env`:
```
GEMINI_API_KEY=your_api_key_here
```

## Hebrew/RTL Content

When generating images with Hebrew text:

**ALWAYS include in prompt:**
```
CRITICAL: All text must be in Hebrew.
CRITICAL: Layout direction is RTL (right-to-left).
Flow, reading order, and visual hierarchy must go from RIGHT to LEFT.
```

This ensures text renders correctly and visual flow matches Hebrew reading direction.

## Output

- Files saved as `poster_0.jpg`, `poster_1.jpg`, etc.
- Aspect ratio: Configurable via `--aspect` (default: 3:2)
- Quality: 1K (1024px on longest edge)

Overview

This skill generates high-quality posters and images using Google Gemini with optional reference assets and configurable aspect ratios. It is focused on marketing visuals, thumbnails, and social posts, producing 1K output images and saving results to a gallery for reuse. The tool enforces a default 3:2 horizontal format unless a different ratio is explicitly requested.

How this skill works

You provide a text prompt and optional reference assets; the generator calls Google Gemini to produce images and saves files like poster_0.jpg. Control output shape with an --aspect flag (default 3:2) and include assets by passing full file paths. Use --save-to-gallery to store chosen results and prompt metadata for later style reference.

When to use it

  • Create marketing posters, event banners, or product visuals quickly from a text prompt.
  • Generate social media assets (thumbnails, Instagram squares, story/tall formats) with precise aspect control.
  • Compose images that incorporate existing logos or reference photos by supplying asset paths.
  • Save and reuse visual styles by adding successful outputs to a local gallery.
  • Produce right-to-left language posters (Hebrew) while ensuring correct text and layout direction.

Best practices

  • Keep the default 3:2 ratio unless the user explicitly requests another format (e.g., 9:16 for stories).
  • Pass assets explicitly with full file paths; assets are not included automatically.
  • For RTL languages, include explicit instructions in the prompt about text language and RTL layout to ensure correct rendering.
  • Use descriptive prompts with style, color, and composition hints to get predictable results.
  • Save strong results to the gallery with --save-to-gallery to build a reusable visual library.

Example use cases

  • Generate a YouTube thumbnail by specifying --aspect 16:9 and a short, punchy prompt.
  • Create a vertical poster for Pinterest using --aspect 2:3 and an image asset for branding.
  • Produce an Instagram square post with --aspect 1:1 and a brand logo passed via --assets.
  • Design a Hebrew event poster by including RTL instructions in the prompt and confirming Hebrew text.
  • Batch-generate variations of a campaign visual, then save the preferred style to assets/gallery for future runs.

FAQ

What aspect ratio should I use by default?

Use the default 3:2 horizontal unless you explicitly need another format such as 1:1, 2:3, 16:9, or 9:16.

How do I include my logo or reference images?

Pass full local file paths with the --assets flag; multiple assets can be provided as comma-separated paths.

How do I generate correct Hebrew text and layout?

Include explicit prompt instructions: require all text in Hebrew and state that layout direction is RTL so reading order and visual flow go right-to-left.