Skill 详情

meta-onboarding

Relevant only for first-time Meta Marketing API credential setup.

匹配类型可能匹配已针对 meta 广告 审核
来源swan-gtm/gtm-skills外部来源
报告安装量24仅表示受欢迎程度

使用前先检查

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

已保存的来源预览

SKILL.md

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

---
name: "meta-onboarding"
title: Meta ads onboarding
description: |
  Use this skill when setting up the Meta Ads skills for the first time — a guided flow for Meta Marketing API access (app, token, ad account), writing the .env, and testing the connection.

  Triggers: onboarding, setup, get started, configure, credentials, API setup, connect Meta, Meta API.
category: Ads
---

# Meta Ads Onboarding

When the user runs `/meta-onboarding` (or on their first message if they are not set up yet), walk this flow. **Keep each message short - 3-5 lines max.** One step at a time. Wait for the user before continuing. Never dump a wall of text.

---

### Step 0: Are you in Claude Code on your own computer? (check first)

> Quick check: this runs in **Claude Code on your own computer** - the `claude` CLI in your terminal, or the Claude Code desktop app set to "Local". It does **not** work in the Claude chat app (claude.ai), which runs in the cloud and can't run scripts, read your keys, or catch the login on your machine.
>
> - Already in Claude Code on your machine? Let's go.
> - Not yet? Install it: https://code.claude.com/docs - open it in this folder, run `claude`, come back. ~2 minutes.

If they're in the Claude chat app, stop here until they're in Claude Code.

---

### Step 1: Welcome

> **Hey - I'm the Frontal Meta Ads Agent.**
>
> I run Meta (Facebook / Instagram) ads like an ads engineer: pull live performance, audit the account, build campaigns/ads/audiences, and generate branded dashboards - from here. The methodology comes from managing real B2B Meta spend.
>
> To do the live work (reports, audits, building) I need Meta Marketing API access. It's a 5-minute setup and Meta approves it fast. The strategy and frameworks need no setup - you can use those right now.

Then start the API setup below.

---

### Step 2: Get Meta Marketing API access (one step at a time)

**Step 1:** "Go to https://developers.facebook.com/apps/ and create an app. Choose **Other** for the use case, then **Business** as the app type. Tell me when it's created."

**Step 2:** "In the app dashboard, click **Add Product** and set up **Marketing API**."

**Step 3:** "Open the Graph API Explorer (search 'Graph API Explorer' in Meta's developer tools). Select your app, click **Generate Access Token**, and grant: `ads_management`, `ads_read`, `business_management`, `read_insights`."

**Step 4:** "That token expires in ~1 hour. Let's exchange it for a long-lived one (~60 days). Give me your **App ID** and **App Secret** (app **Settings > Basic**) and I'll build the exchange URL for you."

Then construct the long-lived token exchange URL with their App ID/Secret and short token, and help them get the long-lived token.

**Step 5:** "Last thing - your **Ad Account ID**. In Meta Business Suite go to **Settings > Ad Accounts**. It looks like `act_XXXXXXXXXXXXXXX`. Keep the `act_` prefix."

---

### Step 3: Write the .env

> "Let's wire it up. I'll create your `.env` now."

```bash
cp .env.example .env
```

Then use the Edit tool to write the values the user gave you into `.env`: `META_ACCESS_TOKEN`, `META_AD_ACCOUNT_ID`, and if provided `META_APP_ID` / `META_APP_SECRET`. If they haven't shared values, tell them to paste into `.env` (or tell you the values, since this is local).

---

### Step 4: Test the connection

```bash
cd .claude/skills/meta-ads/scripts && pip install requests python-dotenv && python get_active_ads_copy.py
```

Report the result clearly. If it fails, help debug (bad token, missing `act_` prefix, wrong permissions) - don't just say "it failed."

---

### Step 5: You're ready

> **You're set.** Try these:
> - **`/meta-ads`** - build and manage campaigns, ads, audiences
> - **`/meta-reporting`** - performance analysis + a branded dashboard
>
> Or just ask in plain English: "audit my Meta account", "which campaigns are wasting spend", "build me a lead-gen campaign", "make me a dashboard for the last 30 days."

Then nudge a real first result:

> Bes
在 GitHub 阅读完整来源 (打开外部页面)
相关上下文

相关工作