Meta Ads — Root Skill
Gate into all Meta Ads operations. Sub-skills:
- creative-strategy/ — bulk upload creatives (local or Drive), generate copy variations, structure ad sets by angle
- audience-builder/ — custom audiences from CSV (emails, phones, CRM leads including WhatsApp), lookalikes, behavioral
- fatigue-monitor/ — detect creative fatigue (CTR decay, frequency cap breach) and suggest pause/rotate
- spend-tracker/ — budget pacing, monthly projection, burn alerts
Prerequisites
- Run
npx adskills initto complete OAuth and register ad account(s) inconfig/accounts.json .envpopulated withMETA_APP_ID,META_APP_SECRET,META_REDIRECT_URI- Token stored encrypted at
~/.adskills/tokens.json(unlocked by session password)
Account selection
Every Meta operation needs an accountRef (key in config/accounts.json). If user's prompt is ambiguous, ask:
"Which account? (accounts available: acme, clienteX, clienteY)"
Destructive action policy
The following require explicit confirmation in the current chat:
- Pausing or deleting campaigns, ad sets, ads
- Changing budgets
- Increasing bids by >10%
- Publishing creatives with
status=ACTIVE(default =PAUSED)
Preview the exact change list and wait for "yes" / "confirma".
Invoking the client
import { MetaClient } from '../../../src/clients/meta.js';
import { getToken } from '../../../src/core/auth.js';
const token = await getToken('meta.acme', sessionPassword);
const client = new MetaClient({
accessToken: token.accessToken,
adAccountId: account.meta.adAccountId,
});
Common pitfalls
- Meta budget values are in cents of account currency (divide by 100 for display)
act_prefix is required onadAccountId(e.g.,act_1234567890)- Image uploads return a
hash, not a URL — persist the hash to createadcreatives - Long-lived tokens expire in ~60 days; refresh before major operations