Claude Ads

Skill

付费广告投放技能包,覆盖 Google、Meta、TikTok、Amazon、LinkedIn 等 12 个广告平台,可做账户审计、投放规划、素材创作、监控与报告。默认只读,改动账户需逐项审批;完整功能依赖 Python 环境。

AgriciDaniel/claude-ads11.5k
README

Paid Ads (Claude Ads): every ad account, one command line

Paid Ads (Claude Ads) v3.0.0

Paid Ads (formerly Claude Ads) is a free, open source paid-media operations plugin for Claude Code, Codex, claude.ai, and Agent Skills hosts. Give it your ad account exports or API data and it runs deterministic waste, budget, and MER diagnostics, scores Tier-1 Google and Meta accounts against source-grounded controls, and reports what is working, what is broken, and what to fix first across twelve ad platforms.

It is built for agencies, consultants, and in-house marketing teams. It is read-only by default and never changes your live ad accounts without explicit approval, diff preview, and rollback checks.

[!NOTE] Paid Ads is released at AgriciDaniel/claude-ads (MIT licensed, no membership needed).

Quickstart (One-Step Claude Code Install)

/plugin install paid-ads --marketplace agricidaniel/claude-ads

From a terminal, the same install is claude plugin install paid-ads --marketplace agricidaniel/claude-ads. The two-step form also works: claude plugin marketplace add AgriciDaniel/claude-ads, then claude plugin install paid-ads@ai-marketing-hub-claude-ads.

If you already added this marketplace before (for example for v2), run claude plugin marketplace update ai-marketing-hub-claude-ads first. Otherwise a stale cached copy makes the one-step install report that the marketplace is already added and then fail with Plugin paid-ads not found.

[!IMPORTANT] Already using Claude Ads v2? The plugin is now called paid-ads and its commands moved from /claude-ads:* to /paid-ads:*. See Upgrading from v2 for the exact steps, or for how to stay on v2.

How to invoke Paid Ads on your host:

  • Claude Code plugin install: /paid-ads:ads ... (for example /paid-ads:ads audit google)
  • Standalone install (bash install.sh) and other hosts: /ads ... (Codex uses $ads)
  • claude.ai Skill ZIP upload: use natural language (for example "Audit this Google Ads CSV export"). The ZIP has one root skill, ads; the workflow and platform skills inside it are reached through that root skill, not triggered separately.

The commands below use the plugin form. On a standalone install, drop the paid-ads: prefix (/paid-ads:ads setup becomes /ads setup).

Then run your first audit:

  1. Run /paid-ads:ads setup and answer a few questions: business model, goal, main conversion, monthly spend, active platforms, and approval rules. Never paste API keys or tokens.
  2. Bring evidence: a raw Google Ads or Meta Ads UI CSV export, GAQL JSON, or a structured export with its date range, currency, and timezone.
  3. Run /paid-ads:ads audit google (or /paid-ads:ads audit meta / /paid-ads:ads audit all). Deterministic Python diagnostics run before prose synthesis, returning passed, failed, and unknown controls with evidence.
  4. Run /paid-ads:ads report to render Markdown, HTML, or PDF, and /paid-ads:ads next to see the highest-priority blocker.

Three steps: tell it about your business, give it your data, then read the audit

Two Runtime Tiers

Paid Ads v3.0.0 runs cleanly across both CLI environments and browser chat:

