/kai:kai-ad-campaignfrom Kai Marketing OS
Plans, evaluates, and produces paid ad campaigns across Meta, Google, LinkedIn, TikTok, and more. Maps funnel stages, checks policy compliance, and outputs ready-to-upload copy.
Ships in Kai Marketing OS. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Plan, evaluate, and batch-produce ad campaigns across platforms and funnel stages. Every ad passes platform policy compliance + quality gates.
Before loading product context, determine the mode:
Evaluation mode does NOT require MARKETING.md. Creation mode does.
Skip this phase entirely if the user only wants to create new ads.
Evaluation mode is read-only. Do not create, pause, activate, change bids, change budgets, upload assets, add keywords, or mutate targeting while evaluating performance.
Load the Meta API reference: harness/references/meta-ads-api-reference.md
Extract credentials from .env.local using grep (never source):
META_TOKEN=$(grep '^META_ACCESS_TOKEN=' .env.local | cut -d= -f2-)
AD_ACCOUNT_ID=$(grep '^META_AD_ACCOUNT_ID=' .env.local | cut -d= -f2-)
List all active campaigns with insights:
curl "https://graph.facebook.com/v21.0/act_${AD_ACCOUNT_ID}/campaigns?fields=id,name,objective,status,daily_budget,insights.date_preset(last_30d){impressions,clicks,spend,ctr,cpc,actions,cost_per_action_type}&filtering=[{\"field\":\"effective_status\",\"operator\":\"IN\",\"value\":[\"ACTIVE\"]}]&limit=50&access_token=${META_TOKEN}"
For each campaign, pull ad-level insights:
curl "https://graph.facebook.com/v21.0/act_${AD_ACCOUNT_ID}/ads?fields=id,name,status,effective_status,campaign_id,creative{id,object_story_spec},insights.date_preset(last_30d){impressions,clicks,spend,ctr,cpc,actions,cost_per_action_type,video_p25_watched_actions,video_p50_watched_actions,video_p75_watched_actions,video_p100_watched_actions}&filtering=[{\"field\":\"effective_status\",\"operator\":\"IN\",\"value\":[\"ACTIVE\"]}]&limit=100&access_token=${META_TOKEN}"
Load: harness/references/posthog-marketing-queries.md
Pull landing page data to cross-reference ad traffic with on-site behavior:
| Metric | Poor | OK | Good | Great |
|---|---|---|---|---|
| CTR | < 0.5% | 0.5–1% | 1–2% | > 2% |
| CPC | > $5 | $3–5 | $1.50–3 | < $1.50 |
| CPL | > $50 | $30–50 | $15–30 | < $15 |
| Video 25% retained | < 30% | 30–50% | 50–70% | > 70% |
| Video 75% retained | < 5% | 5–10% | 10–20% | > 20% |
| Landing page bounce | > 80% | 60–80% | 40–60% | < 40% |
Adjust benchmarks to the vertical (B2B SaaS, local service, ecommerce, etc.).
Output to workspace/ads/_evaluation-report.md:
# Ad Evaluation Report — [Date]
> **Kai root note:** `knowledge/`, `harness/`, and `scripts/` paths in this skill live in the Kai install, not the user's project. Resolve them against the first ancestor directory of this SKILL.md that contains a `knowledge/` folder (the Kai plugin root, `~/.claude/kai`, or the kai-cmo-harness repo). `MARKETING.md`, `memory/`, and any output files live in the current project. If a referenced `scripts/` command is not available in this install, say so, skip it, and continue with the file-based guidance — never fabricate its output.
## Summary
- Active campaigns: [N]
- Active ads: [N]
- Total 30-day spend: $[X]
- Avg CTR: [X]% | Avg CPC: $[X] | Avg CPL: $[X]
## Campaign Performance
| Campaign | Objective | Spend | Impressions | Clicks | CTR | CPC | Leads | CPL |
|----------|-----------|-------|-------------|--------|-----|-----|-------|-----|
## Ad-Level Performance
| Ad | Campaign | CTR | CPC | Spend | Leads | CPL | Verdict |
|----|----------|-----|-----|-------|-------|-----|---------|
## Recommendations
### Keep (performing well)
[List ads to keep running]
### Optimize (underperforming but fixable)
[List ads with specific fix recommendations — copy, creative, targeting]
### Pause (not working)
[List ads to turn off]
### Create New
[Gaps identified — missing funnel stages, untested hooks, audience segments]
If evaluation reveals gaps or the user wants new ads, transition to Phase 0 → Phase 1 below with the evaluation findings as context.
Check if MARKETING.md exists in the project root (same directory as CLAUDE.md, README.md, package.json).
If it exists: Read it — skip product discovery questions. It has the product name, ICP, value prop, monetization, brand voice, current channels, and competitive landscape.
If it does NOT exist: Auto-explore the codebase to create it in the project root (next to CLAUDE.md). Do NOT ask the user what the product is. Read CLAUDE.md, README.md, PROJECT.md, package.json, landing pages, and any project files. Search for email/ad/analytics config. Then create MARKETING.md using the template from /kai-email-system. Present draft to user for confirmation.
Read from MARKETING.md. Only ask about things not covered there:
If the campaign is for a new brand, new product, first paid test, or "launch ads" request, load:
knowledge/playbooks/paid-media-launch-playbook.mdApply these launch defaults before writing ads:
Target CPA x 50 as the minimum test budget.workspace/ads/_launch-brief.md and workspace/ads/_measurement-checklist.md.If the platform is Meta and the request includes 10+ creatives, API creation, video batches, existing winners, low budgets, or a "best solution" question, load:
knowledge/playbooks/meta-creative-testing-decision-framework.mdBefore recommending activation or creating live ads:
workspace/ads/_meta-creative-testing-decision.md when writing workspace artifacts.For paid-social, short-form video, or any request for ad concepts, creative formats, or variant tests, load:
kai/paid_media/creative_formats.pyUse select_creative_formats(...) to choose formats by:
Each variant must now choose both:
hook_typecreative_formatExample pairings:
problem_agitation + foundersocial_proof + testimonial_mashuppattern_interrupt + ugly_adIf the selector returns NEEDS_ASSET or REVIEW, keep the format in the plan only when the missing asset or review step is stated explicitly.
Generate workspace/ads/_campaign-map.md with:
| Stage | Objective | Audience | Platforms | Ad Count |
|---|---|---|---|---|
| TOF (Awareness) | Reach/awareness | Cold — lookalikes, interest-based | Meta, TikTok, Google Display | 3 variants each |
| MOF (Consideration) | Traffic/engagement | Warm — site visitors, engagers | Meta, Google Search, LinkedIn | 3 variants each |
| BOF (Conversion) | Leads/sales | Hot — cart abandoners, demo requesters | Meta retarget, Google Search (brand), Email | 3 variants each |
Adapt to the actual product and platforms. Not every product needs every stage.
Before writing any ad, load the platform's policy reference and skill contract. For Meta, also load the API reference for execution:
| Platform | Policy Reference | API/Execution Reference | Contract | Key Constraints |
|---|---|---|---|---|
| Meta | harness/references/meta-ads-rules.md | harness/references/meta-ads-api-reference.md | harness/skill-contracts/meta-ads.yaml | Headline 27 chars, primary text 125 chars visible |
harness/references/google-ads-policy-reference.md | — | harness/skill-contracts/google-ads.yaml | 15 headlines (30 chars), 4 descriptions (90 chars) | |
harness/references/linkedin-ads-rules.md | — | — | Professional context, B2B claim substantiation | |
| TikTok | harness/references/tiktok-ads-policy-reference.md | — | — | No political ads, AI disclosure required |
| Microsoft | harness/references/microsoft-ads-rules.md | — | — | Similar to Google RSA format |
harness/references/pinterest-ads-rules.md | — | — | All weight loss banned, strict body image | |
| Snapchat | harness/references/snapchat-ads-policy-reference.md | — | — | Young audience protections |
| Amazon | harness/references/amazon-ads-policy-reference.md | — | — | 18-month claim evidence rule |
| X/Twitter | harness/references/x-ads-policy-reference.md | — | — | Verification tier affects access |
All paths relative to the project root.
Also load: harness/references/advertising-compliance.md for FTC/GDPR/CAN-SPAM requirements that apply to ALL platforms.
Also load: harness/references/ad-write-guardrails.md for any workflow that may upload assets, create ads, create campaigns/ad sets/ad groups, activate/pause entities, or change bids/budgets.
Present the campaign map to the user before producing ads. Confirm:
Produce ads by platform and funnel stage. For each ad:
# [Platform] — [Funnel Stage] — Variant [A/B/C]
**Platform:** Meta / Google / LinkedIn / etc.
**Funnel stage:** TOF / MOF / BOF
**Objective:** [campaign objective]
**Audience:** [target description]
## Ad Copy
### Headlines
[Per platform specs — e.g., 15 headlines for Google RSA, 1 for Meta]
### Primary Text / Description
[Per platform specs]
### CTA
[Button text or action]
### Display URL / Path
[If applicable]
## Hook Type
[pattern_interrupt | social_proof | pain_agitate | direct_offer | story]
## Creative Format
- Selected format: [format id + name]
- Platform fit: PASS/FAIL
- Funnel fit: PASS/FAIL
- Asset feasibility: PASS/FAIL/NEEDS_ASSET
- Compliance status: PASS/REVIEW
- Missing assets: [list or none]
- Compliance flags: [list or none]
## Quality Gate Results
- Four U's: [X]/16 (min 10)
- Banned words: PASS/FAIL
- Platform char limits: PASS/FAIL
- Has number/stat: PASS/FAIL
- Policy compliance: PASS/FAIL
Across the 3 variants per stage, use different hook types:
Across those variants, also rotate the concrete creative format. Do not count three ads with the same production format and different opening lines as full creative diversity.
workspace/ads/
├── _campaign-map.md
├── meta/
│ ├── tof-variant-a.md
│ ├── tof-variant-b.md
│ ├── tof-variant-c.md
│ ├── mof-variant-a.md
│ └── bof-variant-a.md
├── google/
│ ├── search-rsa-branded.md
│ ├── search-rsa-nonbranded.md
│ └── pmax-assets.md
├── linkedin/
│ └── ...
└── _quality-report.md
Generate workspace/ads/_quality-report.md:
# Ad Campaign Quality Report
## Summary
- Total ads: [N]
- Platforms: [list]
- Passed all gates: [N]
- Policy flags: [N]
## Per-Ad Results
| Ad | Platform | Stage | Four U's | Char Limits | Policy | Status |
|----|----------|-------|----------|-------------|--------|--------|
## Policy Flags
[Any ads that need legal review or have borderline claims]
## A/B Test Recommendations
[Which variants to test first based on hook type diversity]
If the user wants to create ads via API (not just produce copy), load harness/references/meta-ads-api-reference.md and follow this sequence:
Load harness/references/ad-write-guardrails.md before API execution. Default to read-only reports, dry-run previews, upload validation, and recommendations. Live write access is approval-gated and never auto-approved.
Before creating or activating Meta ads by API, load knowledge/playbooks/meta-creative-testing-decision-framework.md when any of these are true:
For those cases, write or present a decision memo before execution. Default behavior for large batches is:
PAUSED when staging is useful.grep from .env.localcurl "https://graph.facebook.com/v21.0/act_${AD_ACCOUNT_ID}/advideos?fields=id,title,created_time&limit=20&access_token=${META_TOKEN}"
Never trust video IDs from logs or docs without verification — a single digit difference means a different (or nonexistent) video..env.local1. Create campaign (PAUSED)
2. Create ad set(s) with targeting + budget
3. For each ad:
a. If video ad → verify video_id exists in library
b. Create ad with inline creative (object_story_spec)
c. Use instagram_user_id (NOT instagram_actor_id)
4. Review all created ads in Ads Manager
5. Activate
Activation is a separate high-risk action. Do not activate in the same action that creates or uploads assets.
After ads are live, use harness/references/posthog-marketing-queries.md to track:
Generate workspace/ads/_platform-setup.md with:
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub cgallic/kai-cmo-harness --plugin kai64 skills in this plugin
/design-taste-frontendAnti-slop frontend skill for landing pages, portfolios, and redesigns. The agent reads the brief, infers the right design direction, and ships interfaces that do not look templated. Real design systems when applicable, audit-first on redesigns, strict pre-flight check./kaiKai Marketing OS router - shows all 49 marketing skills organized by workflow, business stage, and frequency. Use when "kai help", "what marketing skills are available", "how do I use the harness", "marketing help", or any general marketing question where the right skill isn't obvious./kai-abmPlan and execute account-based marketing campaigns for enterprise targets — account selection, personalized outreach, multi-channel touch sequences, and deal acceleration. Use when "ABM", "account-based marketing", "enterprise marketing", "target accounts", "named accounts", "enterprise outreach", "key accounts", or any request to build personalized campaigns for specific companies.Other plugins' skills for the same job