Meta Ads logo

Meta Ads

Community
fdarkaou
meta-ads

Autonomous Meta Ads manager AND campaign builder. Two modes: (1) Daily ops - monitor campaigns, auto-pause bleeders, shift budget to winners, generate copy, deliver morning brief. (2) /meta-campaign - 8-stage campaign builder that takes a landing page URL and produces upload-ready ad creatives (images via Genviral Studio + copy) for 4-5 ad sets. Use when asked to build new Meta ad campaigns or check Meta Ads performance.

Overview

Publisherfdarkaou
Repositorygenviral-skill
Skill namemeta-ads
Stars
41
Forks
7
Bundled files
16
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 16 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by fdarkaou on GitHub. Read the source before you install it.

Installation

Install the Meta Ads AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/fdarkaou/genviral-skill/tree/main/meta-ads
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/fdarkaou/genviral-skill.git /tmp/genviral-skill
mkdir -p .claude/skills
cp -r /tmp/genviral-skill/meta-ads .claude/skills/meta-ads
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Meta Ads in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Meta Ads on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Meta Ads is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Meta Ads Skill

An OpenClaw skill for autonomous Meta Ads management and campaign building.

Companion skill: genviral-skill — image generation in Stage 7 uses the Genviral Studio API.


Two Modes

Mode 1: Daily Ops

Automated monitoring, optimization, copy generation, morning brief.

bash
bash scripts/run_all.sh genviral          # full pipeline
bash scripts/run_all.sh --dry-run         # no mutations
python3 scripts/health_check.py --product genviral --days 7
python3 scripts/auto_optimize.py --product genviral --dry-run
python3 scripts/copy_generator.py --product genviral --count 5

Mode 2: /meta-campaign — Campaign Builder

8-stage workflow: URL → research → strategy → creatives → upload

Images generated via Genviral Studio API (google/nano-banana-2 by default).

bash
# Full campaign (interactive)
python3 campaign/scripts/orchestrate.py --url https://yourproduct.com --product my-product

# Generate creatives after strategy approval
python3 campaign/scripts/generate_creatives.py --rundir campaign/runs/my-product-2026-03-02/ --all

# Single ad set
python3 campaign/scripts/generate_creatives.py \
  --rundir campaign/runs/my-product-2026-03-02/ \
  --ad-set ad-set-01-comparison

# Use higher quality model
python3 campaign/scripts/generate_creatives.py \
  --rundir campaign/runs/my-product-2026-03-02/ --all --pro

# Upload to Meta
python3 campaign/scripts/upload_to_meta.py \
  --rundir campaign/runs/my-product-2026-03-02/ --product my-product

The 8 Stages

#StageModeWhat happens
1LP AnalysisAutoScrapes landing page, extracts brand identity
2Deep InterviewHuman5 strategic questions about your product + audience
3Customer RoleplayOpus sub-agentAI becomes the ideal buyer — writes first-person pain, language, fears
4Market ResearchOpus sub-agent (parallel)Forum and community language mining, competitor review patterns
5Competitor AnalysisAutoMeta Ad Library patterns
6Campaign StrategyApproval gate4-5 scored angles + ad set architecture
7Creative GenerationApproval gateImages via Genviral Studio + copy per ad set
8UploadApproval gateUpload to Meta Ads Manager, all ads paused by default

Ad Creative Formats (Stage 7)

8 formats generated per ad set via Genviral's AI image models:

FormatFileBest for
Comparison tableimage-01-comparison.pngTool consolidation, pricing angles
Apple Notes styleimage-02-apple-notes.pngTips, insider knowledge
Quote cardimage-03-quotes.pngTestimonials, social proof
Handwritingimage-04-handwriting.pngFounder voice, contrarian takes
Notification mockupimage-05-notification.pngAutomation wins, "while you slept"
iMessage threadimage-06-imessage.pngConversation hooks
Stats wallimage-07-stats.pngCredibility, numbers
Before/afterimage-08-before-after.pngTransformation angles

Setup

1. Meta Graph API token

bash
cp config.example.yaml config.yaml
# Edit config.yaml — add your access_token and product details

Get a token: business.facebook.com → Settings → System Users → Generate Token Required permissions: ads_management, ads_read, pages_manage_ads, business_management

2. Genviral API key (for image generation)

bash
export GENVIRAL_API_KEY="your_key_here"

Get a key at genviral.io. Uses Studio credits. Models: google/nano-banana-2 (default, 1 credit) · google/nano-banana-pro (2 credits, --pro flag)

3. Install deps

bash
pip3 install pyyaml

4. Test

bash
python3 scripts/health_check.py --product my-product
python3 campaign/scripts/lp_analyzer.py --url https://yourproduct.com --output /tmp/test/
python3 campaign/scripts/generate_creatives.py --rundir /tmp/test/ --ad-set ad-set-01 --dry-run

File Structure

meta-ads-skill/
  SKILL.md                      ← This file (OpenClaw skill descriptor)
  config.example.yaml           ← Template — copy to config.yaml (gitignored)
  config.yaml                   ← YOUR config (gitignored, never commit)

  scripts/                      ← Daily ops
    meta_api.py                 ← Meta Graph API wrapper
    health_check.py             ← Campaign health (5 key questions)
    auto_optimize.py            ← Auto-pause bleeders, scale winners
    copy_generator.py           ← Generate copy variations from top performers
    ad_uploader.py              ← Upload ads to Meta
    morning_brief.py            ← Compile + send morning brief
    run_all.sh                  ← Full pipeline runner

  campaign/                     ← /meta-campaign builder
    scripts/
      orchestrate.py            ← Main entry point
      lp_analyzer.py            ← Stage 1: LP scraping + brand extraction
      ad_library.py             ← Stage 5: Meta Ad Library research
      generate_creatives.py     ← Stage 7: Image gen via Genviral Studio
      upload_to_meta.py         ← Stage 8: Upload creatives to Meta
    references/
      stage-prompts.md          ← Opus sub-agent prompts (stages 3+4)
      creative-formats.md       ← Image format templates + copy.md template
      genviral-config.md        ← Example product config (customize for yours)

  campaign/runs/                ← YOUR campaign output (gitignored)
  data/                         ← YOUR campaign data/history (gitignored)

Keeping Your Local Copy in Sync

This repo uses a public code / private data split. Your campaign runs and config are gitignored and stay local.

bash
# Pull latest skill updates without touching your data
git pull origin main

# Your campaign/runs/, data/, and config.yaml are safe — they're gitignored

Related

  • genviral-skill — full Genviral Partner API skill (scheduling, analytics, content pipeline, Studio image/video gen)
  • Genviral — the platform powering image generation in Stage 7
  • OpenClaw — the agent runtime this skill is built for

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Meta Ads AI skill do?

Autonomous Meta Ads manager AND campaign builder. Two modes: (1) Daily ops - monitor campaigns, auto-pause bleeders, shift budget to winners, generate copy, deliver morning brief. (2) /meta-campaign - 8-stage campaign builder that takes a landing page URL and produces upload-ready ad creatives (images via Genviral Studio + copy) for 4-5 ad sets. Use when asked to build new Meta ad campaigns or check Meta Ads performance.

Why use Meta Ads on TypingMind?

Because you install it once and use it with any model. Meta Ads is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Meta Ads in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/fdarkaou/genviral-skill/tree/main/meta-ads. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Meta Ads?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Meta Ads?

As many as you like. As long as a model supports skills, you can use Meta Ads with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Meta Ads AI skill free?

It is published on GitHub by fdarkaou. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