Runtime TierHow You Use ItDeterministic Tooling Included
Tier 1: Full CLI-backed (Claude Code, Codex, standalone)Install via /plugin install paid-ads --marketplace agricidaniel/claude-ads (add local Python helpers with bash install.sh --deps-only), or install standalone with bash install.sh --source=local.Full claude-ads-core CLI (ingest-export, diagnose, math, export-editor, score, validate, render), hash-locked .venv, guarded fetch_page.py, screenshot/PDF helpers, and optional Cockpit companion.
Tier 2: claude.ai Skill ZIP Upload or local --no-depsDownload the Markdown-only paid-ads-3.0.0-claude-ai-skill.zip from the GitHub Release and upload it to claude.ai Skills (or install locally with --no-deps).paid-ads-3.0.0-claude-ai-skill.zip is strictly Markdown-only (no .py files, matching Anthropic uploader rules). In claude.ai chat, use <=25-row inline arithmetic with explicit totals (tagging uncomputed bulk metrics not_computed_no_runtime or manual_calculation_unverified), or upload the zero-dependency diagnose_portable.py into Code Execution. That script is not in the Skill ZIP: take it from the full release archive paid-ads-3.0.0.zip at plugins/paid-ads/scripts/diagnose_portable.py. Local --no-deps or checkout users can run the same script directly for generic campaign/spend or Google/Meta UI CSVs.

12-Platform Coverage Tiers

Google, Meta, YouTube, LinkedIn, TikTok, Microsoft, Apple, Amazon, Reddit, Pinterest, Snapchat and X

Each platform has its own focused skill, control reference, and capability entry in plugins/paid-ads/control-plane/manifests/capability-manifest.json.

TierPlatformsIngestion & DiagnosticsHealth Scoring
Tier 1 (Active Scoring & Full Diagnostics)Google Ads, Meta AdsForgiving UI-CSV and GAQL ingestion (AccountSnapshot v2), deterministic waste/N-gram/Shopping zombie-SKU/PMax channel-mix/Meta creative-fatigue/Budget-IS/Smart Bidding diagnostics, MER & nCAC math, and reviewed Google Ads Editor bulk-CSV export (claude-ads-core).Enabled: 17 active source-grounded controls (10 Google, 7 Meta) with >=60% evidence coverage gate.
Tier 2 (Structured Audits & Native Exports)TikTok, LinkedIn, Microsoft, YouTube, Reddit, Pinterest, Snapchat, Apple, AmazonStructured platform audit references plus fixture-verified native export normalization (including Apple Ads Platform API v1 and Amazon Unified Reporting v1) and generic CSV ingestion.Disabled (discovery findings, unknowns, and coverage only; no unapproved composite score).
Tier 3 (Advisory & Generic CSV)X AdsStructured platform audit guidance and generic CSV export ingestion.Disabled (advisory findings and evidence gaps only).

What You Can Do

You want toRunYou get
Find out what is wrong/ads auditDeterministic diagnostics plus passed, failed, and unchecked controls with evidence
Run paid-media math/ads mathMER, nCAC, break-even ROAS, CPA, LTV:CAC, and budget pacing math
Decide where to spend/ads planChannel, budget, measurement, and competitor plans
Make ads/ads createCampaign concepts, messaging, copy, and creative briefs (image files come from /ads generate; no video rendering)
Keep watch/ads monitorChecks on pacing, delivery, tracking, ad fatigue, and policy
Improve results/ads optimize --draftEvidence-backed change drafts without mutating the account
Test an idea/ads experimentControlled experiment design or readout

Commands

Standalone installs use /ads. Claude Code plugin installs are namespaced as /paid-ads:ads. Both load plugins/paid-ads/skills/ads/SKILL.md.

CommandWhat it does
/ads setupSave client, account, goal, privacy, and guardrail profile
/ads audit [all|platform|scope]Run a full or scoped audit backed by evidence
/ads google, /ads meta, ...Shortcut to any single platform's read-only audit
/ads mathCompute MER, nCAC, ROAS, CPA, break-even, and pacing math
/ads planBuild channel, campaign, budget, competitor, and measurement plans
/ads createProduce campaign concepts, messaging, copy, and creative briefs (concepts and copy only; video stops at the brief)
/ads generateGenerate image assets from a validated brief through a configured provider
/ads launch --draftDraft a campaign change plan without touching the account
/ads monitorReview pacing, delivery, tracking, fatigue, policy, and performance
/ads optimize --draftDraft evidence-backed improvements
/ads experimentDesign or read out a controlled test
/ads reportRender a saved run as Markdown, HTML, or PDF
/ads research refreshRefresh platform, policy, API, and benchmark evidence
/ads validate, /ads status, /ads nextCheck contracts, capabilities, and highest-priority blocker

