Skills

Meta Ads Connect

Connect to Meta Marketing API to pull real Facebook and Instagram ad data, campaign...

Install

npx skills add LeoYeAI/openclaw-marketing-skills --skill meta-ads-connect -g -a claude-code -y
Category
Marketing
Updated
5mo ago
License
See repository
Context cost
Mediumabout 1,854 tokens
Runs scripts
No, instructions only

What it does

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'.

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:

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

Token Refresh

Meta tokens expire. For long-term use:

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

Data Pull

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)

Read the whole SKILL.md on GitHub

More in Marketing