Agent skill for the Meta (Facebook/Instagram) Ads CLI — manage campaigns, ad sets, ads, creatives, catalogs & insights from the terminal. Install: npx skills add gfsaaser24/meta-ads-cli
SaferSkills independently audited meta-ads-cli (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Unofficial skill — not affiliated with or maintained by Meta. Written from Meta's published Ads CLI developer docs and the third-party meta-ads package. Verify flags against the official docs before any spend-affecting command, as they may drift.The meta command (PyPI package meta-ads) is a developer-friendly wrapper over the Meta Marketing API. It manages the full ad stack — campaigns, ad sets, ads, creatives, pixels/datasets, catalogs, product feeds/sets — and queries insights, all from the terminal. Commands follow a noun-verb pattern:
meta ads <resource> <action> [options]Work through the three steps below in order: install → authenticate → run. Detailed command syntax lives in the reference files; load them as needed rather than guessing flags.
meta-ads needs Python 3.12+, which the Cowork sandbox usually lacks, so a bundled script provisions it with uv and installs the CLI in isolation. Run it once per session:
bash <skill_dir>/scripts/setup_meta_cli.shThe script is idempotent and prints its install location on the last line as META_BIN=<dir>. Capture that directory — each bash call starts fresh with no PATH carried over, so prepend `META_BIN` to PATH in every later command that runs `meta`:
export PATH="<META_BIN>:$PATH"
meta --versionIf the script reports it needs uv or Python 3.12+, that environment can't run the CLI; tell the user rather than improvising another install path.
The setup script and meta commands are bash-based. On Windows, run them inside WSL (Windows Subsystem for Linux) — if the user is on a native Windows shell with no WSL/bash available, tell them to install WSL first rather than trying to adapt the commands to PowerShell/cmd.
The CLI authenticates with a Meta system user access token and targets one ad account ID. There is no interactive login.
Ask the user for their token and ad account ID, then write them to a .env in the working directory and verify:
cat > .env << 'DOTENV'
ACCESS_TOKEN='<paste the user's token>'
AD_ACCOUNT_ID='act_<their ad account id>'
DOTENV
export PATH="<META_BIN>:$PATH"
meta auth status # shows a masked token if it loaded
meta ads adaccount list # confirms the token actually worksNotes that save back-and-forth:
AD_ACCOUNT_ID must be the act_... form. meta ads adaccount list shows valid IDs.BUSINESS_ID='<id>' to .env if the user works with catalogs/datasets and it isn't auto-resolved..env is ephemeral — it disappears when the session ends. If theuser wants their token to persist, offer to save the .env into their connected workspace folder and load it from there next time. Treat the token as a secret: don't echo it back in full or write it to memory.
project .env → user config (~/.config/meta/).
If the user hasn't generated a token yet, walk them through it using references/setup-and-auth.md (system user, asset assignment, required scopes).
Global options go before the resource, e.g. meta -o json ads campaign list. Output formats: table (default, human-readable), json (pipe to jq), plain (tab-separated for shell pipelines). Use --no-input and --force for non-interactive runs.
export PATH="<META_BIN>:$PATH"
meta ads campaign list
meta -o json ads campaign list | jq '.[].name'
meta ads insights get --date-preset last_7d --fields spend,impressions,ctr,cpcPick the matching reference file for exact syntax, required flags, and enum values before composing a command:
references/commands.md — every resource and action (campaign, adset, ad,creative, adaccount, page, dataset, catalog, product-feed/-item/-set), with required flags, enums (objectives, optimization goals, billing events, custom event types, verticals, dataset tasks), budgets-in-cents rule, and exit codes.
references/creatives-catalogs.md — building ad creatives (standard, video,photo, Instagram, Dynamic Creative), supported media types, call-to-action values, and the end-to-end creative→ad, conversion-tracking, and catalog/dataset workflows.
references/insights.md — meta ads insights get in full: date presets,custom ranges, time increments, breakdowns, sortable metrics, common fields.
references/setup-and-auth.md — generating the system user token (scopes,asset assignment) for users who don't have one yet.
--daily-budget 5000 means $50.00. Always confirm thefigure with the user in dollars before running, since a typo spends real money.
status ACTIVE (e.g. meta ads campaign update <ID> --status ACTIVE). Activating a campaign, ad set, or ad starts real ad spend on the user's account — make sure the user means to go live.
ad set removes its ads. --force skips the confirmation prompt.
error, 3 auth error, 4 API error, 5 not found.
--debug flag to see theunderlying Marketing API error before changing the approach.
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.