Built to Be Trusted

Read only by default, evidence for every finding, honest about gaps, and your data stays yours

Every check ends in one of four results: pass, fail, unknown, or not_applicable. Unknown is a real answer: missing data is never guessed, and platform optimization scores are treated as vendor incentives rather than account health.

Claude Ads Cockpit (Optional)

Cockpit is an optional local companion plugin (ads-cockpit, version 0.2.0). /ads-cockpit opens a local terminal workbench to inspect a finished audit run, its evidence, operator insights (Top Wasted Spend and Platform vs Blended MER), missing inputs, baseline diffs, report receipts, and formula-safe Google Ads Editor CSV drafts (export-editor), with a synthetic demo mode. See the Cockpit guide and compatibility limits.

Installation

/plugin install paid-ads --marketplace agricidaniel/claude-ads

If you already added this marketplace, run claude plugin marketplace update ai-marketing-hub-claude-ads first (see Quickstart).

Plugin users who also want the local hash-locked Python .venv (for claude-ads-core, guarded fetch_page.py, and PDF/screenshot helpers) can provision dependencies without touching skill directories:

git clone https://github.com/AgriciDaniel/claude-ads.git
cd claude-ads
bash install.sh --deps-only

2. claude.ai Skill ZIP Upload

Download paid-ads-3.0.0-claude-ai-skill.zip and SHA256SUMS from the GitHub Release page, verify the single-file checksum (grep paid-ads-3.0.0-claude-ai-skill.zip SHA256SUMS | shasum -a 256 -c), and upload the single-root Markdown-only ZIP (ads/SKILL.md, ads/references/*, ads/skills/ads-*/SKILL.md) directly in claude.ai Skills. claude.ai registers one skill, ads. The workflow and platform skills under ads/skills/ are reference files that the root skill loads when needed; they do not trigger on their own, so start every request through the root skill.

The archive contains portable Markdown skills and references only (no .py files). For bulk CSV math in claude.ai Code Execution, upload diagnose_portable.py alongside your export, or rely on <=25-row inline arithmetic with explicit totals. The script is not in the Skill ZIP; it is in the full release archive paid-ads-3.0.0.zip at plugins/paid-ads/scripts/diagnose_portable.py.

diagnose_portable.py mirrors the package's core checks for Google and Meta UI CSVs and generic campaign/spend exports. Like the package, it fails closed on mixed currencies and on mixed or ambiguous decimal conventions, and it abstains on keyword exports instead of misreading them. A parity test (tests/core/test_engine_parity.py) runs the script and claude-ads-core on one fixture corpus and enforces that their shared outputs match. It does not replace the package: keyword self-blocking checks, scoring, and Editor export need the full CLI.

3. Multi-Host Standalone Installer (Linux, macOS, Windows)

Prefer a host-native plugin install or a tagged release archive verified with SHA256SUMS. Never pipe a remote installer directly to a shell.

git clone https://github.com/AgriciDaniel/claude-ads.git
cd claude-ads
bash install.sh --source=local

Supported standalone targets (--target=<host>):

  • claude (~/.claude/skills, ~/.claude/agents, verified, supports managed .venv)
  • codex (~/.codex/skills, experimental, supports managed .venv)
  • cursor (~/.cursor/skills, experimental)
  • windsurf (~/.windsurf/skills, experimental)
  • gemini (~/.gemini/skills, experimental)
  • goose (~/.config/goose/skills, experimental)
  • agents (~/.agents/skills, shared Agent Skills convention)

Examples:

bash install.sh --target=codex --source=local
bash install.sh --target=agents --source=local --no-deps
bash install.sh --source=local --dry-run

On Windows PowerShell 5.1+ or PowerShell 7+:

git clone https://github.com/AgriciDaniel/claude-ads.git
Set-Location claude-ads
.\install.ps1 -Source local

