mcpbeat Sign in

Algo Ad Budget Agent Skill

Optimize advertising budget allocation across campaigns using marginal returns analysis. Use this skill when the user needs to distribute budget across multiple campaigns, optimize spend pacing, or maximize overall ROAS under budget constraints — even if they say 'how to split my ad budget', 'campaign budget optimization', or 'diminishing returns on ad spend'.

9k tokens
context cost
the whole folder, loaded on every use
4
files
instructions only
0
copies elsewhere
how many repositories repackaged it
223
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/asgard-ai-platform/skills --skill algo-ad-budget

What comes with it

30 444 bytes besides the instruction
examples/sample_scenario.md
references/attribution-integration.md
references/response-curves.md

The instruction itself

14 sections, as written by the author

Ad Budget Allocation Optimization

Overview

Budget allocation distributes a total advertising budget across campaigns to maximize overall returns. Uses the equal marginal returns principle: allocate until the marginal CPA (or marginal ROAS) is equalized across all campaigns. Handles diminishing returns and budget constraints.

When to Use

Trigger conditions:

  • Distributing a fixed budget across multiple campaigns or channels
  • Identifying diminishing returns and optimal spend levels per campaign
  • Rebalancing budget after performance changes

When NOT to use:

  • When optimizing bids within a single campaign (use bidding strategy)
  • When there's only one campaign (nothing to allocate across)

Algorithm

IRON LAW: Equal Marginal Returns Principle
Optimal allocation makes the MARGINAL return of the last dollar
equal across ALL campaigns. If Campaign A's marginal CPA is $5
and Campaign B's is $15, shift budget from B to A until they equalize.
Total budget constraint: Σ budget_i = total_budget.

Phase 1: Input Validation

Collect per-campaign: historical spend, conversions, revenue at multiple spend levels. Need at least 3 data points per campaign to fit response curve.

Gate: Sufficient historical data to estimate response curves.

Phase 2: Core Algorithm

  • Fit response curve per campaign: conversions = f(spend). Common models: log curve, power curve, or S-curve
  • Compute marginal return curve: f'(spend) for each campaign
  • Allocate: use Lagrangian optimization or iterative greedy — assign next marginal dollar to campaign with highest marginal return
  • Apply constraints: minimum spend floors, maximum caps, channel-specific rules

Phase 3: Verification

Check: total allocation = total budget, no campaign below floor or above cap, marginal returns approximately equal at boundaries.

Gate: Allocation sums to budget, constraints satisfied.

Phase 4: Output

Return allocation table with expected performance projections.

Output Format

{
  "allocation": [{"campaign": "Search-Brand", "budget": 50000, "expected_conversions": 200, "expected_cpa": 250}],
  "total": {"budget": 200000, "expected_conversions": 650, "blended_cpa": 308},
  "metadata": {"optimization_method": "lagrangian", "response_model": "log_curve"}
}

Examples

Sample I/O

Input: Budget: $100K, Campaigns: Search ($50K, 100 conv), Social ($30K, 60 conv), Display ($20K, 20 conv)

Expected: Shift budget from Display (high marginal CPA) to Search (low marginal CPA). e.g., Search $60K, Social $30K, Display $10K.

Edge Cases

| Input | Expected | Why |

|-------|----------|-----|

| One campaign dominates | Most budget to winner | But maintain minimum floor for others |

| All campaigns saturated | Reduce total spend | Spending more won't help |

| New campaign, no data | Use minimum test budget | Need data before optimizing |

Gotchas

  • Response curve extrapolation: Don't optimize beyond observed spend ranges. The curve may change shape at higher spend levels.
  • Attribution overlap: Users may see ads across campaigns. Last-click attribution double-counts, inflating high-funnel campaign CPA. Use multi-touch attribution.
  • Diminishing returns assumption: Not all campaigns follow smooth diminishing returns. Some have step functions (e.g., reaching a new audience segment at a spend threshold).
  • Time dynamics: Response curves shift seasonally and competitively. Refit curves monthly or use rolling windows.
  • Minimum viable spend: Each campaign needs enough budget to exit the learning phase. Spreading too thin means no campaign gets sufficient data.

References

  • For response curve fitting methods, see references/response-curves.md
  • For multi-touch attribution integration, see references/attribution-integration.md

Other skills for the same job

different authors, same section of the catalogue
Internal Comms
by anthropics
vendor ×13

A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).

6k tokens
Competitive Ads Extractor
by frostant
×10

Extracts and analyzes competitors' ads from ad libraries (Facebook, LinkedIn, etc.) to understand what messaging, problems, and creative approaches are working. Helps inspire and improve your own ad campaigns.

2k tokens
Lead Research Assistant
by frostant
×8

Identifies high-quality leads for your product or service by analyzing your business, searching for target companies, and providing actionable contact strategies. Perfect for sales, business development, and marketing professionals.

2k tokens
Developer Growth Analysis
by frostant
×6

Analyzes your recent Claude Code chat history to identify coding patterns, development gaps, and areas for improvement, curates relevant learning resources from HackerNews, and automatically sends a personalized growth report to your Slack DMs.

4k tokens
App Store Optimization
by alirezarezvani
×3

Complete App Store Optimization (ASO) toolkit for researching, optimizing, and tracking mobile app performance on Apple App Store and Google Play Store

55k tokens scripts
Deeptools
by christophacham
×3

NGS analysis toolkit. BAM to bigWig conversion, QC (correlation, PCA, fingerprints), heatmaps/profiles (TSS, peaks), for ChIP-seq, RNA-seq, ATAC-seq visualization.

21k tokens scripts
Pymatgen
by christophacham
×3

Materials science toolkit. Crystal structures (CIF, POSCAR), phase diagrams, band structure, DOS, Materials Project integration, format conversion, for computational materials science.

26k tokens scripts
Enhance Prompt
by google-labs-code
vendor ×2

Transforms vague UI ideas into polished, Stitch-optimized prompts. Enhances specificity, adds UI/UX keywords, injects design system context, and structures output for better generation results.

3k tokens

How to use it

Copy the folder

Take asgard-ai-platform/algo-ad-budget from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.