meta_ad

v1.0.0

This skill automates the creation of Meta (Facebook/Instagram) ads using the Marketing API. It handles campaign setup, audience targeting, media upload, and...

0· 147·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for zine1993/metaad.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "meta_ad" (zine1993/metaad) from ClawHub.
Skill page: https://clawhub.ai/zine1993/metaad
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install metaad

ClawHub CLI

Package manager switcher

npx clawhub@latest install metaad
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description (Meta ads automation) align with included scripts (campaign/adset/ad/media upload/one‑shot flow). Required credentials (access token, ad account ID) are used by the code and documented in SKILL.md; nothing unrelated (e.g., AWS keys) is requested.
Instruction Scope
SKILL.md instructs running the bundled Python scripts and to run an interactive config step; the scripts only read local files (images/config), write a local config, and call the Meta Graph API endpoints documented in references. Note: the config is stored in plaintext under ~/.workbuddy/meta_ads_config.json which contains the access token, ad account ID, and optional app secret (sensitive).
Install Mechanism
There is no install spec (instruction-only install), which is low risk. However, the skill includes Python scripts that require the 'requests' library but the registry metadata does not declare dependencies—this may cause runtime errors if requests is absent. No external install URLs or archives are used.
Credentials
No environment variables are required (the code uses a local config file). The credential access requested (Meta Access Token, Ad Account ID, optional App ID/Secret) is proportionate to the task. Warning: credentials are persisted to a local file in the user's home directory in cleartext; protect or remove that file if needed.
Persistence & Privilege
always is false and the skill does not attempt to modify other skills or system-wide settings. It persists its own config under ~/.workbuddy/meta_ads_config.json (self-contained).
Assessment
This skill appears to do what it says, but before installing use a safe workflow: (1) review the bundled scripts (you already have them) and run them in a sandbox or virtualenv; (2) ensure Python 'requests' is installed; (3) create and use a token with minimal scopes and, if possible, a test ad account to avoid accidental spend; (4) be aware the Access Token and optional App Secret are saved to ~/.workbuddy/meta_ads_config.json in plaintext — delete or securely store that file when finished; (5) verify network calls (they go to graph.facebook.com) and confirm you trust the skill source (no homepage/author details provided). If you need higher assurance, request provenance (repository or author info) or run the scripts in an isolated environment first.

Like a lobster shell, security has layers — review code before you run it.

latestvk97bjbhjanbjnzwnaq4bb1bryx835czm
147downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Meta Ads Creator

自动化创建 Meta (Facebook/Instagram) 广告的 Skill,通过 Marketing API 实现从素材上传到广告发布的完整流程。

适用场景

当用户需要以下功能时触发此 Skill:

  • 通过 API 自动创建 Meta 广告
  • 批量创建广告系列、广告组、广告
  • 程序化管理广告投放
  • 自动化广告素材上传

前置要求

1. Meta 开发者账号

2. 配置信息

运行配置脚本获取所需信息:

cd .workbuddy/skills/meta-ads-creator/scripts
python config_manager.py

需要的信息:

  • Access Token: Meta API 访问令牌
  • Ad Account ID: 广告账户 ID (格式: act_123456789)
  • App ID (可选): 应用 ID
  • App Secret (可选): 应用密钥

3. 主页权限

创建广告需要 Facebook 主页 ID,确保你的账号有该主页的管理员权限。

使用方法

方式一:一键创建完整广告

使用 create_full_ad.py 脚本,通过 JSON 配置文件创建完整的广告结构:

python scripts/create_full_ad.py ad_config.json

配置文件示例 (ad_config.json):

{
  "product_name": "夏季连衣裙",
  "daily_budget": 50,
  "campaign_name": "夏季促销2024",
  "objective": "conversions",
  "status": "PAUSED",
  "targeting": {
    "countries": ["US"],
    "age_min": 25,
    "age_max": 45,
    "genders": [2]
  },
  "ad": {
    "page_id": "YOUR_PAGE_ID",
    "message": "限时优惠!夏季新款连衣裙5折起,快来选购!",
    "headline": "夏季大促",
    "images": ["image1.jpg", "image2.jpg"],
    "link_url": "https://yourstore.com/summer-sale",
    "call_to_action": "SHOP_NOW"
  }
}

生成示例配置文件:

python scripts/create_full_ad.py --example

方式二:分步创建

如需更精细控制,可分步创建:

1. 上传素材

python scripts/upload_media.py image1.jpg image2.jpg

2. 创建广告系列

python scripts/create_campaign.py "广告系列名称" conversions PAUSED

3. 创建广告组

python scripts/create_adset.py <campaign_id> "广告组名称" 5000 '{"countries":["US"],"age_min":25,"age_max":45,"genders":[2]}'

4. 创建广告

python scripts/create_ad.py <adset_id> "广告名称" '<creative_json>'

方式三:在代码中使用

from scripts.create_full_ad import create_full_ad

result = create_full_ad(
    product_name="产品名称",
    daily_budget=50,
    targeting_config={
        "countries": ["US"],
        "age_min": 25,
        "age_max": 45,
        "genders": [2]
    },
    ad_config={
        "page_id": "YOUR_PAGE_ID",
        "message": "广告文案",
        "images": ["image1.jpg"],
        "link_url": "https://example.com",
        "call_to_action": "SHOP_NOW"
    }
)

配置参数说明

广告目标 (Objective)

  • conversions - 转化量 (默认)
  • traffic - 流量
  • awareness - 品牌知名度
  • engagement - 互动率
  • app_installs - 应用安装
  • lead_generation - 潜在客户开发

受众定位 (Targeting)

参数类型说明
countriesarray国家代码,如 ["US", "CA"]
age_minint最小年龄
age_maxint最大年龄
gendersarray[1]=男, [2]=女, [1,2]=全部
interestsarray兴趣标签 ID 列表

CTA 按钮

  • SHOP_NOW - 立即购买
  • LEARN_MORE - 了解更多
  • SIGN_UP - 注册
  • DOWNLOAD - 下载
  • GET_OFFER - 获取优惠

脚本说明

脚本功能
config_manager.py管理 API 配置 (Token、账户ID)
meta_api.pyAPI 基础模块,包含通用请求方法
upload_media.py上传图片/视频素材
create_campaign.py创建广告系列
create_adset.py创建广告组 (受众、预算)
create_ad.py创建广告 (文案、素材)
create_full_ad.py一键创建完整广告

测试 API 连接

配置完成后,测试 API 连接:

python scripts/meta_api.py

成功后会显示:

  • Token 有效性
  • 广告账户信息
  • 现有广告系列列表

注意事项

  1. 默认暂停: 所有创建的广告默认状态为 PAUSED,请在 Meta 广告管理器中审核后手动启用
  2. 预算单位: API 中预算以"分"为单位,如 $50 需传入 5000
  3. 素材复用: 相同图片上传后会获得相同 hash,避免重复上传
  4. 错误处理: 脚本会输出详细的错误信息,请根据提示检查配置

参考文档

查看本 Skill 的 references/meta_api.md 获取更详细的 API 参考。

Comments

Loading comments...