Image Gen Letterbox — Communication skill for Claude Code
Claude Code skill: letterbox-and-crop trick for generating non-standard aspect ratios (YouTube banners, Twitter headers, ultra-wide/tall formats) with Gemini Image / nano-banana models.
How to install Image Gen Letterbox
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open SilantevBitcoin/image-gen-letterbox and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Image Gen Letterbox does
Claude Code skill: letterbox-and-crop trick for generating non-standard aspect ratios (YouTube banners, Twitter headers, ultra-wide/tall formats) with Gemini Image / nano-banana models.
Alternatives in Communication
- Summarize Tweets — X/Twitter Summary Prompt 3.2k ★
- X Research Skill — X/Twitter research skill for Claude Code and OpenClaw 974 ★
- Opencli Skill — Use opencli CLI to interact with social/content websites (Bilibili, Zhihu, Twitter/X, YouTube, Weibo, 小红书, V2E 804 ★
README
image-gen-letterbox
A [Claude Code](https://claude.com/claude-code) skill that teaches the assistant how to generate images in **non-standard aspect ratios** (YouTube banners, Twitter/X headers, LinkedIn banners, ultra-wide or ultra-tall formats) via Gemini / nano-banana / gemini-3-pro-image-preview and similar "Banana" family image models.
The problem
Gemini image models only accept a fixed set of aspect ratios:
1:1 16:9 9:16 4:3 3:4
Ask for anything else and the model:
- Silently picks the nearest supported ratio and ignores your intended framing.
- "Creatively" regenerates the scene and destroys the composition you wanted to preserve.
- Stops honoring spatial instructions in the prompt ("top-left corner", "right third", ...) because it's reasoning about its own frame, not yours.
So a YouTube channel banner at 2560×423 (≈ 6:1), a Twitter header at 1500×500 (3:1), or any other non-standard shape simply does not work out of the box.
The fix (letterbox trick)
Always work inside a standard ratio:
- Pick the standard ratio that contains your target with the least padding (16:9 for ultra-wide, 9:16 for ultra-tall, ...).
- Pad every input image (base, style references) up to the chosen standard ratio with solid black bands.
- Tell the model explicitly that the black bands are padding and must stay empty.
- Run generation at the standard ratio.
- Resize the result back to your letterbox canvas size.
- Crop out the central strip / column — that's your final image at exactly the target size.
The skill contains the full algorithm, sample code, failure modes, and anti-patterns.
Install
Drop the folder into your Claude Code skills directory:
cd ~/.claude/skills
git clone https://github.com/SilantevBitcoin/image-gen-letterbox.git
Claude Code will pick up `SKILL.md` on the next conversation and trigger it automatically when the target aspect ratio is non-standard.
To verify:
ls ~/.claude/skills/image-gen-letter
Related Skills
Backend API
Use when changing the Express and TypeScript backend in server/, including auth, conversations, guest flows, c
Social Post Gen
Generates platform-optimized social media posts for Twitter/X, LinkedIn, Instagram, and TikTok with hashtags a
Nvidia Nim MCP
NVIDIA NIM's free tier in Claude Code - image generation, vision, translation, chat, content safety and embedd
Og Image Skill
Generate social media preview images (Open Graph) and configure all meta tags for optimal sharing on Twitter/X
Plessas Lab
Claude Code plugins lab — Gmail, YouTube, Apple Notes, image generation, and Teams monitoring
AIRelays
Independent OpenAI-compatible local relay for your own ChatGPT and Claude subscriptions: one standard /v1 API
Related Agents
Nana Image Generator
Use this agent to generate images using the NANA (Nana Banana Pro) image generation model. Handles prompt craf
Asset Generator
AI asset generation agent — connects to image generation APIs (Nano Banana, FAL AI, Replicate), manages asset
Image Craft Expert
Crafts optimized text-to-image prompts and generates images using Gemini (nano-banana) and/or ChatGPT (gpt-ima