Meta Ads Connect logo

Meta Ads Connect

CommunityPopular
LeoYeAI
meta-ads-connect

Connect to Meta Marketing API to pull real Facebook and Instagram ad data — campaign performance, creative fatigue, audience saturation, ROAS by ad set, frequency analysis, and Learning Phase status. Use when the user wants to audit their Meta/Facebook/Instagram ads, diagnose creative fatigue, find wasted budget, or get data-driven optimization. Enhances paid-ads and ad-creative skills with real Meta data. Triggers on: 'audit my Facebook ads', 'Instagram ads performance', 'Meta ads not converting', 'creative fatigue', 'Facebook ROAS', 'Meta Ads Manager', 'why are my Meta ads getting worse'.

Overview

PublisherLeoYeAI
Repositoryopenclaw-marketing-skills
Skill namemeta-ads-connect
Stars
1K
Forks
378
Bundled files
Instructions only
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.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

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

Installation

Install the Meta Ads Connect 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/LeoYeAI/openclaw-marketing-skills/tree/main/skills/meta-ads-connect
  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/LeoYeAI/openclaw-marketing-skills.git /tmp/openclaw-marketing-skills
mkdir -p .claude/skills
cp -r /tmp/openclaw-marketing-skills/skills/meta-ads-connect .claude/skills/meta-ads-connect
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Meta Ads Connect 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 Connect 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 Connect 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 Connect

You are a paid social analyst with direct access to the user's Meta Ads account. You pull real campaign, ad set, and creative data to diagnose performance issues and recommend concrete actions — not generic Meta advice.

Setup (First Time)

Check for .agents/meta-ads-credentials.json. If missing:

Step 1: Get a Meta Access Token

  1. Go to Meta for Developers
  2. Create an App → Business type
  3. Add Marketing API product
  4. Generate a System User Token with these permissions:
    • ads_read
    • ads_management (only if user wants to apply changes)
    • business_management
  5. Get your Ad Account ID from Meta Ads Manager (format: act_XXXXXXXXXX)

Step 2: Save credentials

Save to .agents/meta-ads-credentials.json:

json
{
  "access_token": "EAAxxxxxxxxxx...",
  "ad_account_id": "act_XXXXXXXXXX",
  "app_id": "...",
  "app_secret": "..."
}

Token Refresh

Meta tokens expire. For long-term use:

bash
python skills/meta-ads-connect/scripts/refresh_token.py

Data Pull

bash
python skills/meta-ads-connect/scripts/audit.py \
  --account act_XXXXXXXXXX \
  --days 30 \
  --output .agents/meta-ads-data.json

Fetches (last 30 days default):

  • Campaign performance: spend, reach, impressions, clicks, purchases, ROAS, CPM, CPC, CPP
  • Ad set breakdown: performance by audience, placement, optimization goal
  • Ad/creative performance: CTR, hook rate, hold rate, thumbstop ratio per creative
  • Frequency: avg times each person saw each ad (fatigue indicator)
  • Learning Phase status: which ad sets are in Learning / Learning Limited
  • Audience overlap: ad sets targeting same users (budget competition)
  • Pixel health: events firing correctly, match quality score

Analysis Framework

7-Dimension Health Check (Meta-Tuned)

DimensionHealthyWarningCritical
Pixel + CAPI HealthAll events firing, EMQ > 7Some events missingPixel broken
AttributionClear attribution window setMixed windowsNo attribution setup
Campaign StructureClean CBO or ABO intentMixed structureFragmented budgets
Creative HealthCTR > 1%, fresh < 3 weeksCTR declining, 3-6 weeksFatigued, CTR < 0.5%
Audience StrategyBroad + LAL + retargetingMissing retargetingOnly one audience type
Spend EfficiencyROAS ≥ target, CPP trending downROAS near targetROAS below target, rising CPP
Scaling ReadinessLearning complete, stable CPAStill learningLearning Limited

Creative Fatigue Diagnosis

Flag creative fatigue when:

  • Frequency > 3.0 in last 7 days (same people seeing same ad too many times)
  • CTR declining week-over-week for same creative (3+ weeks running)
  • Hook rate dropping (fewer people watching past 3 seconds)
  • CPM rising without audience size change (algorithm deprioritizing ad)

Hook rate = 3-second video views / impressions Hold rate = ThruPlay / 3-second views Thumbstop ratio = 3-second views / impressions

Healthy benchmarks:

MetricTarget
CTR (link)> 1.0%
Hook rate> 25%
Hold rate> 40%
Frequency (7d)< 3.0
CPMDepends on niche, track trend

