media-buying
Plan and execute media buying across digital and traditional channels — programmatic advertising, DSP platforms, direct buys, and budget allocation. Use when tasks involve programmatic ad buying, real-time bidding (RTB), demand-side platform setup, media plan creation, CPM/CPC/CPA optimization, cross-channel budget allocation, audience segmentation for paid media, or negotiating direct ad placements.
Best use case
media-buying is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Plan and execute media buying across digital and traditional channels — programmatic advertising, DSP platforms, direct buys, and budget allocation. Use when tasks involve programmatic ad buying, real-time bidding (RTB), demand-side platform setup, media plan creation, CPM/CPC/CPA optimization, cross-channel budget allocation, audience segmentation for paid media, or negotiating direct ad placements.
Teams using media-buying should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/media-buying/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How media-buying Compares
| Feature / Agent | media-buying | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Plan and execute media buying across digital and traditional channels — programmatic advertising, DSP platforms, direct buys, and budget allocation. Use when tasks involve programmatic ad buying, real-time bidding (RTB), demand-side platform setup, media plan creation, CPM/CPC/CPA optimization, cross-channel budget allocation, audience segmentation for paid media, or negotiating direct ad placements.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Media Buying
## Overview
Plan and execute paid media across programmatic, direct, and social channels. Optimize spend allocation, audience targeting, and cross-channel performance.
## Instructions
### Budget allocation framework
Allocate budget across channels based on funnel stage:
```
AWARENESS (top of funnel) — 30-40% of budget
├── Programmatic display (CPM $2-8)
├── YouTube/CTV (CPM $10-25)
├── Podcast sponsorships (CPM $15-30)
└── Influencer partnerships
CONSIDERATION (middle) — 30-40%
├── Paid social (Meta, TikTok, LinkedIn)
├── Sponsored content / native ads
├── Retargeting display (CPM $3-12)
└── Search non-brand keywords
CONVERSION (bottom) — 20-30%
├── Search brand keywords (highest ROAS)
├── Retargeting (cart abandoners, high-intent)
├── Email/SMS (near-zero marginal cost)
└── Affiliate partnerships (CPA-based)
```
### Media plan template
```markdown
## Media Plan — Q2 2026
**Objective**: Generate 500 qualified leads at <$80 CAC
**Total Budget**: $40,000/month
| Channel | Monthly Budget | Model | Target CPA | Expected Volume |
|---------|---------------|-------|------------|-----------------|
| Google Search (brand) | $5,000 | CPC | $25 | 200 leads |
| Google Search (non-brand) | $8,000 | CPC | $65 | 123 leads |
| Meta Ads | $12,000 | CPA | $90 | 133 leads |
| LinkedIn Ads | $8,000 | CPC | $120 | 67 leads |
| Programmatic Display | $4,000 | CPM | N/A | 500K impressions |
| Content syndication | $3,000 | CPL | $75 | 40 leads |
```
### Programmatic advertising (RTB)
```
1. User visits a webpage with ad space
2. Publisher's SSP sends bid request to ad exchange (10ms)
3. Ad exchange broadcasts to connected DSPs
4. DSPs evaluate user data + campaign rules → submit bid (50ms)
5. Highest bidder wins, ad is served (~100ms total)
Key players:
- DSP: Where advertisers buy (DV360, The Trade Desk, Amazon DSP)
- SSP: Where publishers sell (Google Ad Manager, Magnite)
- DMP: Audience data (Oracle, Lotame)
```
**DSP campaign structure**: Advertiser → Campaign → Insertion Order (by objective) → Line Item (by audience) → Creatives.
### Targeting layers
```
AUDIENCE: First-party data, third-party (DMP), contextual, lookalike, intent signals
INVENTORY: Domain allowlists/blocklists, app vs web, viewability (>70%), ad position
ENVIRONMENTAL: Geography, device, dayparting, frequency caps, browser/OS
```
### Buying models
```
CPM (Cost Per 1000 impressions): Awareness/reach. Range: $2-50
CPC (Cost Per Click): Consideration/traffic. Range: $0.50-15
CPA (Cost Per Acquisition): Performance/conversion. Range: $10-500
CPV (Cost Per View): Video campaigns. Range: $0.01-0.10
CPL (Cost Per Lead): B2B lead gen. Range: $20-200
```
### Brand safety
```
Pre-bid: Domain allow/blocklists, category exclusions, keyword blocklists,
brand safety vendors (IAS, DoubleVerify, Oracle Moat)
Post-bid: Viewability measurement (>50% pixels, >1 sec), IVT detection,
brand suitability scoring, placement reports
```
### Cross-channel optimization
**Attribution windows**: Google 30-day click, Meta 7-day click / 1-day view, LinkedIn 30-day click / 7-day view, Programmatic 30-day click / 14-day view.
**Budget reallocation**: Review weekly. Move 10-20% from high-CPA to low-CPA channels, wait 7 days, remeasure. If CPA increases after budget increase, you've hit diminishing returns — pull back. Optimize for marginal CPA, not average CPA.
### Negotiating direct deals
For premium placements (homepage takeovers, newsletter sponsorships, podcast ads): request rate card and negotiate 20-40% below, ask for added value (bonus impressions, social posts), request performance guarantees and historical data, negotiate cancellation terms, get makegood policy in writing.
## Examples
### Create a programmatic media plan
```prompt
We're launching a B2B SaaS product targeting CTOs and VP Engineering at companies with 100-1000 employees. Budget is $25,000/month for programmatic display and video. Create a full media plan using DV360 — campaign structure, audience segments (first-party site visitors + third-party intent data), creative specs, frequency caps, and brand safety settings. Include a 4-week optimization timeline.
```
### Optimize cross-channel budget allocation
```prompt
We run ads across Google Search ($15K/mo), Meta ($20K/mo), LinkedIn ($10K/mo), and programmatic display ($5K/mo). Our blended CPA is $95 but varies wildly by channel. Analyze the marginal CPA for each channel at different spend levels and recommend a reallocation to reduce blended CPA by 20%. Include the data I need to collect and the rebalancing schedule.
```
### Set up brand safety for programmatic campaigns
```prompt
We're a financial services company running programmatic display across 500+ publisher sites. Set up comprehensive brand safety — domain allowlist of premium financial and business publishers, category exclusions, keyword blocklists specific to our industry, and viewability thresholds. Include a weekly audit process to catch new placement issues.
```
## Guidelines
- Always set up brand safety (allowlists, blocklists, verification vendors) before launching programmatic campaigns
- Optimize for marginal CPA, not average CPA — the next dollar should go to the cheapest conversion
- Never reallocate more than 20% of a channel's budget in a single week to avoid resetting algorithmic learning
- Use frequency caps to prevent ad fatigue (typically 3-5 impressions per user per day for display)
- Always request historical performance data and makegood policies before signing direct deals
- Review placement reports weekly to catch brand safety issues early
- Include viewability thresholds (>70%) in all programmatic line itemsRelated Skills
vertex-media-generation
Generate images with Imagen and videos with Veo using the Vercel AI SDK Google Vertex provider. Use when the user wants to generate images, edit images (inpainting, outpainting, background swap), generate videos, or build media generation pipelines with @ai-sdk/google-vertex. Covers Imagen 4.0/3.0 and Veo 3.1/3.0/2.0 models.
social-media-osint
Social media OSINT techniques and tools for gathering intelligence from public profiles across Twitter/X, LinkedIn, Instagram, and Facebook. Use when: investigating individuals or companies, finding social footprint, correlating usernames across platforms, mapping professional networks, or identifying employees and their public activity.
zustand
You are an expert in Zustand, the small, fast, and scalable state management library for React. You help developers manage global state without boilerplate using Zustand's hook-based stores, selectors for performance, middleware (persist, devtools, immer), computed values, and async actions — replacing Redux complexity with a simple, un-opinionated API in under 1KB.
zoho
Integrate and automate Zoho products. Use when a user asks to work with Zoho CRM, Zoho Books, Zoho Desk, Zoho Projects, Zoho Mail, or Zoho Creator, build custom integrations via Zoho APIs, automate workflows with Deluge scripting, sync data between Zoho apps and external systems, manage leads and deals, automate invoicing, build custom Zoho Creator apps, set up webhooks, or manage Zoho organization settings. Covers Zoho CRM, Books, Desk, Projects, Creator, and cross-product integrations.
zod
You are an expert in Zod, the TypeScript-first schema declaration and validation library. You help developers define schemas that validate data at runtime AND infer TypeScript types at compile time — eliminating the need to write types and validators separately. Used for API input validation, form validation, environment variables, config files, and any data boundary.
zipkin
Deploy and configure Zipkin for distributed tracing and request flow visualization. Use when a user needs to set up trace collection, instrument Java/Spring or other services with Zipkin, analyze service dependencies, or configure storage backends for trace data.
zig
Expert guidance for Zig, the systems programming language focused on performance, safety, and readability. Helps developers write high-performance code with compile-time evaluation, seamless C interop, no hidden control flow, and no garbage collector. Zig is used for game engines, operating systems, networking, and as a C/C++ replacement.
zed
Expert guidance for Zed, the high-performance code editor built in Rust with native collaboration, AI integration, and GPU-accelerated rendering. Helps developers configure Zed, create custom extensions, set up collaborative editing sessions, and integrate AI assistants for productive coding.
zeabur
Expert guidance for Zeabur, the cloud deployment platform that auto-detects frameworks, builds and deploys applications with zero configuration, and provides managed services like databases and message queues. Helps developers deploy full-stack applications with automatic scaling and one-click marketplace services.
zapier
Automate workflows between apps with Zapier. Use when a user asks to connect apps without code, automate repetitive tasks, sync data between services, or build no-code integrations between SaaS tools.
zabbix
Configure Zabbix for enterprise infrastructure monitoring with templates, triggers, discovery rules, and dashboards. Use when a user needs to set up Zabbix server, configure host monitoring, create custom templates, define trigger expressions, or automate host discovery and registration.
yup
Validate data with Yup schemas. Use when adding form validation, defining API request schemas, validating configuration, or building type-safe validation pipelines in JavaScript/TypeScript.