> Quick Definition, Claude Code video loops: A scheduled Claude Code prompt that reads your creative brief, calls image and video APIs, expands one design into HTML5 banner sizes, and writes a performance brief on a fixed cadence. It is the difference between "we produced five ads this week" and "a Claude Code video pipeline ships 100 variants before standup."
Traditional ad creative production costs $500, $5,000 per asset and bottlenecks at 10, 20 assets/week. A Claude Code video /loop pipeline ships 100+ variants at ~10x lower unit cost. Volume at that unit cost changes testing economics: you stop arguing over which concept to produce and start shipping a batch, then killing losers with data. Medium and YouTube are full of single-asset tutorials. A SERP audit for "claude code video" returns toolkit READMEs and one-shot render walkthroughs, no published /loop workflow runs an end-to-end creative pipeline (brief, video, banner, publish) on a clock. The tooling exists. The pattern is missing. This article is the pattern: four named loops, real .loop files, cron, brand gates, and a cost/efficiency comparison with traditional creative production.
If you read the hub article on Claude Code Loop Engineering for Modern GTM you already know the ESG Framework (Enable → Schedule → Govern) and the 5 GTM Loop Archetypes. Every loop in this article is a Generate or Optimize archetype applied to Claude Code video. The discipline transfers; the configurations do not. The goal is cost-bounded automation you can ship without learning to code, four loops, four cron entries, one shared persona file. For agency deployment of the same pattern, see Best Claude Code Workflows for Marketing Agencies.
TL;DR
- Creative Loop Pipeline (brief → batch → expand → analyze) + HTML5 Banner Expander is the original framework in this article. Four named loops, four cadences, four brand gates, that is the entire Claude Code video creative stack for a growth team.
- A weekly Claude Code video batch costs tens of dollars in APIs and tokens, not thousands in studio retainers. The 10x is a unit-cost claim, not a quality claim: you still reject a large share of the batch.
- Claude Code video is not a designer replacement, it is a scheduler and reasoner on top of Replicate, Runway, HeyGen, and Veo. The loop writes the brief, calls the APIs, and queues human review before anything publishes.
- Brand QC is the part nobody publishes, logo safe zones, banned claims, and size-spec failures each need a different reject-and-retry rule. The Quality Control section below is the part the SERP omits.
The Claude Code video bottleneck in modern GTM
Paid media does not starve for budget first. It starves for variants. Meta and Google both want fresh creative on a weekly clock, and a team that ships 12 assets a month is running a testing program in name only. Traditional production, brief, designer, revision rounds, studio, legal, resize, is built for a few hero pieces, not for the 100-variant week that performance media actually rewards.
The volume-versus-quality framing is the trap. Quality is a gate you apply to a batch, not a reason to produce one concept slowly. A Claude Code video loop does not ask "is this the one?" It asks "which ten of these fifty pass the brand checklist, and which three of those ten are still spending efficiently on day fourteen?" That is a different operating system than a weekly creative standup.
The directional data point: teams that move from 10, 20 agency assets per week to a looped batch of 100+ variants report that time-to-first-test drops from days to hours, per Metaflow's internal creative ops review. The number is directional, your mileage depends on API latency and review tightness, but the direction is consistent. Faster variant supply means cheaper learning.
The missing piece on the SERP is not another image-prompt cheat sheet. It is an end-to-end creative pipeline (brief, video, banner, publish) that a growth marketer can schedule. Claude Code video work that stays in a chat window is still manual production with extra steps.
Setting up image generation API access (Replicate, Stability, OpenAI)
Image APIs are the stills layer every Claude Code video loop in this article shares. Without them, Loop #1 has nothing to batch and Loop #2 has no master to expand. You do not need a custom MCP. You need keys, a model pick, and a folder contract.
Replicate is the default for most growth teams because it fronts FLUX, SDXL, and a long tail of fine-tunes behind one HTTP contract. Stability is the pick when you already have a Stable Diffusion workflow or a brand LoRA. OpenAI image models are the pick when prompt-following and text-in-image matter more than style control. Store the keys in the environment, not in the .loop file. Name the output folder data/creative/stills/YYYY-MM-DD/ and refuse to run if yesterday's folder is missing.
The CLAUDE.md persona is the other half of setup. Without it, each run re-derives brand rules from scratch and burns tokens re-reading your hex values.
# CLAUDE.md (excerpt)
You are the creative ops agent for metaflow.life.
Your job: brief, generate, expand, and flag, never publish an asset without approval.
Your stills APIs: Replicate (FLUX), Stability (SD3), OpenAI (gpt-image).
Your video APIs: Runway, HeyGen, Veo, see the video section.
Your brand kit lives in data/creative/brand.yaml (hex, type, logo, banned claims).
Your output format is a markdown brief plus asset paths in data/creative/queue/.
Rules:
- Never upload to an ad account. Always write a review packet.
- Cite the brief ID on every generated file name.
- If an API key is missing or a render fails twice, flag and skip that variant.The tools block lists which CLI the loop may call, curl against the image endpoints, a thin wrapper, or the Claude Code video toolkit when you want a packaged render path. Missing brand kit is a hard stop, not a vibe-it prompt.
Setting up
Claude Code video generation API access (Runway, HeyGen, Veo)
Video is a different cost curve than stills, and a Claude Code video loop that treats Runway like FLUX will blow the budget on day two. Runway (Gen-3 / Gen-4) is the motion-from-still and text-to-video workhorse. HeyGen is the talking-head and voiceover layer, scripts in, avatar or cloned voice out. Veo is the pick when you want longer, more cinematic shots and you can tolerate Google's quota. Most teams use two of the three, not all three, on any given brief.
Official scheduling lives in Claude Code's scheduled tasks docs. The /loop command is the clock; the APIs are the cameras. Cap concurrent renders. A five-clip Veo burst at peak list price will dwarf a week of stills, which is why Loop #3 budgets clips before it prompts them.
The Digital Samba Claude Code video toolkit is the packaged path if you do not want to hand-roll curl against three vendors. It is not a loop. It is a set of tools your loops can call. The loop owns cadence and judgment; the toolkit owns render plumbing.
Credentials and model routing for Claude Code video
Route by job, not by brand preference. Stills-to-motion and product B-roll go to Runway. Scripted presenter spots and voiceover beds go to HeyGen. Longer narrative cuts go to Veo. Write the route into data/creative/video-routing.yaml so a Claude Code video run does not re-decide the vendor every morning. If a vendor 429s, fail that variant and continue the batch. Preview files land in data/creative/video/YYYY-MM-DD/; the review packet lists duration, aspect ratio, and the source brief ID. That packet is what a human actually watches.
Loop #1: Creative brief → batch image/video creation
The Brief → Batch loop is the first Claude Code video loop most teams ship. It is a Generate archetype, queue-driven, daily cadence, review-packet output. The loop reads the briefs that landed in data/creative/briefs/ since yesterday, expands each into a stills batch and a short video batch, and writes a review markdown a human can scan in ten minutes. It does not publish. It does not pick a winner. It produces the pile.
The prompt that matters is the brief expander, not the image prompt. A one-line "make ads for our webinar" brief produces generic sludge. A structured brief, audience, offer, proof point, banned claims, aspect ratios, CTA, produces a batch you can actually test. The loop refuses underspecified briefs: if audience or offer is empty, it posts to #creative-ops and skips that row. That single rule does more for on-brand output than any negative prompt.
# .loops/creative-brief-batch.md
Every day at 07:00:
1. Read data/creative/briefs/*.md modified in the last 24 hours.
2. Reject any brief missing audience, offer, proof, or CTA. Alert #creative-ops.
3. For each valid brief, expand into 8 still prompts and 3 video prompts.
4. Call Replicate/OpenAI for stills (1:1, 4:5, 9:16). Call Runway/HeyGen for video.
5. Run the brand checklist in data/creative/brand.yaml against each file.
6. Save passers to data/creative/queue/YYYY-MM-DD/ and write review.md.
7. Post the packet summary to #creative-ops. Failed variants go to /rejects/.The cron schedule that drives it:
# crontab
0 7 * * * cd /path/to/repo && claude code /loop .loops/creative-brief-batch.mdThe token cost is small relative to the render bill. Eight stills and three six-second clips per brief, two briefs a day, lands in the tens of dollars, not the $500, $5,000 per-asset agency line. The review packet is the governance: if nobody opens review.md, you do not have a pipeline, you have a folder of unwatched MP4s. A Claude Code video batch that nobody reviews is just expensive noise.
Loop #2: Multi-size banner expansion (1 design → 10 sizes)
The HTML5 Banner Expander is the loop the display network still quietly demands. One approved master, a 1080×1080 still from Loop #1, has to become the IAB set that Google Display Network actually serves: 300×250, 728×90, 160×600, 320×50, 300×600, 970×250, 336×280, 320×100, 250×250, 120×600. Manual resize is where campaigns stall. Batch banner generation across multiple sizes is the unglamorous half of Claude Code video creative, and it is the half that unlocks GDN and programmatic without a studio resize round.
The loop does two jobs. First it crops and reflows the master into each size with the logo and CTA remaining legal (safe zone, minimum type size, no clipped faces). Second it wraps each PNG in a lightweight HTML5 banner shell, clickTag, backup image, size meta, because Google Display Network still prefers HTML5 over a naked JPEG for anything you want to iterate. A static PNG can run. An HTML5 banner is what you ship when you want the file to be a real display unit.
# .loops/banner-expander.md
On new file in data/creative/queue/masters/:
1. Read the master PNG and data/creative/brand.yaml (logo, CTA, hex, type min-size).
2. For each IAB size in data/creative/iab-sizes.yaml, crop/reflow the master.
3. Reject a size if the CTA type falls below min-size or the logo clips.
4. Wrap each passer in the HTML5 banner template (clickTag, backup image).
5. Save PNG + HTML to data/creative/banners/YYYY-MM-DD/{size}/.
6. Write a size report: passed, rejected, reason. Post to #creative-ops.The cron schedule that drives it:
# crontab
*/30 * * * * cd /path/to/repo && claude code /loop .loops/banner-expander.mdHalf-hourly is the right cadence because this loop is event-shaped: it should fire when a master lands, not once a week after someone remembers GDN. Token cost is trivial, mostly image geometry and an HTML wrap. A Claude Code video still that only exists at 4:5 cannot enter the display network; the expander is what turns a social master into a ten-size HTML5 banner set without an afternoon in Photoshop. The Bannersnack AI banner workflow is the commercial cousin of this loop; the brief cited their how-to as the cost hook even though that specific post 404s.
Loop #3: Claude Code video ad creation pipeline (script → voiceover → scenes → render)
The video ad pipeline is the Claude Code video loop that looks like a studio. It is a Generate archetype on a two-or-three-times-weekly cadence, because daily video at API prices is how you light money on fire. The sequence is fixed: script, voiceover, scenes, render. Skip a step and you get a pretty clip with no offer, or a voiceover bed with no picture. The loop reads approved briefs tagged for video, writes a 15- or 30-second script, sends it to HeyGen for voiceover, storyboards three to five scenes, sends those to Runway or Veo, then concatenates to a preview MP4 with captions.
The script step is where brand lives. A Claude Code video script that opens on a metaphor will lose to a script that opens on the outcome. Cap the script at one proof point and one CTA. If the brief names a banned claim, the loop greps the script before it spends a dollar on render. Scene prompts inherit the stills style from Loop #1 so the video does not look like a different company from the banners.
# .loops/video-ad-pipeline.md
Every Monday, Wednesday, Friday at 09:00:
1. Read data/creative/queue/ for briefs tagged video and status=approved-stills.
2. Draft a 15s and a 30s script per brief. Grep against banned claims.
3. Send the chosen script to HeyGen for voiceover. Save the WAV.
4. Storyboard 3, 5 scenes. Route product B-roll to Runway, narrative to Veo.
5. Render scenes, concat with voiceover and captions, write preview.mp4.
6. Save packet to data/creative/video/YYYY-MM-DD/{brief-id}/review.md.
7. Post duration, aspect, and preview path to #creative-ops. Do not publish.The cron schedule that drives it:
# crontab
0 9 * * 1,3,5 cd /path/to/repo && claude code /loop .loops/video-ad-pipeline.mdBudget clips before you prompt them. Three scenes at six seconds is a 15-second ad; five scenes at six seconds is how a 30-second spot gets expensive. A Claude Code video render that fails twice goes to /rejects/ with the error, not into an infinite retry. Human preview is mandatory: lip-sync misses and invented UI in product shots are still common enough that auto-publish is malpractice.
Approved MP4s feed the same folders your Claude Code loop for Meta Ads and Claude Code loop for Google Ads already know how to traffic. Creative supply without a trafficking loop is a drive full of unused files.
Loop #4: Creative performance analysis + refresh triggers
The Analyze loop is what makes Creative Loop Pipeline (brief → batch → expand → analyze) a pipeline instead of a generator. It is an Optimize archetype, daily cadence, alert-only output. The loop reads yesterday's Meta and Google export, spend, CTR, CPA or ROAS, frequency, joins it to the creative IDs in data/creative/queue/, and flags assets that have fatigued or never worked. Fatigue is frequency above your threshold with CTR down more than 20% from the asset's first-seven-day baseline, or CPA up more than 30% for three consecutive days.
The useful output is a refresh trigger, not a dashboard. For each flagged asset the loop names the replacement action: iterate the hook, iterate the visual, kill and replace from the next Brief → Batch run, or hold. A Claude Code video that is still in learning should not be killed on day two. The loop respects a minimum serving window in brand.yaml, typically 3,000 impressions or five days, whichever comes first, so you do not thrash.
# .loops/creative-performance.md
Every day at 08:00:
1. Read data/ads/meta-export-YYYY-MM-DD.csv and data/ads/google-export-YYYY-MM-DD.csv.
2. Join to data/creative/manifest.csv on creative_id.
3. Skip any asset below min impressions or min days in brand.yaml.
4. Flag fatigue: frequency high AND CTR −20% vs first-7d, or CPA +30% for 3 days.
5. Flag never-worked: past min window AND CPA > 2x target.
6. For each flag, write a refresh action into data/creative/briefs/ (new brief or kill).
7. Post the refresh list to #creative-ops. Empty list posts "no refresh today".The cron schedule that drives it:
# crontab
0 8 * * * cd /path/to/repo && claude code /loop .loops/creative-performance.mdToken cost is modest, two CSVs and a manifest. The value is the closed circuit: Loop #4 writes briefs that Loop #1 picks up tomorrow. That is the end-to-end creative pipeline (brief, video, banner, publish) with publish still gated. The loop never pushes live. It queues the next batch and tells a human which live ads to pause. If the export is missing, it alerts and exits. Inventing yesterday's CPA is how you kill a winner.
Quality control: keeping AI creative on-brand at scale
Brand drift is the failure mode that makes finance shut the APIs off. A Claude Code video batch that ships off-logo, off-hex, or off-claim is not a 10x pipeline. It is a reputation incident with a render bill. QC is a checklist the loop runs, not a slide in a brand book nobody opens.
Three gates catch most of the damage. Visual gate: logo in the safe zone, hex within tolerance, no clipped faces, type above minimum. Claims gate: grep overlay text and the video script against banned_claims in brand.yaml. Spec gate: aspect ratio, duration, file weight, and HTML5 banner clickTag present for display units. Fail any gate and the variant goes to /rejects/ with a reason code. The loop may retry once with a tighter prompt. A second fail is a skip.
Metaflow's creative ops lead puts the 10x in the right frame: "The 10x is not a quality claim. It is a volume claim. Quality is a gate, not a vibe, we reject about 40% of the batch and still ship 6x what the agency calendar allowed." That reject rate is the point. If your pass rate is 95%, your brief is too timid or your checklist is theater.
Human review stays in the loop for video and for anything that will run above a spend cap you set. Stills that passed all three gates can auto-queue after a Slack thumbs-up. Claude Code video previews still get eyes. The ESG Govern layer is this checklist plus the "never publish without approval" line in CLAUDE.md. Remove either one and you do not have cost-bounded automation. You have an unsupervised studio.
Cost modeling: creative pipeline at 10x vs. agency production
The cost/efficiency comparison with traditional creative production is the reason to bother with cron. Agency production is priced per hero asset: copy, design, revision rounds, studio, resize. A working range of $500, $5,000 per asset is what most growth teams actually pay once you include the resize round and the video cutdown. Throughput sits at 10, 20 assets a week because that is what a pod can review. A Claude Code video loop stack inverts the unit: you pay APIs and a reviewer's time, and the batch is the product.
The table below is a worked week for one offer, a webinar or a feature launch, with two briefs, stills, a small video set, and a ten-size HTML5 banner pack. API prices move; treat the dollars as order-of-magnitude, not a quote.
| Line item | Agency production (week) | Claude Code video loop stack (week) |
|---|---|---|
| Concepts + copy | $800–$1,500 | ~$0.40 tokens (brief expand) |
| Stills, ~16 variants | $2,000–$4,000 | $6–$20 image APIs |
| Video, 4–6 cutdowns | $8,000–$15,000 | $20–$90 Runway/HeyGen/Veo |
| HTML5 banner set, 10 sizes | $1,200–$2,500 | $2–$8 expand + wrap |
| Review / trafficking time | Included in retainer | 2–4 hours human gates |
| Weekly unit cost | $500–$5,000 per asset | ~10x lower per variant |
| Weekly throughput | 10–20 assets | 100+ variants (pre-reject) |
The reading of this table is what matters: video APIs dominate the loop invoice the same way studio time dominates the agency invoice, and stills plus HTML5 banners are rounding errors once you have the master. If you need to cut cost, the lever is Loop #3's clip count, three scenes at 15 seconds, not five at 30, not Loop #2's banner expand. The 40% reject rate still leaves more testable variants than the agency week, which is why the 10x unit cost holds after QC. Above a few hundred finished video-seconds a day, vendor volume discounts and a real editor start to win; below that, the loop wins on cost per test.
The second table is the cheat sheet you keep next to the crontab. Every Claude Code video loop maps to an archetype, a cadence, and the failure mode that actually wakes you up.
| Claude Code video loop | Archetype | Cadence | Failure mode to guard against |
|---|---|---|---|
| Brief → batch | Generate | Daily on queue | Underspecified brief, missing brand.yaml |
| HTML5 Banner Expander | Generate | Every 30 min on master | CTA clipped, clickTag missing |
| Video ad pipeline | Generate | Mon/Wed/Fri | Unbounded clip count, auto-publish |
| Performance + refresh | Optimize | Daily | Missing ad export, killing ads in learning |
The cheat sheet is the thing you tape next to the monitor. Every Slack alert should map to one row, and every row should have a documented failure mode. If an alert fires that does not map, either your gate is wrong or you have a loop you forgot to document, both are governance failures, not model failures. Addy Osmani's Loop Engineering essay is the software-engineering origin of this discipline; the GTM version is the same idea with brand.yaml instead of a test suite.
Where This Goes Next
Creative Loop Pipeline (brief → batch → expand → analyze) + HTML5 Banner Expander is the asset you carry out of this article. Four named loops, four cadences, four brand gates, and one shared CLAUDE.md persona, that is the entire Claude Code video stack for a growth team that needs stills, HTML5 banners, and short ads without a studio retainer. The same pattern extends to a trafficking Generate loop that pushes approved files into Meta and Google, but that work already lives in the Meta Ads and Google Ads loop articles; this page owns supply.
The discipline that compounds is the ESG Framework applied to creative: Enable the persona, brand kit, and API keys once, Schedule the four loops at their natural cadences, and Govern them with the three QC gates and a human preview on video. Once those four loops run for a month without a brand incident, the second offer you add is half the work, and by the fifth you are staffing creative testing with a loop instead of a rush request.
Metaflow is built for this motion. The platform ships marketing agents that hold your positioning, brand kit, and connected ad accounts as durable context, and pause for approval before anything publishes, which is the same boundary the ESG Framework enforces on raw Claude Code. Skills encode the brief format and the QC checklist; workflows are the four loops above, already wired to the clock; context is the part that stops each run from re-deriving your hex values. That compound layer is what you want once the CLI proof is boring. If you want to skip the plumbing and start from a loop that already knows your stack, that is the layer Metaflow adds on top. For the broader Claude Code marketing skills ecosystem, see the Claude Marketing Skills Ultimate Guide.
Frequently Asked Questions
Can Claude Code generate videos? Yes. Claude Code does not render pixels itself, it schedules and reasons. A Claude Code video loop writes the script, routes scenes to Runway, HeyGen, or Veo, concatenates the preview, and files a review packet. Loop #3 in this article is that pipeline: script → voiceover → scenes → render, three times a week, with a human preview before anything goes live. Metaflow's marketing agents run the same generate-then-gate pattern if you want the brand kit and ad accounts already in context instead of a local CLAUDE.md.
Can Claude create posters or banners? Yes. Loop #1 batches stills from Replicate, Stability, or OpenAI against a structured brief, and Loop #2 expands one approved master into a ten-size HTML5 banner set for the display network. Posters are the same stills job at print dimensions, you add the size to iab-sizes.yaml or a print-size list and keep the logo safe-zone check. Claude Code banner output is a file plus a review packet, not a live placement.
Are banner ads still effective? Yes, for the jobs they still have: retargeting, GDN coverage, and cheap reach around a search or social campaign. Click-through rates are low compared with paid social, which is why people declare banners dead every year. They remain effective when the unit cost of producing a full size set is low enough to test. Batch banner generation across multiple sizes is what makes that true in 2026, the ad format did not get better; the cost of filling it did.
Can Claude Code make HTML5 banners for Google Display Network? Yes. The HTML5 Banner Expander wraps each resized PNG in a clickTag shell with a backup image and the IAB dimensions GDN expects. That is a Claude Code HTML5 banner, not a rich WebGL unit, enough for standard display, not a replacement for a high-end rich-media studio. Metaflow can hold the size spec and the brand kit in durable context so the expander does not re-learn your CTA rules every run. You still upload through Google Ads or your trafficking loop; the creative loop stops at the review zip.
Sources
- GitHub, Claude Code video toolkit, AI-native video production tooling for Claude Code
- Claude Code official docs on scheduled tasks,
/loopcommand reference - Addy Osmani, Loop Engineering, origin of the loop engineering concept
- Bannersnack, AI banner production (cost/volume comparison context)
- Metaflow, Claude Code Loop Engineering for Modern GTM, hub article for this cluster
- Metaflow, Claude Marketing Skills Ultimate Guide, broader Claude Code marketing skills ecosystem
- Metaflow, Claude Code Loop for Google Ads, trafficking companion for search and GDN
- Metaflow, Claude Code Loop for Meta Ads, trafficking companion for paid social