Managed dependencies require CPython 3.11 to 3.13 and support Linux (x86_64, arm64, glibc >= 2.28; musl is unsupported), macOS (arm64, macOS 11+), and Windows (amd64). The installer automatically probes $CLAUDE_ADS_PYTHON, python3.13, python3.12, python3.11, uv python find --system --no-project, and python3 (or py -3.13/3.12/3.11 on Windows), and prints a clear message when it finds no supported Python, an old glibc, or musl. Use --no-deps (PowerShell: -NoDeps) for a skill-only install.

  • Intel (x86_64) Macs: managed wheels are published for Apple silicon only, so run bash install.sh --source=local --no-deps. The skills work; the local claude-ads-core runtime does not install.
  • Symlinked skills directory: if a dotfile manager (GNU Stow, chezmoi) makes ~/.claude/skills a symlink, the installer accepts it when the real directory is inside your home, owned by you, and not world-writable. Other symlinked targets are refused.
  • Windows profile paths with spaces or parentheses (for example C:\Users\John (Contoso)) are supported.

To pin a git install, pass --ref (PowerShell: -Ref) with --source=git:

bash install.sh --source=git --ref=v3.0.0

A git ref is not a checksum-verified release, and nothing here is signed. The verified path is downloading all four checksummed release assets (paid-ads-3.0.0.zip, paid-ads-3.0.0-claude-ai-skill.zip, release-manifest.json, and sbom.cdx.json) plus SHA256SUMS into an empty directory and checking:

sha256sum -c SHA256SUMS      # macOS: shasum -a 256 -c SHA256SUMS

Every line must report OK before you install from the archive:

unzip paid-ads-3.0.0.zip
cd paid-ads-3.0.0
bash install.sh --source=local

To verify only the claude.ai Skill ZIP on macOS or Linux without downloading the other assets, run:

grep paid-ads-3.0.0-claude-ai-skill.zip SHA256SUMS | shasum -a 256 -c

Upgrading from v2

v3.0.0 renames the plugin from claude-ads to paid-ads. Plugin commands move from /claude-ads:* to /paid-ads:*, and the 17 audit-* workers and 4 creative agents of v2 are replaced by two generic workers (maintainer-only agents no longer ship). Your saved v2 plugin options do not carry over.

Claude Code plugin users. Run these in a terminal (the slash forms such as /plugin marketplace update ... work the same inside Claude Code):

claude plugin marketplace update ai-marketing-hub-claude-ads
claude plugin install paid-ads@ai-marketing-hub-claude-ads
claude plugin uninstall claude-ads@ai-marketing-hub-claude-ads

Then restart Claude Code. Commands are now /paid-ads:ads ....

Staying on v2. Nothing is required until 2027-03-01. Until then the marketplace keeps a temporary legacy entry named claude-ads that points at the immutable v2.1.1 tag (the final v2 release, also the tip of the frozen v2 branch), so existing v2 installs keep working after a catalog refresh, and claude plugin update claude-ads@ai-marketing-hub-claude-ads moves you to 2.1.1. The legacy entry is removed on 2027-03-01. To keep v2 after that, pin the v2 marketplace:

claude plugin marketplace remove ai-marketing-hub-claude-ads
claude plugin marketplace add AgriciDaniel/claude-ads#v2.1.1
claude plugin install claude-ads@ai-marketing-hub-claude-ads

Warning: marketplace remove also uninstalls every plugin from that marketplace, including its saved options, so you will re-enter them after the reinstall. The v2 branch receives no new features.

Standalone install.sh / install.ps1 users. Re-run the v3 installer (see Multi-Host Standalone Installer). It removes v2 files that you never modified (including the old agents in ~/.claude/agents). Edited files that v3 no longer ships are kept and listed. If you edited a file that v3 still ships, your copy is saved next to it as <name>.user-<timestamp>.bak (the path is printed) and the new file is installed. Uninstall never deletes those backups or any file you changed.

