
Nano Banana Poster
- 59 installs
- 44 repo stars
- Updated July 8, 2026
- aviz85/claude-skills-library
Nano Banana Poster is a Claude skill that generates images and marketing posters with Google Gemini from text prompts and optional reference assets.
About
Nano Banana Poster generates images and marketing posters with Google Gemini. A developer runs its TypeScript script with a prompt, an optional aspect ratio, and optional reference assets to produce a poster image. It can save good results to a gallery for style reuse and documents special prompt wording for Hebrew RTL content.
- Generates images and posters with Google Gemini, optionally using reference assets
- Supports 5 aspect ratios and a save-to-gallery option for style reuse
- Documents explicit Hebrew RTL prompt handling for correct text and flow
Nano Banana Poster by the numbers
- 59 all-time installs (skills.sh)
- Ranked #869 of 1,337 Generative Media skills by installs in the Skillselion catalog
- Data as of Jul 28, 2026 (Skillselion catalog sync)
nano-banana-poster capabilities & compatibility
byo-api-key (Gemini free tier has usage limits)
- Capabilities
- image generation · poster design
- Use cases
- image generation
- Pricing
- Bring your own API key
What nano-banana-poster says it does
Generate images using Google's Gemini model with optional reference assets.
Generate images and posters with Google Gemini. Use for: create image, generate visual, AI image generation, marketing poster.
Save good results for future style reference:
npx skills add https://github.com/aviz85/claude-skills-library --skill nano-banana-posterAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 59 |
|---|---|
| repo stars | ★ 44 |
| Last updated | July 8, 2026 |
| Repository | aviz85/claude-skills-library ↗ |
What it does
Generating images and marketing posters from prompts with Google Gemini, with aspect-ratio and reference-asset options.
Who is it for?
Generating marketing posters and images with Gemini from a prompt, including Hebrew RTL content.
Skip if: Video generation or providers other than Gemini, or use without a Gemini API key.
When should I use this skill?
When the user wants to create an image, generate a visual, or make a marketing poster.
What you get
A generated poster image at a chosen aspect ratio, optionally using reference assets, saved as a jpg.
- a generated poster jpg image
By the numbers
- 5 aspect ratios supported
- 1K (1024px) output quality
Files
Nano Banana Poster Generator
First time? Ifsetup_complete: falseabove, run./SETUP.mdfirst, then setsetup_complete: true.
Generate images using Google's Gemini model with optional reference assets.
Quick Start
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 |
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:
# 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:
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_hereHebrew/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)
Brand Name: YOUR_BRAND_NAME
Mission: YOUR_MISSION_STATEMENT
Color Palette (Example Hex Values):
- Gray Scale:
- Gray 400: #9CA3AF (rgb(156, 163, 175))
- Gray 500: #6B7280 (rgb(107, 114, 128))
- Gray 600: #4B5563 (rgb(75, 85, 99))
- Gray 700: #374151 (rgb(55, 65, 81))
- Gray 900: #111827 (rgb(17, 24, 39))
- Green Scale (example accent):
- Green 500: #22C55E (rgb(34, 197, 94))
- Green 600: #16A34A (rgb(22, 163, 74))
- Green 700: #158235 (rgb(21, 128, 61))
- Green 800: #166534 (rgb(22, 101, 52))
- Green 900: #14532D (rgb(20, 83, 45))
Primary Colors: Customize to your brand
Accent Color: Customize to your brand
Visual Style: Professional, educational, tech-forward (customize as needed)
Avatar: Place your avatar as references/avatar.jpg for personal branding
// To run this code you need to install the following dependencies:
// npm install @google/genai mime dotenv
// npm install -D @types/node typescript ts-node
import {
GoogleGenAI,
createUserContent,
createPartFromUri,
} from '@google/genai';
import mime from 'mime';
import { writeFile } from 'fs';
import * as dotenv from 'dotenv';
import * as path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Load environment variables
dotenv.config();
function saveBinaryFile(fileName: string, content: Buffer) {
writeFile(fileName, content, 'utf8', (err) => {
if (err) {
console.error(`Error writing file ${fileName}:`, err);
return;
}
console.log(`File ${fileName} saved to file system.`);
});
}
// Parse command line arguments
function parseArgs(args: string[]): { prompt: string; aspectRatio: string; assets: string[] } {
let aspectRatio = '3:2'; // default - best for most social media
let assets: string[] = [];
let promptParts: string[] = [];
for (let i = 0; i < args.length; i++) {
if (args[i] === '--aspect' || args[i] === '-a') {
if (args[i + 1]) {
aspectRatio = args[i + 1];
i++; // skip next arg
}
} else if (args[i] === '--assets') {
if (args[i + 1]) {
// Support comma-separated assets or full paths
assets = args[i + 1].split(',').map(a => a.trim());
i++; // skip next arg
}
} else {
promptParts.push(args[i]);
}
}
return { prompt: promptParts.join(' '), aspectRatio, assets };
}
async function main() {
// Get prompt and options from command-line arguments
const { prompt, aspectRatio, assets } = parseArgs(process.argv.slice(2));
if (!prompt) {
console.error('Error: Please provide a prompt as a command-line argument');
console.error('Usage: npx ts-node generate_poster.ts [--aspect RATIO] [--assets PATH] "your prompt here"');
console.error('');
console.error('Options:');
console.error(' --aspect, -a Aspect ratio (1:1, 3:2, 2:3, 16:9, 9:16) - default: 3:2');
console.error(' --assets Comma-separated paths to reference images');
console.error('');
console.error('Examples:');
console.error(' npx ts-node generate_poster.ts "A sunset over mountains"');
console.error(' npx ts-node generate_poster.ts --aspect 16:9 "A wide landscape"');
console.error(' npx ts-node generate_poster.ts --assets "/path/to/avatar.jpg" "Create poster with this character"');
console.error(' npx ts-node generate_poster.ts --assets "/path/a.jpg,/path/b.png" "Use both images"');
process.exit(1);
}
// Validate aspect ratio
const validRatios = ['1:1', '3:2', '2:3', '16:9', '9:16'];
if (!validRatios.includes(aspectRatio)) {
console.error(`Error: Invalid aspect ratio "${aspectRatio}"`);
console.error(`Valid options: ${validRatios.join(', ')}`);
process.exit(1);
}
console.log(`Aspect ratio: ${aspectRatio}`);
if (assets.length > 0) {
console.log(`Assets: ${assets.join(', ')}`);
}
if (!process.env.GEMINI_API_KEY) {
console.error('Error: GEMINI_API_KEY not found in environment variables');
console.error('Please create a .env file with GEMINI_API_KEY=your_api_key');
process.exit(1);
}
const ai = new GoogleGenAI({
apiKey: process.env.GEMINI_API_KEY,
});
// Upload asset images if provided
const uploadedAssets: Array<{ name: string; uri: string; mimeType: string }> = [];
for (const assetPath of assets) {
try {
console.log(`Uploading asset: ${assetPath}...`);
const uploaded = await ai.files.upload({
file: assetPath,
config: { mimeType: mime.getType(assetPath) || 'image/jpeg' },
});
uploadedAssets.push({
name: uploaded.name,
uri: uploaded.uri,
mimeType: uploaded.mimeType || 'image/jpeg',
});
console.log(`Asset uploaded successfully: ${uploaded.name}`);
} catch (error) {
console.error(`Warning: Could not upload asset ${assetPath}:`, error);
}
}
const config = {
responseModalities: [
'IMAGE',
'TEXT',
],
imageConfig: {
aspectRatio: aspectRatio,
imageSize: '1K', // default quality
},
};
const model = 'gemini-3-pro-image-preview';
// Build content parts - include uploaded assets first, then prompt
const contentParts: Array<any> = [];
for (const asset of uploadedAssets) {
contentParts.push(createPartFromUri(asset.uri, asset.mimeType));
}
if (uploadedAssets.length > 0) {
contentParts.push('Use the provided reference image(s) as specified in the prompt.');
}
contentParts.push(prompt);
const contents = createUserContent(contentParts);
console.log(`Generating poster with prompt: "${prompt}"`);
const response = await ai.models.generateContentStream({
model,
config,
contents,
});
let fileIndex = 0;
for await (const chunk of response) {
if (!chunk.candidates || !chunk.candidates[0].content || !chunk.candidates[0].content.parts) {
continue;
}
if (chunk.candidates?.[0]?.content?.parts?.[0]?.inlineData) {
const fileName = `poster_${fileIndex++}`;
const inlineData = chunk.candidates[0].content.parts[0].inlineData;
const fileExtension = mime.getExtension(inlineData.mimeType || '');
const buffer = Buffer.from(inlineData.data || '', 'base64');
saveBinaryFile(`${fileName}.${fileExtension}`, buffer);
}
else {
console.log(chunk.text);
}
}
// Clean up: delete uploaded asset files
for (const asset of uploadedAssets) {
try {
await ai.files.delete({ name: asset.name });
console.log(`Asset ${asset.name} cleaned up from server.`);
} catch (error) {
console.error(`Warning: Could not delete asset ${asset.name}:`, error);
}
}
}
main();
{
"name": "scripts",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "module",
"dependencies": {
"@google/genai": "^1.34.0",
"@types/node": "^25.0.3",
"dotenv": "^17.2.3",
"mime": "^4.1.0",
"ts-node": "^10.9.2",
"typescript": "^5.9.3"
}
}
{
"compilerOptions": {
"target": "ES2022",
"module": "ESNext",
"lib": ["ES2022"],
"skipLibCheck": true,
"esModuleInterop": true,
"allowSyntheticDefaultImports": true,
"strict": false,
"forceConsistentCasingInFileNames": true,
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"outDir": "./dist"
},
"ts-node": {
"esm": true
},
"include": ["*.ts"],
"exclude": ["node_modules"]
}
Nano Banana Poster - Setup Guide
Prerequisites
- Google Cloud account (for Gemini API)
- Node.js installed
1. Get Gemini API Key
1. Go to Google AI Studio 2. Sign in with Google account 3. Click "Get API Key" 4. Create new key or use existing
2. Configure Credentials
Create .env in scripts/ folder:
GEMINI_API_KEY=your_api_key_here3. Install Dependencies
cd scripts/
npm install4. Test
# Basic generation
npx ts-node generate_poster.ts "A beautiful sunset over mountains"Output will be saved as poster_0.jpg in current directory.
Troubleshooting
| Issue | Solution |
|---|---|
| 401 error | Check API key |
| Rate limited | Wait a few minutes, or check quota |
| Image not generated | Check prompt for safety filters |
Notes
- Free tier has usage limits
- Some prompts may be filtered for safety
- Images are 1024px on longest edge