Skip to main content
Category: GTM Intelligence · Version: 0.0.1 · Author: opendirectory · Compatibility: All targets (claude, codex, opencode, gemini, anti-gravity, openclaw, hermes)
meta-ads-skill

Overview

The Meta Ads Skill is a comprehensive, production-ready skill designed to give LLMs and AI agents expert-level capabilities to orchestrate the official Meta Ads Python CLI. By using this skill, an agent transforms into an Expert Media Buyer. It will know exactly how to explore ad structures, troubleshoot campaign performance (like CPA spikes), discover new audiences, and format massive Meta APIs JSON payloads into beautiful, readable markdown reports.

Install

For Agents: How to Use This Skill Efficiently

This skill is designed using a Progressive Disclosure (Hub-and-Spoke) architecture to maximize context window efficiency:
  1. The Hub (SKILL.md): The primary entry point. It provides strict guardrails, safety protocols, and the authentication troubleshooting workflow.
  2. The Spokes (references/):
    • When you need to perform a specific task (e.g., investigating a CPA spike), read references/workflows.md for the exact step-by-step orchestration strategy.
    • When presenting data to the user, read references/report_templates.md to strictly follow the required Markdown layout.

Strict Agent Guardrails

  • Context Protection: ALWAYS default to time_range="last_7d" for insights. ALWAYS use limit=10 for listing campaigns/adsets initially.
  • Safety First: NEVER execute state-changing tools (create_campaign, update_campaign) without explicitly showing the parameters to the user and waiting for their affirmative confirmation.

Setup

To use this skill, you must install the official Meta Ads CLI and configure your credentials.

1. Set up the CLI

The skill relies on the meta-ads Python package:

2. Authentication (System User Token)

The CLI uses a System User Access Token for authentication.
  1. Generate a System User Token in your Meta Business Suite.
  2. Ensure the token has ads_management, ads_read, and read_insights permissions.
  3. Set the following environment variables on your machine:

Skill Repository Structure

When you deploy this skill, the structure will look like this:

Supported Commands

This skill orchestrates the meta-ads CLI using a noun-verb structure:
  • Campaigns: meta ads campaign list, meta ads campaign create
  • Ad Sets: meta ads adset list
  • Ads: meta ads ad list
  • Insights: meta ads insights get