mcpbeat Sign in

Algo Ad Vcg Agent Skill

Implement VCG mechanism for incentive-compatible ad slot allocation with truthful bidding. Use this skill when the user needs to design a truthful auction mechanism, compute externality-based payments, or understand why platforms may prefer GSP over VCG — even if they say 'truthful auction design', 'VCG payments', or 'incentive-compatible mechanism'.

7k 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-vcg

What comes with it

24 173 bytes besides the instruction
examples/sample_scenario.md
references/combinatorial-vcg.md
references/revenue-comparison.md

The instruction itself

14 sections, as written by the author

VCG Mechanism (Vickrey-Clarke-Groves)

Overview

VCG allocates slots to maximize total social welfare and charges each winner the externality they impose on others. Truthful bidding is a dominant strategy. Runs in O(N log N + K × N) where N=bidders, K=slots.

When to Use

Trigger conditions:

  • Designing an incentive-compatible (truthful) multi-slot auction
  • Computing welfare-maximizing allocations with externality pricing
  • Academic analysis comparing VCG to GSP auctions

When NOT to use:

  • When revenue maximization matters more than truthfulness (GSP often generates more revenue)
  • For single-item auctions (standard Vickrey suffices)

Algorithm

IRON LAW: VCG Guarantees Truthful Bidding BUT May Not Maximize Revenue
VCG payments are based on externality (harm to others), not competition.
This makes VCG payments often LOWER than GSP payments. Platforms
choose GSP because it typically generates higher revenue despite
strategic bidding. Truthfulness has a revenue cost.

Phase 1: Input Validation

Collect true valuations per click for each advertiser and CTR for each slot position. Valuations must be non-negative.

Gate: All valuations non-negative, slot CTRs decreasing by position.

Phase 2: Core Algorithm

  • Compute welfare-maximizing allocation: assign advertisers to slots to maximize Σ(value_i × CTR_slot_i)
  • For each winner i in slot s: compute total welfare WITHOUT advertiser i (re-optimize remaining bidders)
  • VCG payment_i = (welfare of others without i) - (welfare of others with i present)
  • This equals: Σ over lower positions j of (value_{j+1} × (CTR_j - CTR_{j+1}))

Phase 3: Verification

Check: all payments ≤ valuations (individual rationality), truthful bidding is dominant strategy, allocation maximizes welfare.

Gate: IR satisfied, welfare is optimal.

Phase 4: Output

Return allocation with VCG payments and welfare metrics.

Output Format

{
  "allocation": [{"advertiser": "A", "slot": 1, "vcg_payment_per_click": 1.80, "total_welfare_contribution": 500}],
  "metadata": {"total_welfare": 1500, "total_revenue": 420, "mechanism": "vcg"}
}

Examples

Sample I/O

Input: 3 bidders values [10, 8, 2], 2 slots CTRs [0.5, 0.3]

Expected: Allocation: Bidder1→Slot1, Bidder2→Slot2. VCG payments: Bidder1 = 8×(0.5-0.3)+2×0.3 = 2.20, Bidder2 = 2×0.3 = 0.60.

Edge Cases

| Input | Expected | Why |

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

| All same valuation | All pay 0 | No externality imposed — no marginal harm |

| One bidder, one slot | Pays 0 | No other bidder harmed |

| Bidders < slots | All win, all pay 0 | No competition = no externality |

Gotchas

  • Revenue deficit: VCG often generates less revenue than GSP. In some cases, winners pay nothing (zero externality).
  • Computational complexity: For general combinatorial auctions, VCG requires solving NP-hard welfare maximization. For position auctions, it's polynomial.
  • Collusion vulnerability: VCG can be manipulated by colluding bidders who coordinate to reduce each other's externalities.
  • Non-monotonicity: Adding a slot can sometimes DECREASE revenue (known as the "lonely bidder" pathology).
  • Practical rarity: Almost no major ad platform uses pure VCG. It's theoretically elegant but commercially suboptimal.

References

  • For VCG vs GSP revenue comparison, see references/revenue-comparison.md
  • For combinatorial VCG extensions, see references/combinatorial-vcg.md

Other skills for the same job

different authors, same section of the catalogue
Invoice Organizer
by frostant
×5

Automatically organizes invoices and receipts for tax preparation by reading messy files, extracting key information, renaming them consistently, and sorting them into logical folders. Turns hours of manual bookkeeping into minutes of automated organization.

3k tokens
Backtest Expert
by BaggaT236
×3

Expert guidance for systematic backtesting of trading strategies. Use when developing, testing, stress-testing, or validating quantitative trading strategies. Covers "beating ideas to death" methodology, parameter robustness testing, slippage modeling, bias prevention, and interpreting backtest results. Applicable when user asks about backtesting, strategy validation, robustness testing, avoiding overfitting, or systematic trading development.

15k tokens scripts
Analyzing Financial Statements
by anthropics
vendor ×2

This skill calculates key financial ratios and metrics from financial statement data for investment analysis

8k tokens scripts
Creating Financial Models
by anthropics
vendor ×2

This skill provides an advanced financial modeling suite with DCF analysis, sensitivity testing, Monte Carlo simulations, and scenario planning for investment decisions

8k tokens scripts
Earnings Calendar
by nicepkg
×2

This skill retrieves upcoming earnings announcements for US stocks using the Financial Modeling Prep (FMP) API. Use this when the user requests earnings calendar data, wants to know which companies are reporting earnings in the upcoming week, or needs a weekly earnings review. The skill focuses on mid-cap and above companies (over $2B market cap) that have significant market impact, organizing the data by date and timing in a clean markdown table format. Supports multiple environments (CLI, Desktop, Web) with flexible API key management.

17k tokens scripts
Agentic Wallet
by coinbase
vendor ×2

Crypto wallet operations via the awal CLI — sign in, check balances, send USDC/ETH/POL/SOL, trade tokens, fund the wallet, and use the x402 payment protocol to discover paid services, pay for API calls, monetize an API, or query onchain data. Use whenever the user mentions signing in, login, authentication, wallet status, balance, address, sending money, paying someone, transferring tokens, ENS names, swapping/trading/converting tokens, funding/topping up/onramp, USDC, ETH, POL, SOL, the x402 bazaar, paid APIs, monetizing an endpoint, or querying onchain data on Base.

14k tokens
Alpha Vantage
by christophacham
×2

Access real-time and historical stock market data, forex rates, cryptocurrency prices, commodities, economic indicators, and 50+ technical indicators via the Alpha Vantage API. Use when fetching stock prices (OHLCV), company fundamentals (income statement, balance sheet, cash flow), earnings, options data, market news/sentiment, insider transactions, GDP, CPI, treasury yields, gold/silver/oil prices, Bitcoin/crypto prices, forex exchange rates, or calculating technical indicators (SMA, EMA, MACD, RSI, Bollinger Bands). Requires a free API key from alphavantage.co.

13k tokens
Braintree Automation
by christophacham
×2

Braintree Automation: manage payment processing via Stripe-compatible tools for customers, subscriptions, payment methods, and transactions

2k tokens needs MCP

How to use it

Copy the folder

Take asgard-ai-platform/algo-ad-vcg 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.