Uninstall

Uninstall removes only manifest-owned files (supporting the unified v3 JSON v2 manifest .paid-ads-<target>.manifest.json as well as legacy v2 Bash TSV and PowerShell JSON v1 manifests):

bash uninstall.sh --target=claude

PowerShell equivalent: .\uninstall.ps1 -Target claude.

For Engineers and Contributors

Architecture, scoring rules, safety gates, and local development

Architecture

plugins/paid-ads/ is the single-source shipping plugin root. One conductor (plugins/paid-ads/skills/ads/SKILL.md) owns scope, policy, aggregation, and final artifacts. Two generic workers (agents/audit-platform.md and agents/audit-cross-platform.md) analyze bounded slices and return schema-valid JSON without model pins. Deterministic Python tools (claude-ads-core ingest-export, diagnose, math, export-editor, score, validate, render) execute before prose synthesis. export-editor --kind negatives refuses to draft negatives without positive keyword evidence (a keyword export, or a search terms report with Keyword and Added/Excluded columns) unless you pass --allow-missing-keyword-inventory.

Scoring and Evidence

  • Controls resolve to pass, fail, unknown, or not_applicable.
  • Tier-1 Google Ads (10 controls) and Meta Ads (7 controls) profiles are active when evidence coverage is at least 60% (>=80% graded, 60-79% provisional, <60% insufficient evidence).
  • Tier-2 and Tier-3 platforms remain unscored discovery audits until source-grounded severity policies are approved.
  • Optional, beta, premium, unavailable, and ineligible features stay unscored.

Account Safety

All adapters are read-only by default. Applying any live change requires an enabled capability, explicit object IDs, a before/after diff with blast radius, owner approval within ceilings, idempotency, verification, audit logging, and rollback.

Development

python3.12 -m venv .venv
.venv/bin/python -m pip install --no-deps -e .
.venv/bin/python -m pip install --require-hashes --only-binary=:all: -r plugins/paid-ads/requirements.lock
.venv/bin/python -m pip install --require-hashes --only-binary=:all: -r requirements-dev.lock
.venv/bin/python -m pip check
.venv/bin/python -m pytest -q

Focused checks:

python tools/release.py audit
python tools/eval_release_smoke.py --dry-run
claude plugin validate --strict --profile directory plugins/paid-ads
bash -n install.sh uninstall.sh

Repository Map

plugins/paid-ads/     single-source shipping plugin root (skills, agents, scripts, claude_ads_core, control-plane, requirements.lock)
mods/claude-ads-cockpit/  optional local Cockpit companion plugin
tools/                repository-only release, dependency audit, packaging, and smoke-eval scripts
.claude/agents/       repository-only maintainer agents (not shipped in user plugin)
evals/                routing and behavioral evaluation cases
tests/                deterministic, security, installer, core, and adapter tests

Contributing

Found a problem or have an idea? See CONTRIBUTING.md.

Thank you to everyone who has reported issues and proposed fixes, including @GrzegorzAgree, @aleps001, @bq9kpv2h98-max, @haruntekin89, @reikjarloekl, @osilova, @Nath24591, @sistemasond-ux, @principisimone-sys, @HarKro753, @plcosta, @ulises2k, @kutzki, @SamaEducationalCo, @Bortlesboat, @gabbyran2026-gif, @AbundantASG, @hendrixfreire, @josefresco, @dead-simba, @c6zks4gssn-droid, @kershrita, @popey, @xiaolai, @seojcarlos, and @botbikamordehai2-sketch. Full credits are listed in CONTRIBUTING.md.

Privacy

Client data, raw private research, captured prompts, credentials, account exports, and agent transcripts never belong in Git history, reports, or release archives. Keep credentials in environment variables, an OS keychain, or an approved secret manager.

License

Original Paid Ads (Claude Ads) code and documentation are available under the MIT License. Third-party APIs, trademarks, documentation, and cited artifacts remain subject to their own terms. Review the source ledger and third-party notices before importing external work.