Lanbow Ads Skills
End-to-end Meta Ads lifecycle management across 4 features: Strategy → Creative → Delivery → Review, forming a continuous optimization loop. Built by Lanbow — see the detailed guide for more information.
Feature Map
| # | Feature | Skill | What It Does | Key Dependency |
|---|
| 1 | Strategy Research | INLINECODE0 | Market analysis, competitive intelligence, messaging strategy | WebSearch / WebFetch |
| 2 |
Creative Generation |
creative_gen | AI-generated ad images from strategy inputs | User's Gemini API Key |
| 3 | Ad Delivery |
lanbow-ads | Campaign creation and management via Meta Ads CLI | User's Meta Access Token |
| 4 | Post-Campaign Review |
post-campaign-review | Performance diagnosis and optimization plan | Campaign delivery data |
System Decision Tree
Starting a new campaign from scratch?
→ Start at Feature 1 (Strategy) → Feature 2 (Creative) → Feature 3 (Delivery)
Have strategy, need creatives?
→ Start at Feature 2 (Creative) → Feature 3 (Delivery)
Have creatives, need to launch?
→ Start at Feature 3 (Delivery)
Campaign already running, need to optimize?
→ Start at Feature 4 (Review) → loop back to Features 1-3 as needed
Quick ad hoc task? (list campaigns, check performance, upload image, etc.)
→ Use Feature 3 (Delivery / lanbow-ads CLI) directly
Full Lifecycle Loop
CODEBLOCK0
Feature 1: Strategy Research
Skill: ads-strategy-researcher | Details: strategy-research.md
Perform pre-campaign market analysis using WebSearch + WebFetch. Produces a structured strategy report.
Trigger phrases: "ads strategy", "marketing plan", "competitor research", "market research"
Inputs: product URL, business objectives, campaign context, audience info, competitors
Key outputs that feed Feature 2:
| Output | Used By |
|---|
| Key Message (primary promise + reasons) | INLINECODE5 / requirements in creative gen |
| Key Look (visual cues, composition) |
requirements in creative gen |
| Ad Angles (hooks, CTAs) |
input_cta in creative gen |
| Audience Segments |
audience_descriptions in creative gen |
Strategy types: Omni-Channel (Amazon + TikTok + Meta) or Meta-Only
Feature 2: Creative Generation
Skill: creative_gen | Details: creative-generation.md
Generate ad creative images via 2-step Gemini pipeline: proposals (gemini-2.5-flash) → images (gemini-3.1-flash-image-preview).
Trigger phrases: "generate ad", "create ad image", "ad creative", "generate creatives"
Requires: GEMINI_API_KEY (optional env var — only needed when using this feature; not required for Features 1, 3, or 4)
Inputs: product info, audience descriptions, requirements, CTA, aspect ratio, optional product image
Outputs: creative-proposals.json + ad-*.png images + reusable prompt templates
Connection to Feature 3: Upload generated images via lanbow-ads images upload, then reference image_hash in lanbow-ads creatives create.
Feature 3: Ad Delivery
Skill: lanbow-ads | Details: ad-delivery.md
Execute campaign setup and management via the lanbow-ads CLI.
Trigger phrases: "create campaign", "launch ads", "upload image", "show campaigns", "投放广告"
Requires: Meta Access Token, App ID, Ad Account ID (declared in requires.env). App Secret is optional — only needed for exchanging short-lived tokens to long-lived tokens via lanbow-ads auth exchange.
Credential setup (try in order):
- 1. Environment variables or platform secret fields (best): If
META_ACCESS_TOKEN, META_APP_ID, and META_AD_ACCOUNT_ID are already set as environment variables (or via your platform's secret/credential fields), configure the CLI automatically:
CODEBLOCK1
- 2. Ask the user to provide credentials directly (most common): If env vars are not set, tell the user exactly how to get each credential from Meta's web interface. Recommend the user use their platform's secret fields or environment variables rather than pasting credentials directly into chat. If direct input is the only option, only request the minimum credentials needed for the current task:
-
Access Token: Open https://developers.facebook.com/tools/explorer/ → select your App → click "Generate Access Token" → select permissions
ads_management,
ads_read,
business_management → click "Submit" → copy the token
-
App ID: Go to https://developers.facebook.com/apps/ → select your App → App Settings → Basic
-
Ad Account ID: Go to https://adsmanager.facebook.com/ → find
act_XXXXXXXXX in the URL or account dropdown
-
App Secret (only if needed for token exchange): App Settings → Basic → click "Show" next to App Secret
Then run the CLI commands on their behalf. For a full walkthrough, see meta-account-setup.md.
- 3.
lanbow-ads auth login (last resort): This opens a browser on the agent's machine for OAuth. It only works when you and the user are on the same machine. Do NOT attempt this by default. If the user can't open the auth URL or auth login fails, fall back to method 2 immediately — ask for credentials directly. Do NOT retry or keep sending OAuth URLs.
Credential scope limits: The agent must ONLY use provided credentials for lanbow-ads CLI commands. The agent must NOT log, echo, or store credentials in any file other than via the lanbow-ads config set and lanbow-ads auth set-token commands. The agent must NOT transmit credentials to any endpoint other than the Meta Marketing API (via the CLI).
Campaign creation sequence:
- 1.
lanbow-ads campaigns create — create campaign (PAUSED) - INLINECODE32 /
lanbow-ads videos upload — upload media - INLINECODE34 — create creative with media
- INLINECODE35 — create ad set with targeting + budget
- INLINECODE36 — create ad linking ad set + creative
- Verify with
lanbow-ads campaigns get / INLINECODE38
Key rules:
- - Budgets in cents (5000 = $50.00)
- Always create in PAUSED status, activate after review
- Use
--json flag when output feeds into another step - For OUTCOMESALES: must include
--promoted-object with pixelid
Feature 4: Post-Campaign Review
Skill: post-campaign-review | Details: post-campaign-review.md
Analyze delivery data, diagnose performance issues, generate optimization recommendations.
Trigger phrases: "review campaign", "campaign diagnosis", "optimize ads", "复盘", "投后分析"
Data collection: Fetch via lanbow-ads insights get --json at multiple dimensions (campaign, ad set, ad, audience breakdowns, daily trends).
Diagnostic framework:
- - Metric health check against benchmarks (CTR, CPC, CPM, frequency, ROAS)
- Root cause patterns: creative fatigue, audience saturation, targeting mismatch, budget issues, landing page problems
Output: Prioritized optimization plan (P0 immediate → P1 creative → P2 targeting → P3 strategic)
Feedback loop: Review findings feed back into:
- - Feature 1 (new strategy if targeting mismatch or new opportunity found)
- Feature 2 (creative refresh if fatigue diagnosed)
- Feature 3 (budget/targeting adjustments, pause/activate ads)
Cross-Feature Data Flow
CODEBLOCK2
Security & Privacy
Credentials
Required (declared in metadata.openclaw.requires.env — needed for ad delivery):
| Env Var | Sensitivity | Used By | Storage Location |
|---|
| INLINECODE44 | High — grants ad account access | Feature 3 (Ad Delivery) | INLINECODE45 CLI config dir (~/.config/lanbow-ads/) |
| INLINECODE47 |
Medium — app identifier | Feature 3 (Ad Delivery) |
lanbow-ads CLI config dir |
|
META_AD_ACCOUNT_ID | Low — account identifier | Feature 3 (Ad Delivery) |
lanbow-ads CLI config dir |
Optional (only request when the specific feature is needed):
| Env Var | Sensitivity | When Needed | Storage Location |
|---|
| INLINECODE51 | High — can generate long-lived tokens | Only for lanbow-ads auth exchange (short→long-lived token swap) | INLINECODE53 CLI config dir |
| INLINECODE54 |
High — API access | Only for Feature 2 (Creative Generation via Gemini) | User's environment only; never persisted by this skill |
Do NOT request optional credentials unless the user's task specifically requires them. For example, listing campaigns or checking insights needs only META_ACCESS_TOKEN, META_APP_ID, and META_AD_ACCOUNT_ID.
Secure Credential Delivery
Prefer environment variables or your platform's secret/credential fields over pasting credentials into chat. If the user must provide credentials in conversation, only request the minimum set needed for the current task. Never ask for META_APP_SECRET or GEMINI_API_KEY unless the user explicitly needs token exchange or creative generation.
Required Runtime Dependencies
| Dependency | Source | Purpose |
|---|
| INLINECODE60 CLI | Install via npm i -g lanbow-ads (npm registry) | Campaign management and performance data retrieval via Meta Marketing API |
| WebSearch / WebFetch |
Built-in agent tools | Market research and competitive intelligence gathering |
Credential Scope Restrictions
The agent is restricted to the following credential operations only:
- -
lanbow-ads config set --app-id / --app-secret / --account — configure CLI - INLINECODE65 — set access token
- INLINECODE66 — exchange short-lived token for long-lived token
- INLINECODE67 — verify token validity
The agent must NOT:
- - Log, echo, or print credentials in plain text
- Store credentials in any file other than via
lanbow-ads CLI commands - Transmit credentials to any endpoint other than the Meta Marketing API (via CLI)
- Use credentials for purposes outside ad campaign management
Data Flow & Privacy
- - What leaves the machine: API calls to Meta Marketing API (via
lanbow-ads CLI), API calls to Google Gemini (for image generation), web searches (for strategy research) - What stays local: Strategy reports, generated creative images, campaign review documents, CLI configuration files
- Credential handling: Credentials are configured via the
lanbow-ads CLI and stored in its config directory (~/.config/lanbow-ads/). This skill itself does not persist or transmit credentials beyond passing them to the CLI.
Token Lifetime & Cleanup
| Token Type | Lifetime | When to Use |
|---|
| User Access Token (Graph API Explorer) | ~1-2 hours | Quick tests, one-off campaigns |
Long-lived User Token (via auth exchange) |
~60 days | Short-term automation |
| System User Token | Never expires | Production/agency use only |
After use, always clean up stored credentials:
CODEBLOCK3
Security Recommendations
- 1. Use env vars or secret fields, not chat — provide credentials via environment variables or your platform's secret/credential input fields. Avoid pasting App Secret or long-lived tokens directly into an open conversation
- Only supply what's needed —
GEMINI_API_KEY is only needed for creative generation, META_APP_SECRET is only needed for token exchange. Do not provide them if your task doesn't require those features - Prefer short-lived tokens — start with a User Access Token from Graph API Explorer (~1-2 hours). Only use System User Tokens for production automation where you control the runtime
- Verify your runtime environment — only provide credentials if the agent runs on a machine you trust. Do NOT paste secrets into hosted/shared agent environments
- Use a dedicated test Ad Account — create a separate Ad Account with minimal budget for agent-managed campaigns; do not use your primary production account
- Least privilege scopes — when generating tokens, grant only
ads_management and ads_read unless additional permissions are explicitly needed - Rotate after use — revoke tokens in Meta Business Settings after your session ends, especially if you used long-lived tokens or App Secret
- Verify
lanbow-ads provenance — install from the official npm registry and verify the package before use
Resources
All sub-skill instructions and reference materials are self-contained in references/.
Feature 1: Strategy Research
Feature 2: Creative Generation
- - creative-generation.md — Full Gemini 2-step pipeline: proposals → image generation, API calls, prompt templates
Feature 3: Ad Delivery
- - ad-delivery.md — Full lanbow-ads CLI guide: campaign creation, targeting, insights, configuration
- ad-delivery-commands.md — Complete command reference with all flags, types, and descriptions
- meta-account-setup.md — Step-by-step Meta developer registration, app creation, OAuth setup, and ad account configuration
Feature 4: Post-Campaign Review
- - post-campaign-review.md — Full diagnostic framework, metric benchmarks, optimization plan template, feedback loop
Lanbow Ads 技能
跨4大功能的端到端Meta广告生命周期管理:策略 → 创意 → 投放 → 复盘,形成持续优化闭环。由 Lanbow 构建 — 详见详细指南。
功能图谱
| # | 功能 | 技能 | 功能说明 | 关键依赖项 |
|---|
| 1 | 策略研究 | ads-strategy-researcher | 市场分析、竞品情报、信息传递策略 | WebSearch / WebFetch |
| 2 |
创意生成 | creative_gen | 基于策略输入生成AI广告图片 | 用户的Gemini API密钥 |
| 3 | 广告投放 | lanbow-ads | 通过Meta Ads CLI创建和管理广告系列 | 用户的Meta访问令牌 |
| 4 | 投后复盘 | post-campaign-review | 效果诊断与优化方案 | 广告系列投放数据 |
系统决策树
从头开始新的广告系列?
→ 从功能1(策略)开始 → 功能2(创意)→ 功能3(投放)
已有策略,需要创意?
→ 从功能2(创意)开始 → 功能3(投放)
已有创意,需要发布?
→ 从功能3(投放)开始
广告系列已运行,需要优化?
→ 从功能4(复盘)开始 → 根据需要循环回功能1-3
快速临时任务?(列出广告系列、查看效果、上传图片等)
→ 直接使用功能3(投放 / lanbow-ads CLI)
全生命周期闭环
┌─────────────────────────────────────────────────────────┐
│ │
│ 功能1:策略研究 │
│ ┌──────────────────────────────────┐ │
│ │ 输入:URL、目标、受众 │ │
│ │ 输出:洞察报告 │ │
│ │ • 核心信息 │ │
│ │ • 核心视觉 │ │
│ │ • 广告角度 + 行动号召 │ │
│ │ • 受众细分 │ │
│ └──────────┬───────────────────────┘ │
│ │ │
│ ▼ │
│ 功能2:创意生成 │
│ ┌──────────────────────────────────┐ │
│ │ 输入:核心信息、核心视觉、 │ │
│ │ 产品信息、受众 │ │
│ │ 输出:广告图片 + 提示词 │ │
│ └──────────┬───────────────────────┘ │
│ │ │
│ ▼ │
│ 功能3:广告投放 │
│ ┌──────────────────────────────────┐ │
│ │ 输入:创意、定向、 │ │
│ │ 预算、账户 │ │
│ │ 输出:正在投放的广告系列 │ │
│ └──────────┬───────────────────────┘ │
│ │ │
│ ▼ │
│ 功能4:投后复盘 │
│ ┌──────────────────────────────────┐ │
│ │ 输入:效果数据 │ │
│ │ 输出:诊断 + 后续行动 │──── 循环返回 ────┘
│ └──────────────────────────────────┘
功能1:策略研究
技能: ads-strategy-researcher | 详情: strategy-research.md
使用WebSearch + WebFetch进行投放前的市场分析。生成结构化策略报告。
触发短语: 广告策略、营销计划、竞品研究、市场调研
输入: 产品URL、业务目标、广告系列背景、受众信息、竞品
输入功能2的关键输出:
| 输出 | 用途 |
|---|
| 核心信息(主要承诺 + 理由) | 创意生成中的 product_info / requirements |
| 核心视觉(视觉线索、构图) |
创意生成中的 requirements |
| 广告角度(钩子、行动号召) | 创意生成中的 input_cta |
| 受众细分 | 创意生成中的 audience_descriptions |
策略类型: 全渠道(亚马逊 + TikTok + Meta)或仅Meta
功能2:创意生成
技能: creativegen | 详情: creative-generation.md
通过2步Gemini流程生成广告创意图片:提案(gemini-2.5-flash)→ 图片(gemini-3.1-flash-image-preview)。
触发短语: 生成广告、创建广告图片、广告创意、生成创意
需要: GEMINIAPIKEY(可选环境变量 — 仅在使用此功能时需要;功能1、3、4不需要)
输入: 产品信息、受众描述、需求、行动号召、宽高比、可选产品图片
输出: creative-proposals.json + ad-*.png 图片 + 可复用的提示词模板
与功能3的连接: 通过 lanbow-ads images upload 上传生成的图片,然后在 lanbow-ads creatives create 中引用 image_hash。
功能3:广告投放
技能: lanbow-ads | 详情: ad-delivery.md
通过 lanbow-ads CLI 执行广告系列设置和管理。
触发短语: 创建广告系列、发布广告、上传图片、显示广告系列、投放广告
需要: Meta访问令牌、应用ID、广告账户ID(在 requires.env 中声明)。应用密钥是可选的 — 仅在通过 lanbow-ads auth exchange 将短期令牌交换为长期令牌时需要。
凭证设置(按顺序尝试):
- 1. 环境变量或平台密钥字段(最佳): 如果 METAACCESSTOKEN、METAAPPID 和 METAADACCOUNT_ID 已设置为环境变量(或通过平台的密钥/凭证字段),自动配置CLI:
bash
lanbow-ads config set --app-id $META
APPID
lanbow-ads auth set-token $META
ACCESSTOKEN
lanbow-ads config set --account $META
ADACCOUNT_ID
# 仅当设置了 META
APPSECRET 时(可选 — 仅在令牌交换时需要):
[ -n $META
APPSECRET ] && lanbow-ads config set --app-secret $META
APPSECRET
- 2. 要求用户直接提供凭证(最常见): 如果环境变量未设置,告诉用户如何从Meta的Web界面获取每个凭证。建议用户使用平台的密钥字段或环境变量,而不是直接将凭证粘贴到聊天中。 如果只能直接输入,仅请求当前任务所需的最少凭证:
-
访问令牌: 打开 https://developers.facebook.com/tools/explorer/ → 选择您的应用 → 点击生成访问令牌 → 选择权限 ads
management、adsread、business_management → 点击提交 → 复制令牌
-
应用ID: 前往 https://developers.facebook.com/apps/ → 选择您的应用 → 应用设置 → 基本设置
-
广告账户ID: 前往 https://adsmanager.facebook.com/ → 在URL或账户下拉菜单中找到 act_XXXXXXXXX
-
应用密钥(仅在令牌交换时需要): 应用设置 → 基本设置 → 点击应用密钥旁的显示
然后代表用户运行CLI命令。完整指南请参见 meta-account-setup.md。
- 3. lanbow-ads auth login(最后手段): 这在代理的机器上打开浏览器进行OAuth。仅当您和用户在同一台机器上时才有效。默认不要尝试此方法。 如果用户无法打开认证URL或认证登录失败,立即回退到方法2 — 直接要求提供凭证。不要重试或继续发送OAuth URL。
凭证范围限制: 代理只能将提供的凭证用于 lanbow-ads CLI 命令。代理不得记录、回显或存储凭证到除 lanbow-ads config set 和 lanbow-ads auth set-token 命令之外的任何文件中。代理不得将凭证传输到除Meta营销API(通过CLI)之外的任何端点。
广告系列创建顺序:
- 1. lanbow