Image Gen Letterbox
Description
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.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
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
prompts.chat
| f.k.a. Awesome ChatGPT Prompts. Share, discover, and collect prompts from the community. Free and open sourc
Communication Internal Comms
Write internal communications like status reports, newsletters, and FAQs
Communication mcp-server-slack
Slack workspace integration.
Communication Google Workspace Groups Settings
Manage Google Groups settings
Communication Open Saas
A 100% free modern JS SaaS boilerplate (React, NodeJS, Prisma). Full-featured: Auth (email, google, github, sl
slack
| Communication | Slack integration via HTTP/OAuth MCP |
Communication