Skill 详情

meta-ads-cli

Direct, comprehensive Meta Ads management through the official Ads CLI.

匹配类型直接匹配已针对 meta 广告 审核
来源tristanmanchester/agent-skills外部来源
报告安装量36仅表示受欢迎程度

使用前先检查

自动化审核只检查相关性,不代表安全审查或推荐。使用前请阅读来源中的说明。

已保存的来源预览

SKILL.md

这段内容是审核时保存的快照。外部来源才是完整且最新的版本。

---
name: meta-ads-cli
version: 2.0.0
description: Use this skill when an AI agent needs to manage, audit, report on, create, pause, update, or troubleshoot Meta/Facebook/Instagram ads through Meta's official Ads CLI (`meta ads ...`). It is designed for any shell-capable agent, not just OpenClaw. It focuses on safe command planning, JSON output, confirmation gates, read-before-write behaviour, paused-by-default launches, reporting workflows, datasets/pixels, catalog/product operations, and failure handling.
license: MIT. See LICENSE.txt
compatibility: Requires a shell, Python 3.9+ for the optional guard script, and Meta's official Ads CLI (`pip install meta-ads`, Python 3.12+ per Meta docs). Works with OpenClaw, Claude Code, Codex CLI, Cursor, Aider, Goose, Crew/Autogen agents, and CI runners that can execute terminal commands.
metadata: {"author":"OpenAI","skill_type":"agent-agnostic-shell-skill","primary_cli":"meta ads","wrapped_cli":"scripts/meta_ads_agent.py","risk_model":"read-plan-approve-write-verify","created":"2026-04-30"}
---

# Meta Ads CLI Agent Skill

This skill teaches an AI agent to operate Meta ads through Meta's official **Ads CLI** instead of reimplementing the Marketing API.

The core command shape is:

```bash
meta ads <resource> <action> [options]
```

Examples from the official Ads CLI pattern include:

```bash
meta ads campaign list
meta ads campaign create --name "Summer Sale" --objective OUTCOME_SALES --daily-budget 5000
meta ads adset create CAMPAIGN_ID --name "My Ad Set" --optimization-goal LINK_CLICKS --billing-event IMPRESSIONS --targeting-countries US
meta ads creative create --name "Hero Banner" --page-id 111222333 --image ./banner.jpg --body "50% off" --title "Shop Now" --link-url https://example.com/sale --call-to-action SHOP_NOW
meta ads ad create ADSET_ID --name "Hero Banner Ad" --creative-id CREATIVE_ID
meta ads insights get --campaign_id CAMPAIGN_ID --fields impressions,conversions,spend --date-preset last_7d
```

Use the bundled guard script as the default execution path:

```bash
python3 scripts/meta_ads_agent.py doctor
python3 scripts/meta_ads_agent.py classify -- meta ads campaign list
python3 scripts/meta_ads_agent.py run -- meta ads campaign list --limit 25
```

The guard script does **not** replace Meta's CLI. It wraps it so agents behave safely and consistently.

## Highest-priority rules

1. **Use Meta's official CLI first.** Do not call Graph API directly unless the official CLI cannot do the task and the user explicitly accepts a lower-level workaround.
2. **Read before write.** Inspect the relevant account/object/performance state before changing it.
3. **No spend-affecting change without explicit user approval.** Writes, budget changes, activation, delete/remove, dataset/catalog connections, and creative uploads need approval.
4. **Never activate by accident.** New objects should remain `PAUSED` unless the user explicitly asks to activate. `ACTIVE`, `activate`, `delete`, `remove`, and `--force` are high-risk.
5. **Prefer machine-readable output.** Use JSON whenever possible: `meta --output json ads ...`. Use table output only for human presentation.
6. **One write step at a time.** Apply one mutation, verify it, then continue.
7. **Do not invent IDs.** Resolve account, campaign, ad set, creative, page, pixel/dataset, catalog, product set, and targeting IDs from the CLI or user-provided values.
8. **Keep tokens out of chat and logs.** Never print access tokens, app secrets, cookies, or `.env` contents.
9. **Ask for missing material only when blocking.** For reads, proceed with defaults. For writes, collect exact account, IDs, budget, date range, page/dataset/catalog, destination URL, and approval.
10. **Treat regulated/special categories carefully.** Housing, employment, credit, politics, social issues, health, financial services, minors, and sensitive audiences require extra review and conservative targeting.

## Recommended agent flow

For almost every request, follow this ord
在 GitHub 阅读完整来源 (打开外部页面)
相关上下文

相关工作