home / skills / phrazzld / claude-config / ads-cli

ads-cli skill

/skills/ads-cli

This skill helps you manage ads across Google, Meta, and TikTok via a unified CLI, simplifying auth, campaigns, budgets, and reporting.

npx playbooks add skill phrazzld/claude-config --skill ads-cli

Review the files below or copy the command above to add this skill to your agents.

Files (8)
SKILL.md
1.3 KB
---
name: ads-cli
description: Unified ad platform CLI + Python clients for Google Ads, Meta, and TikTok. Use when building or running commands for auth, campaign creation, budget changes, reporting, or pausing campaigns, or when wiring platform env vars and extending ad platform wrappers.
effort: high
---

# Ads CLI

Manage paid ads across Google/Meta/TikTok via one CLI and unified client.

Env vars:
- GOOGLE_ADS_DEVELOPER_TOKEN
- GOOGLE_ADS_CLIENT_ID
- META_APP_ID
- META_APP_SECRET
- TIKTOK_ACCESS_TOKEN

Quick start:
```bash
python cli.py auth --platform google
python cli.py create-campaign --platform google --objective conversions --budget 50 --targeting "developers"
python cli.py adjust-budget --platform google --campaign-id abc123 --amount "+20%"
python cli.py report --platforms google,meta --date-range 7d --format table
python cli.py pause --platform google --campaign-id abc123
```

Strategy reference:
- Read `/Users/phaedrus/.claude/skills/paid-ads/SKILL.md` for platform selection, structure, targeting, copy, and optimization.

Structure:
- `cli.py` defines Click commands.
- `src/google.py`, `src/meta.py`, `src/tiktok.py` are per-platform wrappers.
- `src/unified.py` routes by platform.

Extend:
- Add new platform wrapper with `auth`, `create_campaign`, `adjust_budget`, `get_report`, `pause_campaign`.
- Register it in `UnifiedAdsClient`.

Overview

This skill is a unified CLI and Python client for managing paid ads across Google Ads, Meta, and TikTok. It consolidates authentication, campaign creation, budget adjustments, reporting, and pausing into a single interface to streamline multi-platform workflows. The code is organized with per-platform wrappers and a router that dispatches commands by platform.

How this skill works

The CLI exposes commands for auth, create-campaign, adjust-budget, report, and pause that call corresponding methods on platform-specific wrappers. Each wrapper implements auth, create_campaign, adjust_budget, get_report, and pause_campaign; a UnifiedAdsClient routes requests to the correct implementation. Environment variables provide credentials and tokens so scripts and CI can run without interactive login.

When to use it

  • When you need a single command surface to manage campaigns across Google, Meta, and TikTok.
  • When automating campaign creation, budget updates, or pausing campaigns from scripts or CI.
  • When generating cross-platform reports in a consistent format for stakeholders.
  • When wiring environment variables for platform credentials in deployment pipelines.
  • When extending support to a new ad platform via a simple wrapper contract.

Best practices

  • Set platform credentials in environment variables to keep automation non-interactive and secure.
  • Test wrapper methods locally for a single platform before invoking multi-platform commands.
  • Use relative date ranges and consistent naming conventions for campaigns to simplify reporting.
  • Validate budget changes with a dry-run or sandbox account where available.
  • Register and unit-test any new platform wrapper with the same method signatures used by the router.

Example use cases

  • Create a conversion-focused campaign on Google and Meta from a single script call.
  • Increase budgets by percentage across multiple active campaigns during peak season.
  • Pause underperforming campaigns quickly across platforms before major spend spikes.
  • Produce a table-format performance report for the last 7 days covering Google and Meta.
  • Add support for a new ad network by implementing the wrapper interface and registering it.

FAQ

What environment variables are required?

Provide platform credentials via env vars like GOOGLE_ADS_DEVELOPER_TOKEN, GOOGLE_ADS_CLIENT_ID, META_APP_ID, META_APP_SECRET, and TIKTOK_ACCESS_TOKEN as needed.

How do I add a new ad platform?

Implement a wrapper with auth, create_campaign, adjust_budget, get_report, and pause_campaign methods, then register it with the UnifiedAdsClient router.

Can I run commands non-interactively in CI?

Yes. Store credentials in secure CI environment variables and invoke the CLI commands from scripts or pipelines.