How To Build Entire AI Ad Campaigns With Claude Code (free repo)
By Mr. Paid Social
Key Concepts
- Claude Code: An AI-powered coding agent that acts as a creative manager, capable of executing complex workflows, managing files, and interacting with APIs directly from the desktop.
- Arc Ads API: A specialized platform used for generating AI-based image and video ad assets at scale.
- Meta Marketing API: The interface used to programmatically manage ad accounts, campaigns, and creative uploads without using the Meta Ads Manager interface.
- C-Dance 2.0: An AI video generation model used for creating consistent character-based UGC (User Generated Content) and animation-style ads.
- Eleven Labs: An AI voice and audio generation tool used for voice-overs and background music.
- Agentic Workflow: A system where the user acts as a "Creative Director," delegating tasks (research, generation, editing, deployment) to autonomous AI agents.
1. System Setup and Configuration
The workflow relies on a GitHub repository that automates the connection between Claude Code and various APIs.
- Installation: Users download Claude Desktop and initialize a local folder to serve as the workspace.
- Meta API Integration: Users must create a "Meta App" via
developers.facebook.com, configure a privacy policy URL, and generate an access token. - Environment Variables (
.env): Sensitive keys (Meta Access Token, Arc Ads API Key, Eleven Labs API Key) are stored in a local.envfile. Claude Code is instructed to manage this file to prevent security risks. - Security: The creator recommends using "Auto Mode" rather than "Bypass Permissions" to maintain control over what the agent can execute on the local machine.
2. Image Ad Generation and Cloning
- Template-Based Generation: By providing a single product image, Claude Code can apply it to dozens of pre-built templates (e.g., iMessage threads, Slack notifications, "Us vs. Them" comparisons).
- Competitor Analysis: The agent can scrape the Meta Ad Library to identify competitor ads, analyze their performance, and download high-leverage creative concepts.
- Cloning: Users can drag and drop competitor ads into the workspace; Claude Code analyzes the visual composition and recreates the ad using the user's specific product.
3. AI UGC and Video Production Workflow
The system eliminates the need for traditional editing software (CapCut, Adobe Premiere).
- Persona Consistency: Claude Code generates a "style sheet" of a character (e.g., a "stressed mom") in multiple angles to ensure visual consistency across scenes.
- Storyboarding: The agent generates scripts and storyboard frames. If a generation fails (e.g., due to content policy), the agent automatically revises the script and retries.
- B-Roll and Post-Production: The agent generates B-roll shots, overlays them onto the base video, adds background music (via Eleven Labs), and burns in captions—all through natural language commands.
4. Animation-Style Ads
The system supports specialized visual styles:
- Claymation/Pixar Style: These are highlighted as "brand-safe" and highly engaging for storytelling.
- Process: The agent breaks down a reference video into individual clips, generates new assets in the desired style, creates a custom voice-over, and mixes audio/visuals into a final 30+ second ad.
5. Automated Ad Deployment
The most significant efficiency gain is the ability to launch campaigns without touching Ads Manager:
- Data-Driven Copywriting: Claude Code pulls performance data from the existing ad account to identify winning copy frameworks. It then writes five unique variations of primary text and headlines for every new ad creative.
- Campaign Structure: The agent organizes ads into campaigns and ad sets based on creative concepts, sets budgets (e.g., $50 CBO), and deploys them directly to the Meta account.
6. Notable Quotes and Perspectives
- "You turn into the creative director and Claude Code just turns into your creative strategist and video editing team."
- On Risk Management: The creator warns against allowing AI to autonomously change bids or budgets to avoid triggering Meta’s anti-spam/security flags. He suggests using a dedicated "AI-only" ad account for testing.
Synthesis/Conclusion
This system represents a shift from manual ad creation to agentic delegation. By leveraging Claude Code as an orchestrator, media buyers can move from "doing" (editing, writing, uploading) to "directing" (reviewing, iterating, and strategy). The primary takeaway is that by integrating specialized APIs (Arc Ads, Eleven Labs) with a coding agent, one can achieve massive creative output and testing velocity that would otherwise require a full team of designers, editors, and VAs.
Chat with this Video
AI-PoweredLoad the transcript when you're ready to chat so the initial page stays lighter.
Related Videos

The Age Of The 40-Year-Old Solo Founder Is Here
Y Combinator

Humanize AI Content Manually: Bypass AI Detectors in Minutes
Andy Stapleton

How to Fix Inauthentic Content Before You Start Losing Viewers
HubSpot Marketing

Claude Code Local SEO: How I Ranked #1 On Google (Steal This)
Jono Catliff

Unfortunately, 99% of founders will never understand the power of micro personas
Steph France

Comment “AI Ads” and I’ll send you the tool they used for this.
Mr. Paid Social

i10X Review: The All-in-One AI Tool That Replaces ChatGPT, Midjourney & Claude (Save 90% on AI Costs
ManuAGI - AutoGPT Tutorials