Back to The Vault
Pillar · Meta Ads OS
01

The Static Ads Engine

Generate 100+ on-brand Meta ads in 30 minutes for under $15.

Published May 5, 2026 · 13 min read

Last Tuesday, a woman named Priya who runs a Shopify supplement brand out of her apartment in Fort Lauderdale opened a terminal window, typed one sentence, and watched Claude Code generate 64 static Meta ad variations in 28 minutes. Each one matched her brand colors. Each one had readable text. Each one cost her about seven cents to produce.

Before this, Priya was paying a freelance designer $400 a month for eight static ad variations. Eight. She’d get them on a Thursday, upload them Friday, and by the following Wednesday, three of them would be dead from creative fatigue. The other five were never good to begin with.

This is the playbook for the system Priya built. It runs on Claude Code and an image model called Nano Banana 2, and it costs less per month than the iced coffee you bought this morning.

Here’s what we’re building, step by step.


Why Most AI Ad Generation Is Slop (And Why This Isn’t)

The standard advice is “use AI to generate ads.” The standard result is 50 variations that all look like they were made by the same polite robot having a stroke. Same layout. Same vague headline. Same stock-photo energy. Meta’s algorithm sees this garbage, flags it as low quality, and charges you more per impression as punishment.

The problem isn’t AI. The problem is how people use it. They type “make me a Facebook ad for my protein powder” and expect magic. What they get is slop.

This system works differently because it uses a creative matrix. Instead of random generation, you define the strategic inputs first: your hooks, your audience personas, your visual styles. Then you cross-multiply them into a structured set of variations where every ad has a specific hypothesis behind it. Four hooks times four personas times two visual styles equals 32 unique ads, each one testing a different angle. That’s not slop. That’s a testing framework.

The second reason this works: skill files. A Claude Code skill file is a markdown document that gives Claude persistent instructions for a specific task. You build one for Nano Banana’s API (so it knows how to call the image model correctly) and one for your brand (so every output matches your colors, fonts, and tone). Once those skills exist, Claude doesn’t forget your brand guidelines halfway through a batch. It references them on every single generation.


What You Need Before You Start

Let’s get the prerequisites out of the way. You need four things:

1. Claude Code installed on your computer. Claude Code is Anthropic’s command-line tool. It runs in your terminal (Mac Terminal, Windows PowerShell, or Linux shell). If you’ve never used a terminal before, don’t panic. You’ll be typing sentences, not writing code.

To install, open your terminal and run:

npm install -g @anthropic-ai/claude-code

If you don’t have npm, you need Node.js first. Download it from nodejs.org, install it, then run the command above.

Once installed, type claude in your terminal. You should see Claude Code’s interface. If you do, you’re good.

2. An Anthropic account with a Claude Pro or Max subscription. Claude Code requires a paid Anthropic plan. Pro is $20/mo. Max is $100/mo (more usage). Either works for this workflow.

3. An OpenRouter API key with credits loaded. OpenRouter is the service that connects Claude Code to Nano Banana 2 (the image model). Here’s the setup:

  • Go to openrouter.ai and create a free account.
  • Click “API Keys” in the menu. Click “Create API Key.” Name it something like “claude-ads.” Copy the key (it starts with sk-or-v1-). Save it somewhere safe.
  • Go to “Credits” and add $5 to start. That’s enough for roughly 75 images at 1K resolution. Credits don’t expire.

4. Your brand assets in a folder. Gather these into one folder on your computer: your logo (PNG, transparent background), your brand colors (hex codes), your fonts (or just the names), 2-3 product photos, and a one-paragraph description of your brand voice.

That’s it. Total setup time: 15-20 minutes if you’re starting from zero.


Step 1: Store Your OpenRouter API Key in Claude Code

Open your terminal. Launch Claude Code by typing claude. Then paste this:

Store this API key from OpenRouter to generate images with Google's Nano Banana 2 
AI image model: sk-or-v1-YOUR_KEY_HERE

Here's the OpenRouter documentation for Nano Banana 2 for more context:
https://openrouter.ai/google/gemini-3.1-flash-image-preview