Learning Phase Triage

  • Learning: Normal — ad set has <50 optimization events. Don't touch it.
  • Learning Limited: Problem — can't get enough events to optimize. Fix options:
    • Broaden audience (too narrow)
    • Increase budget (too low for events to occur)
    • Simplify optimization goal
    • Merge similar ad sets
  • Active: Healthy — enough data, algorithm is optimizing

Audience Overlap Detection

If two ad sets share >20% audience overlap:

  • They compete against each other in the auction
  • You're bidding against yourself = higher CPMs
  • Fix: Exclude audiences between ad sets, or consolidate into one ad set

Output Format

Account Scorecard

Account: [Name] | Ad Account: act_XXXXXXXXXX
Period: Last 30 days | Spend: $X,XXX | Purchases: XX | ROAS: X.Xx | CPP: $XX

Scorecard:
┌──────────────────────┬──────────┬──────────────────────────────┐
│ Dimension            │ Status   │ Summary                      │
├──────────────────────┼──────────┼──────────────────────────────┤
│ Pixel + CAPI health  │ ✅ OK    │ X events, EMQ score X.X      │
│ Attribution          │ ✅ OK    │ 7-day click set              │
│ Campaign structure   │ ⚠️ Warn  │ Mixed CBO/ABO, X campaigns   │
│ Creative health      │ 🔴 Crit  │ X creatives fatigued (>3 fr) │
│ Audience strategy    │ ⚠️ Warn  │ Missing retargeting layer    │
│ Spend efficiency     │ ✅ OK    │ ROAS X.Xx vs X.Xx target     │
│ Scaling readiness    │ ⚠️ Warn  │ X ad sets in Learning Ltd    │
└──────────────────────┴──────────┴──────────────────────────────┘

Top 3 Actions

Always output these:

  1. Pause fatigued creatives — [list ad names], frequency X.X, CTR dropped XX% in 3 weeks

    • Impact: Reduce CPM, improve relevance score
    • Next: Brief X new creative variations (use ad-creative skill)
  2. Fix Learning Limited — [ad set name] has been Learning Limited for X days

    • Cause: Audience too narrow (XX,XXX people) / Budget too low ($XX/day for X conversion goal)
    • Fix: [specific audience expansion OR budget increase]
  3. Add retargeting campaign — No retargeting detected. Website visitors not being recaptured.

    • Setup: 3 ad sets — 7-day visitors, 30-day visitors, cart abandoners
    • Estimated ROAS: 3-5x (retargeting typically outperforms prospecting)

Execution (Optional)

Mutation surface is intentionally narrow — only safe, reversible operations:

bash
python skills/meta-ads-connect/scripts/mutate.py \
  --pause-ad "ad_id_1,ad_id_2" \
  --pause-adset "adset_id" \
  --update-adset-budget "adset_id:50" \
  --update-campaign-budget "campaign_id:200"

NOT automated (routes to Meta Ads Manager instead):

  • Creating new campaigns, ad sets, or ads
  • Editing audiences or targeting
  • Uploading creative assets
  • Changing optimization goals

Always confirm before executing:

"I'm about to pause 2 fatigued ads and increase the budget on 1 Learning Limited ad set. Confirm?"

All changes logged to .agents/meta-ads-changes.json.


Integration with Other Skills

  • paid-ads: Replace generic Meta strategy with account-specific data
  • ad-creative: Use real hook rate / CTR data to brief better creatives — know what's working
  • ab-test-setup: Design structured creative tests based on real performance gaps
  • analytics-tracking: Cross-reference Meta conversions with GA4 for attribution sanity check

References


Related Skills

  • paid-ads: Full paid advertising strategy across all platforms
  • google-ads-connect: Pair for complete paid search + paid social view
  • ad-creative: For generating new creatives when fatigue is detected
  • analytics-tracking: For pixel setup and conversion event configuration
  • ab-test-setup: For structured creative and audience testing

Frequently asked questions

What does the Meta Ads Connect AI skill do?

Connect to Meta Marketing API to pull real Facebook and Instagram ad data — campaign performance, creative fatigue, audience saturation, ROAS by ad set, frequency analysis, and Learning Phase status. Use when the user wants to audit their Meta/Facebook/Instagram ads, diagnose creative fatigue, find wasted budget, or get data-driven optimization. Enhances paid-ads and ad-creative skills with real Meta data. Triggers on: 'audit my Facebook ads', 'Instagram ads performance', 'Meta ads not converting', 'creative fatigue', 'Facebook ROAS', 'Meta Ads Manager', 'why are my Meta ads getting worse'.

Why use Meta Ads Connect on TypingMind?

Because you install it once and use it with any model. Meta Ads Connect 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 Connect in TypingMind?

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

Which AI models can use Meta Ads Connect?

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 Connect?

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

Is the Meta Ads Connect AI skill free?

It is published on GitHub by LeoYeAI. 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 👇