> Quick Definition, Claude Code Meta Ads loops: A scheduled Claude Code prompt that reads your Ads Manager exports (or Marketing API snapshots), scores creatives, classifies A/B tests, proposes budget shifts, and watches the Ad Library, then writes a draft for a human to approve before any dollar moves. It is the difference between "I checked Ads Manager on Monday" and "a scorecard lands in Slack every morning at 7 a.m."
The claude-ads plugin has 8,100+ stars, yet a SERP audit for "claude code meta ads" in 2026 returns a paywalled Medium walkthrough, Reddit threads on r/FacebookAds asking whether Claude is reliable with live spend, and zero published /loop workflows that schedule creative testing or budget rebalancing on a clock. The Claude Code Meta Ads community has a plugin. The pattern is missing. This article is the pattern: a beginner-friendly /loop setup for Meta Ads, with four named loops, a three-tier approval stack, Instagram-specific notes, and the boundary versus Meta automated rules / Advantage+.
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 here is a Monitor or Optimize archetype applied to Claude Code Meta Ads. 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, and a hard rule that spend never ships from a draft.
TL;DR
- The Meta Ads Loop Approval Stack (draft → review → launch) + Ad Library Watcher is the original framework in this article. Four named loops, three approval tiers, one competitor watcher, that is the entire Claude Code Meta Ads stack for a small account.
- A daily creative scorecard loop costs under $3/month in tokens and replaces the 20, 40 minutes you spend every morning scrolling Ads Manager. Directional: Metaflow's paid social ops review puts that morning pass at 2.5 hours/week for a 15-ad-set account.
- Claude Code Meta Ads /loop is not Advantage+ and not Meta automated rules. Advantage+ optimizes delivery inside the auction. Automated rules fire if-then pauses. A loop reasons, classifies, drafts, and waits. Mixing the three without a boundary is how you reset learning.
- Safety architecture for auto-publishing ad spend is the part nobody publishes. Draft never writes to the API. Review checks learning phase, 20% budget caps, and policy flags. Launch is the only tier that may POST. Skip that stack and you are one hallucinated CPA away from a paused account.
Why Claude Code Meta Ads automation is trickier
Claude Code Meta Ads is not SEO-on-a-clock. A rank tracker loop that misfires posts a noisy Slack message. A Meta loop that misfires moves money, resets learning, or serves a 1:1 static into Instagram Stories. Three surfaces make this harder than a crawl export: creatives, budgets, and platform rules.
Creatives are the actual product Meta's auction ranks. Frequency is measured at the creative level, not the ad-set level. Directional: Meta has published that conversion rates drop sharply once frequency crosses 4 at the creative. A loop that pauses "the ad set" when one asset is fatigued kills winners sitting next to it. The scorecard has to name the asset, the placement, and the hook, not the campaign.
Budgets sit on a 20% tripwire. Change an ad set's daily budget by more than 20%, swap the audience, or change the optimization event, and you dump that ad set back into learning. Data-backed: Meta's learning-phase guidance is 50 conversion events over 5, 7 days to exit cleanly, and accounts that keep under 20% of spend in learning see materially lower CPA (Meta has cited up to 68% in its own research). A loop that "rebalances" every morning is a learning-phase machine.
Platform rules are the third surface. Special Ad Categories restrict targeting. Advantage+ Shopping Campaigns hide most levers. Disapprovals land without a useful error string. Instagram placements reject the wrong aspect ratio. Claude Code Meta Ads has to know which writes are legal, which writes reset learning, and which writes are Instagram-specific loop automation rather than a Facebook Feed default.
Instagram is not a placement checkbox. Stories and Reels want 9:16, captions on screen, and a hook in the first two seconds. Feed wants 4:5. A loop that promotes a Feed winner into Advantage+ placements without a spec check will spend on Instagram inventory the asset cannot fill. Instagram-specific loop automation means a placement split in the scorecard, a creative-spec gate before any promote, and a connected Instagram professional account on the same ad account, not a separate "Instagram ads" tool.
Metaflow's paid social lead puts the boundary this way: "Advantage+ is allowed to move spend inside the auction. Your loop is not. The loop proposes. A human, or a review pass with a hard cap, launches." That sentence is the whole safety model.
Meta Ads API access setup for /loop
A beginner-friendly /loop setup for Meta Ads is three objects and one persona file: a Meta app with Marketing API access, a system-user token scoped to one ad account, and a CLAUDE.md that names the account, the Instagram actor, the approval rule, and the export paths. You do not need to become a Graph API engineer. You need a token that can read insights and, only at Launch tier, write ads.
Create a Business Manager app, add the Marketing API product, and generate a system-user token with ads_read first. ads_management comes later, when Loop #2 and Loop #3 are allowed to write, and even then, only from the Launch folder. Link the Facebook Page that owns the Instagram professional account so placement and asset-level Instagram insights resolve. Put the ad account ID, the Page ID, and the Instagram actor ID in .env. If any of the three is missing, Instagram rows in the scorecard will look like Facebook Feed rows, and you will make the wrong promote.
What a Claude Code Meta Ads loop is allowed to touch
The persona block is the governance layer every Claude Code Meta Ads loop in this article shares. Without it, each run re-derives the account from scratch and will happily draft a 40% budget jump because yesterday's CPA looked pretty.
# CLAUDE.md (excerpt)
You are the paid-social agent for ad account act_XXXX.
Your job: monitor, score, and draft, never POST to the Marketing API
unless the file lives in data/meta/launch/ and a reviewer has set approved: true.
Your data sources live in data/meta/, insights CSVs, creative manifests, Ad Library snapshots.
Your alert channel is #meta-ads-alerts on Slack.
Rules:
- Never change budget more than 20% in a single proposal.
- Never edit an ad set that is in Learning or Learning Limited.
- Split every creative score by placement: Facebook Feed, Instagram Feed, Instagram Stories, Reels.
- If the insights export is older than 36 hours, flag stale and skip the run.
- Instagram assets missing 9:16 or on-screen captions cannot be promoted into Stories/Reels.The Claude Code scheduled tasks docs are the /loop reference. Cron fires the file; the file names the data; CLAUDE.md names the law. If you already run a Claude Code loop for Google Ads, reuse the same repo layout and keep the tokens in separate env files, mixing Google and Meta credentials in one loop is how you pause the wrong platform.
Loop #1: Daily creative performance review + scorecard
The Creative Scorecard is the first Claude Code Meta Ads loop most teams ship. It is a Monitor archetype, read-only, daily cadence, alert-only output. The loop reads yesterday's insights export at the ad (asset) level, joins it to your creative manifest, and writes a scorecard that names fatigue, placement waste, and the three assets that deserve more spend.
The score is a weighted sum you can explain in Slack: frequency, CTR versus a 7-day rolling average, CPA versus target, and thumb-stop (3-second view rate) for video. Instagram rows are scored separately from Facebook Feed rows so a Reels winner is not buried under a Feed dog. The loop does not pause anything. It writes data/meta/drafts/YYYY-MM-DD-scorecard.md and posts the top and bottom five to #meta-ads-alerts.
Prose matters here because the failure mode is a dashboard nobody reads. A useful scorecard names the hook ("UGC testimonial, 3s cold open"), the format (9:16 video), the placement (Instagram Reels), the frequency (4.6), and the recommended action (refresh hook / hold / promote). A useless scorecard is a CSV dump with CPA sorted descending. Claude Code Meta Ads earns its keep in the classification, not in the fetch.
# .loops/meta-creative-scorecard.md
Every day at 07:00:
1. Read data/meta/insights-YYYY-MM-DD.csv (ad-level, yesterday, placement breakdown).
2. Join to data/meta/creatives.yaml (asset id, hook, format, aspect ratio, captions).
3. For each asset x placement, compute:
fatigue = frequency >= 4
ctr_drop = CTR < 0.8 * ctr_7d
cpa_miss = CPA > 1.3 * target_cpa AND clicks >= 100
4. Split Instagram Feed / Stories / Reels from Facebook Feed.
5. Draft a scorecard: top 5, bottom 5, fatigued assets, spec-fail Instagram assets.
6. Save to data/meta/drafts/YYYY-MM-DD-scorecard.md. Post the summary to Slack.
7. Do not call the Marketing API write endpoints.# crontab
0 7 * * * cd /path/to/repo && claude code /loop .loops/meta-creative-scorecard.mdThe token cost is small because the loop reads one CSV and one YAML file. A 40-ad account with a four-placement split produces about 12,000 input tokens and 2,000 output tokens. Directional: under $0.08 per run, about $2.40/month for a daily loop. The value is the 20 minutes you do not spend building the same pivot in Ads Manager.
Loop #2: Automated A/B test analysis + winner promotion
The Winner Promotion loop is a weekly Optimize archetype. It reads tests that have been live at least 7 days, checks sample size, declares a winner only when the evidence holds, and writes a Launch-tier proposal, it does not turn the winner on by itself.
Most "A/B tests" in Ads Manager are two ads in one ad set with no hypothesis. This loop requires a test log: hypothesis, variable (hook, format, offer), start date, budget, and the one thing that changed. If two things changed, the loop marks the test invalid and asks you to restart. That single rule is how Claude Code Meta Ads stays honest about creative testing.
Statistical caution is not optional. Directional: do not declare a winner below 50 conversions per variant; 100 is better. Early CTR leaders often lose on CPA by day 10. The loop computes CPA, ROAS, and confidence against that floor, then drafts a promote plan: keep the winner, pause the loser, duplicate the winner into the prospecting ad set, and, if the winner is a 9:16, allow Instagram Stories/Reels. If the winner is 1:1, the promote plan excludes those placements. Experimental: auto-POST of the promote is Launch-tier only, after two weeks of review-only runs.
# .loops/meta-ab-winner.md
Every Monday at 09:00:
1. Read data/meta/tests.yaml (hypothesis, variable, start, variants, ad set ids).
2. Read insights for each variant for the test window (min 7 days).
3. If conversions per variant < 50, mark "underpowered" and skip promote.
4. If the loser CPA is worse by >= 20% AND clicks >= 100, draft a pause for the loser.
5. Draft a promote for the winner: same audience, budget +15% max, placement allow-list from aspect ratio.
6. Write data/meta/review/YYYY-MM-DD-ab-promote.md with approved: false.
7. Never POST. Review tier only.# crontab
0 9 * * 1 cd /path/to/repo && claude code /loop .loops/meta-ab-winner.mdWeekly is the right cadence. Daily winner-calling is how you chase noise and reset learning. The sibling article on the Claude Code loop for ad creative pipeline is where new variants get produced; this loop is where they get judged.
Loop #3: Budget rebalancing across ad sets
The Budget Rebalance loop is the loop that will hurt you if you skip the approval stack. It compares ad sets against a CPA or ROAS target, proposes shifting up to 20% of an underperformer's daily budget onto a winner, and refuses to touch anything in Learning. It is an Optimize archetype with a Launch gate.
The rule is boring on purpose. If ad set A is at or under target CPA for three consecutive days, Active (not Learning), and ad set B is 30% worse on CPA with at least 100 clicks, the loop drafts a 15, 20% shift from B to A. It will not consolidate five Learning Limited ad sets into one overnight, that is a human restructure, not a cron job. It will not raise account-level spend. It rebalances the pie you already bought.
Claude Code Meta Ads budget logic has to respect Meta's own tripwires. A 25% bump looks like a small decision in a spreadsheet and a learning reset in Ads Manager. The loop's proposal file shows current budget, proposed budget, percent delta, learning status, and the three-day CPA series so a reviewer can reject it in thirty seconds. If the insights file is stale, the loop exits. Guessing yesterday's CPA is how accounts get "optimized" into a hole.
# .loops/meta-budget-rebalance.md
Every weekday at 08:00:
1. Read data/meta/adsets.yaml (id, daily_budget, target_cpa, status).
2. Read 3-day ad set insights. Skip any row in Learning or Learning Limited.
3. Winners: CPA <= target for 3 days. Losers: CPA >= 1.3 * target AND clicks >= 100.
4. For each loser with a matching-objective winner, draft a shift of min(20% of loser budget, room under winner cap).
5. Reject any draft with percent delta > 20 or with a Special Ad Category flag you do not understand.
6. Write data/meta/review/YYYY-MM-DD-budget.md with approved: false.
7. POST only if a later Launch loop finds approved: true in that file.# crontab
0 8 * * 1-5 cd /path/to/repo && claude code /loop .loops/meta-budget-rebalance.mdRun it weekdays, not hourly. Meta's auction does not need your opinion every 60 minutes. Directional: Metaflow's internal paid social review saw more CPA damage from over-active budget scripts than from slightly stale budgets.
Loop #4: Competitor ad library monitoring
The Ad Library Watcher is the loop the SERP does not have. Once a week it snapshots a list of competitor Page IDs from the Meta Ad Library, diffs this week against last week, and reports new creatives, disappeared creatives, and format shifts (static to UGC, Feed to Reels). It is a Monitor archetype. It never writes to your ad account.
The public Ad Library is the source of truth for what a competitor is willing to run, not for what it spends. You will not get their CPA. You will get the hook, the primary text, the CTA, whether it is still running, and which platforms it lists. That is enough to steal a test idea and not enough to copy a media plan. Claude Code Meta Ads uses the watcher to feed Loop #2's test log, "competitor X shipped a 15s founder-talking-head on Instagram, we have no founder asset in flight" is a better Monday than a vibe check.
Experimental: fully automated Ad Library fetching sits on a ToS and rate-limit edge. The safe pattern is a saved search you export, or Meta's Ad Library API where you have access, dropped into data/meta/ad-library/YYYY-MM-DD.json. The loop diffs files. It does not log in as you and click around.
# .loops/meta-ad-library-watcher.md
Every Friday at 10:00:
1. Read data/meta/competitors.yaml (Page names, Page IDs, markets).
2. Read this week's Ad Library snapshot and last week's snapshot.
3. Diff: new ads, gone ads, creative-type changes, new Instagram-only ads.
4. For each new ad, extract hook, format, CTA, and a one-line "test we do not run yet."
5. Save data/meta/drafts/YYYY-MM-DD-ad-library.md.
6. Post the three most material new ads to #meta-ads-alerts with Ad Library URLs.
7. Never write to the Marketing API.# crontab
0 10 * * 5 cd /path/to/repo && claude code /loop .loops/meta-ad-library-watcher.mdThe token cost is moderate when snapshots are large. Three competitors, ~50 active ads each, weekly, is about 20,000 input tokens and 2,500 output tokens. Directional: under $0.12 per run, about $0.50/month. The watcher is cheap because it does not need to be daily, competitors do not ship a new concept every morning.
Safety architecture: the 3-tier approval system
Safety architecture for auto-publishing ad spend is the reason Claude Code Meta Ads is usable in an agency and dangerous as a naked cron. The Meta Ads Loop Approval Stack (draft → review → launch) + Ad Library Watcher is the rule: every write-capable loop stops at a file, a human (or a second model pass with a checklist) flips approved: true, and only then does a tiny Launch loop POST. Draft and Watcher loops never get ads_management.
Draft
Draft is read-plus-write-to-disk. Scorecards, underpowered-test flags, Ad Library diffs, and "we should pause this fatigued 1:1" notes live here. The Marketing API token in this environment is ads_read only. If a Draft loop cannot POST, it cannot take your spend with it when the CSV is a day off or the model invents a CPA. Output is markdown in data/meta/drafts/. Slack gets a summary, not a button that publishes.
Review
Review is where budget and promote proposals go. The file includes current vs proposed values, percent delta, learning status, placement allow-list, and a checklist: stale data, Special Ad Category, Instagram spec, 20% cap, minimum clicks. A reviewer, you, a media buyer, or a second Claude Code pass that is only allowed to set approved: true when every check is green, is the gate. Review still does not POST. It is allowed to be picky. A week of rejected proposals is cheaper than one learning reset on a $400/day ad set.
Launch
Launch is a separate .loop file, a separate cron, and a token that has ads_management. It reads only data/meta/review/* files with approved: true from the last 24 hours, executes the named write (pause ad, +15% budget, duplicate winner), logs the API response, and sets approved: consumed. If the API errors, it alerts and does not retry more than once. There is no Launch cron for the Ad Library Watcher, because the Watcher has nothing to launch.
That is the entire safety architecture for auto-publishing ad spend. Three folders, two tokens, one boolean. Teams that collapse Draft and Launch into a single "just run it" script are the Reddit reliability threads.
Claude-ads for Meta: handling the API quirks
The claude-ads plugin is an 8,000-star Claude Code tooling layer for Google Ads and Meta Ads. It is not a loop. It is a set of commands your loops can call for insights pulls, ad object reads, and (if you insist) writes. Claude Code Meta Ads should treat it as a fetcher, not as a decision-maker. The loop owns schedule and judgment; the plugin owns the Graph call.
Meta's Graph API is versioned, rate-limited, and asynchronous when you ask for too much. Pin a version in CLAUDE.md (do not let the plugin float to latest mid-month). Back off on #17 / rate-limit errors instead of retrying in a tight loop. For large date ranges, use async insights jobs and poll, a synchronous pull of 90 days × 40 ads × 4 placements will 500 on you. Instagram insights need the Instagram actor ID; Page ID alone is not enough. Token expiry is the silent killer: user tokens die in 60 days, system-user tokens do not. Use a system user.
Disapprovals and Special Ad Categories should hard-stop Launch. A loop that retries a rejected ad with a slightly shorter headline is how you collect policy strikes. Claude-ads will return the error; your loop's job is to write it into the Review file and walk away. For the broader skills layer that sits around these plugins, see Metaflow's Claude Marketing Skills Ultimate Guide.
Cost comparison: Claude Code Meta Ads loop vs. manual management
The four Claude Code Meta Ads loops above have different token profiles, and the only way to ship them safely is to know the monthly cost before cron goes live. The table is a worked example for a mid-size account: 40 ads, 12 ad sets, 4 placements, 3 competitors, one weekly A/B review. Numbers assume current Claude per-token pricing and a single run per cadence. Directional, not an invoice.
| Loop | Cadence | Input tokens | Output tokens | Cost per run | Monthly cost |
|---|---|---|---|---|---|
| Creative Scorecard | Daily | 12,000 | 2,000 | $0.08 | $2.40 |
| A/B Winner Promotion | Weekly | 18,000 | 3,500 | $0.12 | $0.48 |
| Budget Rebalance | Weekday | 10,000 | 2,000 | $0.07 | $1.50 |
| Ad Library Watcher | Weekly | 20,000 | 2,500 | $0.12 | $0.50 |
| Total | — | — | — | — | $4.88/month |
The reading of this table is the point: daily scorecard and weekday rebalance dominate cost because they run often, and even then the stack is under $5/month in tokens against hours of Ads Manager time. If you need to cut cost, move rebalance from weekdays to three days a week before you touch the scorecard, creative fatigue is the faster-moving signal.
The second table maps each loop to its archetype, approval tier, and the failure mode that matters. Tape it next to the crontab.
| Claude Code Meta Ads loop | Archetype | Approval tier | Failure mode to guard against |
|---|---|---|---|
| Creative Scorecard | Monitor | Draft | Stale insights treated as today |
| A/B Winner Promotion | Optimize | Review | Winner called under 50 conversions |
| Budget Rebalance | Optimize | Review → Launch | >20% bump resets learning |
| Ad Library Watcher | Monitor | Draft | Scraping instead of snapshots |
Every alert should map to one row, and every row should have a documented failure mode. If an alert fires that does not map, your threshold is wrong or you shipped a loop you forgot to govern, both are governance failures, not model failures. Manual management for the same four jobs is a media buyer at $75, $150/hour; even two hours a week is $600+/month before media. The loop stack wins on analysis cost. It does not replace media spend, and it does not replace a buyer on Launch day. For how agencies staff that split, see Best Claude Code Workflows for Marketing Agencies.
Where This Goes Next
The Meta Ads Loop Approval Stack (draft → review → launch) + Ad Library Watcher is the asset you carry out of this article. Four named loops, three folders, two tokens, one competitor watcher. The same pattern extends to a Generate loop that picks up the scorecard's refresh queue and briefs new UGC, but that is a separate article and a separate archetype.
The discipline that compounds is ESG applied to paid social: Enable the persona, account IDs, and Instagram actor once; Schedule the four loops at cadences that match how fast creatives fatigue and how slow budgets should move; Govern with the 20% cap, the learning-phase skip, and the Launch boolean. Once those four loops run for a month without a rogue POST, the second ad account is half the work.
Metaflow is built for this motion. The platform ships marketing agents that hold your offer, pixel/CAPI state, and connected ad accounts as durable context, and pause for approval before anything spends, which is the same boundary the approval stack enforces on raw Claude Code. Workflows and skills compound on that context: the scorecard gets smarter because the agent already knows last week's fatigued hooks, not because you pasted a longer prompt. If you want the CLI plumbing already wired to the stack, that is the layer Metaflow adds on top.
Frequently Asked Questions
Can Claude run Meta ads? Claude can draft, score, and, only at Launch tier, with ads_management, call the Marketing API to pause an ad, raise a budget 15%, or duplicate a winner. Claude Code Meta Ads should not "run the account" unattended. Metaflow's agents use the same draft → review → launch boundary so a model never gets a raw spend lever on day one. Read-only scorecards and Ad Library diffs are safe first loops; writes wait.
Is Claude Code reliable for ad spend? Reliable as a reviewer, not as an unsupervised trader. Reliability is the approval stack, the 20% cap, the learning-phase skip, and stale-file exits, not the model's vibe. Reddit threads that call Claude unreliable for ads are usually describing a single script with write access and no gate. Metaflow treats Launch as a separate workflow with a consumed approval flag for that reason. Run Draft-only for two weeks and count false positives before you enable POST.
Is $10/day enough for Facebook ads with Claude Code? $10/day is a media-budget question, not a Claude Code Meta Ads question. Data-backed: Meta wants ~50 conversions in 5, 7 days to exit learning. At $10/day ($300/month), a $30 CPA yields about 10 conversions a month, the ad set will sit in Learning Limited. Loops do not lower that floor. Token cost for the four-loop stack is about $5/month either way. Use $10/day only for a tightly scoped test with a cheap event (Lead, AddToCart), or accept that Advantage+ and manual prospecting both starve at that budget.
How is Claude Code loop different from Meta Advantage+ automated rules? Meta automated rules / Advantage+ live inside Ads Manager. Advantage+ allocates delivery and (in ASC) targeting across your creative. Automated rules are if-then: pause if CPA > 2× target for 3 days. A Claude Code Meta Ads loop reads exports, classifies fatigue and test validity, watches the Ad Library, and drafts a proposal your approval stack may launch. Advantage+ cannot tell you a competitor shipped a new Reels hook. Automated rules cannot refuse a write because the ad set is in learning. Do not stack a rebalance loop on top of aggressive Advantage+ budget automation, they will fight, and learning will reset. Use Advantage+ for auction-time allocation; use loops for scorecards, creative judgment, and competitor watch.
Sources
- Claude Code official docs on scheduled tasks,
/loopcommand reference - Addy Osmani, Loop Engineering, origin of the loop engineering concept
- Meta Ad Library, public competitor ad snapshots
- GitHub, claude-ads plugin, Claude Code Google/Meta Ads tooling layer
- 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, Best Claude Code Workflows for Marketing Agencies, agency deployment patterns
- Metaflow, Claude Code Loop for Google Ads, sibling article in the cluster
- Metaflow, Claude Code Loop for Ad Creative Pipeline, sibling article for variant production