Claude will store the key and confirm. From now on, it can call Nano Banana 2 on your behalf.

What you should see: Claude responds with something like “I’ve stored the API key. I can now generate images using Nano Banana 2 via OpenRouter.”

If you see an error: Make sure the key starts with sk-or-v1- and that you’ve added credits to your OpenRouter account.


Step 2: Create Your Brand Kit File

This is the most important file in the entire system. Every ad Claude generates will reference it. Spend 10 minutes getting this right.

In Claude Code, type:

Create a file called brand-kit.md in my project directory with the following brand information:

Brand name: [YOUR BRAND NAME]
Product: [WHAT YOU SELL, one sentence]
Brand colors: 
  - Primary: [hex code]
  - Secondary: [hex code]  
  - Accent: [hex code]
  - Background: [hex code]
Logo: [describe where the logo file is, e.g., "./assets/logo.png"]
Fonts:
  - Headlines: [font name]
  - Body: [font name]
Brand voice: [one paragraph describing your tone. Example: "Direct, confident, slightly irreverent. We talk like a smart friend who happens to know a lot about supplements. No corporate speak. No wellness woo."]
Product photos: [list the file paths to 2-3 product images]
Things we never say: [list 3-5 phrases or words that are off-brand]
Things we always include: [e.g., "Always mention the 30-day guarantee"]

Fill in the brackets with your actual brand info. Claude will create the file.

Pro tip: If you already have a website, you can skip most of this. Instead, tell Claude:

Scrape my website at [YOUR URL] and build a brand-kit.md file from what you find. 
Extract brand colors, fonts, tone of voice, key product details, and any visual 
patterns you notice.

Claude will pull your site, analyze it, and build the brand kit automatically. Review it and make corrections.


Step 3: Create the Nano Banana Skill File

A skill file teaches Claude how to do a specific task well, every time. This one teaches it how to call the Nano Banana 2 API with the right parameters.

In Claude Code, type:

Create a Claude Code skill file for generating images with Nano Banana 2. 
The skill should:

1. Use the OpenRouter API endpoint (https://openrouter.ai/api/v1/chat/completions)
2. Use model ID: google/gemini-3.1-flash-image-preview
3. Request image output by setting modalities to ["image", "text"]
4. Default to 1K resolution for drafts and 2K for finals
5. Include best practices:
   - Always reference the brand-kit.md for colors, fonts, and style
   - Generate one image per API call (not multiple)
   - Save images as PNG with descriptive filenames
   - Include the ad concept name in the filename
   - Show a cost estimate before generating a batch
6. Save the skill to .claude/skills/nano-banana-ads.md

Claude will create the skill file and save it. From now on, whenever you ask Claude to generate images, it will follow these rules automatically.

What the skill file looks like inside: It’s a markdown document with YAML frontmatter. The name field tells Claude what it’s called, and the description field tells Claude when to activate it. The body contains the detailed instructions. You don’t need to write this by hand. Claude builds it for you.


Step 4: Create the Static Ad Designer Skill File

This is the second skill file. The first one (Step 3) handles the technical API call. This one handles the creative strategy: what makes a good static ad.

Create a Claude Code skill file called "static-ad-designer" that contains 
these rules for generating Meta static ads:

LAYOUT RULES:
- Every ad must have a clear visual hierarchy: headline, supporting visual, CTA
- Text must be large enough to read on mobile (minimum 48px equivalent)
- Never put text over busy backgrounds without a solid or semi-transparent overlay
- Keep text to 10 words or fewer on the image itself
- Always leave breathing room around text (minimum 20% padding from edges)

COLOR RULES:
- Always pull from brand-kit.md
- High contrast between text and background (WCAG AA minimum)
- CTA buttons in the accent color

COMPOSITION RULES:
- Product should be the visual anchor
- Use the rule of thirds for product placement
- Negative space is your friend, don't fill every corner

FORMAT:
- Default aspect ratio: 1:1 (1080x1080)
- Also generate 4:5 (1080x1350) for feed placement
- PNG format, RGB color space

WHAT TO AVOID:
- Stock photo aesthetic (overly polished, generic people smiling)
- Cluttered layouts with too many elements
- Tiny text that's unreadable in a feed scroll
- Generic headlines that could apply to any product

Save to .claude/skills/static-ad-designer.md

Now you have two skill files working together. The Nano Banana skill handles the “how to generate.” The static ad designer skill handles the “what to generate.” They reference each other automatically.


Step 5: Build Your Creative Matrix

This is where the system goes from “neat tool” to “actual competitive advantage.”

A creative matrix crosses your strategic variables against each other to produce every possible combination. Instead of asking Claude for “some ad ideas,” you’re defining the exact angles you want to test and generating one ad per angle.

Here’s the prompt:

Create a creative matrix for my Meta ads campaign. Use the brand-kit.md 
for all brand details.

HOOKS (the headline angle):
1. Problem-centric: Lead with the pain point the product solves
2. Benefit-centric: Lead with the positive outcome
3. Social proof: Lead with a customer result or testimonial quote
4. Curiosity: Lead with a surprising fact or question

PERSONAS (who we're talking to):
1. [Persona 1 name, age, one-sentence description. Example: "Sarah, 34, 
   busy mom who works out at 5am before the kids wake up"]
2. [Persona 2 name, age, one-sentence description]
3. [Persona 3 name, age, one-sentence description]
4. [Persona 4 name, age, one-sentence description]

VISUAL STYLES:
1. Clean and minimal: white/light background, product centered, bold typography
2. Lifestyle context: product shown in use, real-world setting, warm lighting

Generate every combination of hook x persona x style. That's 4 x 4 x 2 = 32 
unique ad concepts.

For each combination, output:
- A concept name (e.g., "problem_sarah_minimal")
- The headline text (10 words or fewer)
- A one-sentence visual description for the image prompt
- The primary text (what goes in the Meta ad copy field, 2-3 sentences)
- A CTA button label

Save the full matrix as creative-matrix.json in my project directory.

What you should see: Claude generates a JSON file with 32 ad concepts. Each one has a unique angle. Scroll through them. If any feel off, tell Claude what to change. “Make the social proof hooks more specific.” “Persona 3 should sound more skeptical.” This is your testing roadmap.

Why 32 and not 100: Start with 32. Run them. See which hook/persona/style combinations win. Then generate 32 more variations of your top performers. Targeted iteration beats random volume every time.


Step 6: Generate the Ads

Here’s the prompt that kicks off the actual image generation:

Using the creative matrix in creative-matrix.json, generate static ad images 
for every combination. Follow the static-ad-designer skill for layout and 
composition rules.

For each ad:
1. Read the concept from the matrix
2. Generate the image using Nano Banana 2 via the nano-banana-ads skill
3. Save as PNG in ./output/[concept-name].png
4. Generate both 1:1 and 4:5 versions
5. After every 8 images, show me the running cost total

Start with concepts 1-8. Show me those before continuing.

What you should see: Claude starts generating images one by one. Each one appears in your output folder. After the first 8, Claude pauses and shows you the results plus cost.

Expected cost: At ~$0.07 per image (1K resolution), your 32 concepts in two aspect ratios = 64 images = roughly $4.50 total. At 2K resolution, double that to about $9.

Expected time: About 4-6 seconds per image. For 64 images, that’s roughly 5-6 minutes of generation time.

If the images look wrong: This is normal for the first batch. Common fixes:

  • Text is illegible: Tell Claude “increase text size and add a solid background panel behind all headline text.”
  • Colors are off: Tell Claude “reference brand-kit.md more strictly, the background should always be [hex code].”
  • Layout is cluttered: Tell Claude “more negative space, fewer visual elements, product should take up at least 40% of the frame.”
  • The overall style doesn’t match your brand: Tell Claude “update the static-ad-designer skill based on this feedback” and describe what you want. The skill file gets smarter over time.

Step 7: Review, Iterate, Export

Once you have your first 32 concepts (64 images), review them:

Show me all 64 generated images as a contact sheet (grid layout, 8 per row) 
so I can review them quickly. Label each with the concept name.

Pick your top 10-15. Then tell Claude:

Generate 3 variations of each of these concepts: [list the concept names]. 
Keep the same hook and persona but vary the visual composition, text 
placement, and color emphasis. Save to ./output/variations/

That gives you 30-45 more images, all variations of your proven angles. Total cost: another $2-3.

For your final exports:

Take my top 20 selections and regenerate them at 2K resolution for 
production quality. Save to ./output/final/

2K images cost about $0.08-0.10 each. Twenty finals = roughly $2.

Your total spend for this entire session: Under $15 for 100+ ad variations, 20 production-quality finals, and a reusable creative matrix you can run again next month.


Step 8: The Feedback Loop (This Is Where It Compounds)

Here’s what separates a one-time hack from an actual system.

After you run your ads for two weeks, come back to Claude Code with your performance data:

Here are my Meta Ads results for the last 14 days. [Paste or upload your 
CSV export from Meta Ads Manager.]

Analyze which concepts from creative-matrix.json performed best. 
Look at CTR, CPC, and ROAS. Identify:
1. Which hooks performed best overall?
2. Which personas responded most?
3. Which visual style won?
4. Which specific combinations were top 3 and bottom 3?

Then update the creative matrix to double down on winners and drop losers. 
Generate a new matrix for next month's batch.

Claude reads your results, identifies the winning patterns, and builds a new matrix weighted toward what actually worked. The second month’s ads are better than the first. The third month’s are better than the second.

Then update your skill file:

Update my static-ad-designer skill based on what we learned. Add the winning 
patterns as preferred approaches and the losing patterns as things to avoid.

Now the skill file carries forward everything you’ve learned. You don’t start from scratch next month. You start from a smarter baseline.


The Downloadable Artifacts

This pillar comes with three files you can download and drop into your Claude Code project today:

  1. brand-kit-template.md: A pre-structured brand kit template. Fill in your details and you’re ready for Step 2.
  2. nano-banana-ads.md: The Nano Banana 2 skill file, pre-configured for static ad generation via OpenRouter.
  3. static-ad-designer.md: The static ad designer skill file with layout rules, composition guidelines, and format specs.

All three are available in the Vault downloads section. Drop them into your .claude/skills/ directory and you can skip straight to Step 5.


What This System Will Not Do

It will not make you a creative director. The matrix gives you structure, but you still need to pick the right hooks for your product. “Problem-centric” only works if you actually understand your customer’s problem.

It will not replace ad strategy. This is a production tool, not a thinking tool. You still need to know your audience, your positioning, and your offer.

It will not guarantee winning ads. It guarantees that you’re testing 32 specific hypotheses instead of guessing with 3 random creatives. That’s the edge: volume of smart tests, not volume of random output.

And it will not cost you $400 a month for eight mediocre variations from a freelancer who found your listing on Upwork.


Quick Reference: Cost Breakdown

ItemCost
Claude Pro subscription$20/mo
OpenRouter credits for 100 images at 1K~$7
OpenRouter credits for 20 finals at 2K~$2
Nano Banana 2 APIIncluded in OpenRouter credits
Total monthly cost for 100+ ad variations~$29
What you were probably paying a designer$300-500/mo

What’s Next

This playbook gives you the production engine. But production is only one piece of the Meta Ads operating system.

Next up in the Vault:

  • Pillar 5: The Impressions Spy shows you how to find every winning competitor ad in your niche in 10 minutes using Meta’s new Ad Library impression sorting. So you know what to make before you make it.
  • Pillar 4: Automated Advertorials takes the static ads you just built and creates the landing page they point to, in one Claude Code session. So you have a complete funnel, not just pretty pictures.

Both are live in the Vault now. Or if you want the condensed version of this playbook as a standalone PDF (plus the skill files), grab the $27 Meta Ads Static Generator Playbook from the link below.

[CTA: Get the $27 Playbook] | [CTA: Browse the Vault]


Continue building the system.

← Back to The Vault