Agent skill

Algo Ad Vcg

by asgard-ai-platform in asgard-ai-platform/skills

Implement VCG mechanism for incentive-compatible ad slot allocation with truthful bidding.

MITAuto-check passed

Install Algo Ad Vcg

skills CLI
$ npx skills add asgard-ai-platform/skills --skill algo-ad-vcg -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install asgard-ai-platform/skills algo-ad-vcg --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/asgard-ai-platform/skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/algo-ad-vcg .claude/skills/algo-ad-vcg && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
algo-ad-vcg
GitHub stars
242
Token cost
~993 tokens
SKILL.md length
372 words
Files
4 (incl. references)
Skills in repo
207
Repo updated
First seen
Licence
MIT

At a glance

Implement VCG mechanism for incentive-compatible ad slot allocation with truthful bidding.

  • Works in 4 steps: Input Validation → Core Algorithm → Verification → …
  • The user needs to design a truthful auction mechanism
  • SKILL.md covers Overview, When to Use, Algorithm and Output Format, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md

What it does

Algo Ad Vcg is an agent skill from asgard-ai-platform/skills. 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'.

Its SKILL.md is about 990 tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `examples/sample_scenario.md`, `references/combinatorial-vcg.md` and `references/revenue-comparison.md`).

The repository describes itself as: 301 open-source coding agent skills across 22 domains — methodology, judgment & gotchas packaged as Claude Agent Skills for the Asgard AI Platform. The licence is MIT.

When your agent uses it

  • The user needs to design a truthful auction mechanism
  • Compute externality-based payments
  • Understand why platforms may prefer GSP over VCG — even if they say truthful auction design
  • Incentive-compatible mechanism

Example prompts

  • “truthful auction design”
  • “VCG payments”
  • “incentive-compatible mechanism”
  • “/algo-ad-vcg”

Workflow steps

4 steps, taken from the step headings in SKILL.md.

  1. Input Validation
  2. Core Algorithm
  3. Verification
  4. Output

What it can do on your machine

Read from SKILL.md and the folder at commit 4e7f4f8. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are json).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Algo Ad Vcg loads about 993 tokens when it runs, and up to ~6k if it reads all its reference files. Until then it costs about 91 tokens; SKILL.md has 372 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~91
When it runs · the whole SKILL.md, loaded when a task matches
~993
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from asgard-ai-platform/skills at commit 4e7f4f8, republished under its MIT licence (© asgard-ai-platform). 372 words, ~993 tokens.

Download SKILL.mdSave it as .claude/skills/algo-ad-vcg/SKILL.md (or your agent's skills folder). This skill also uses 3 other files; get the full folder from GitHub.
name
algo-ad-vcg
description
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'.
metadata.category
WP-37 廣告演算法
metadata.tags
advertising, auction, vcg, mechanism-design

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
  1. Compute welfare-maximizing allocation: assign advertisers to slots to maximize Σ(value_i × CTR_slot_i)
  2. For each winner i in slot s: compute total welfare WITHOUT advertiser i (re-optimize remaining bidders)
  3. VCG payment_i = (welfare of others without i) - (welfare of others with i present)
  4. 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

json
{
  "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

Show full SKILL.md (160 more words)Show less
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
InputExpectedWhy
All same valuationAll pay 0No externality imposed — no marginal harm
One bidder, one slotPays 0No other bidder harmed
Bidders < slotsAll win, all pay 0No 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

© asgard-ai-platform, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 3 other files (references) in algo-ad-vcg of asgard-ai-platform/skills.

  • SKILL.md
  • examples/sample_scenario.md
  • references/combinatorial-vcg.md
  • references/revenue-comparison.md

Open the folder on GitHubat commit 4e7f4f8

Compare with similar skills

Algo Ad Vcg next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Algo Ad Vcg compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Algo Ad Vcg this skillasgard-ai-platform/skills242—~993Automated safety check: PassMIT
Implementsickn33/agentic-awesome-skills47k5 repos~306Automated safety check: PassMIT
Implementcodewhale-hq/Codewhale41k—~190Automated safety check: PassMIT
Incremental Implementationaddyosmani/agent-skills105k1 repos~2.3kAutomated safety check: PassMIT
Implementbestofjs/bestofjs3.1k18 repos~109Automated safety check: PassMIT
Agent Resource Allocatorruvnet/ruflo74k2 repos~4.9kAutomated safety check: PassMIT

Similar skills

  • Implement

    sickn33/agentic-awesome-skills

    Implement a piece of work based on a PRD or set of issues. An agent skill from sickn33/agentic-awesome-skills.

    47k GitHub starsUsed in 5 repos~306 tokens
    Product & Project ManagementAuto-check passed
  • Implement

    codewhale-hq/Codewhale

    Carry an authorized, defined request or approved plan through scoped edits and proportionate verification.

    41k GitHub stars~190 tokensUpdated today
    Auto-check passed
  • Incremental Implementation

    addyosmani/agent-skills

    Delivers a change in thin vertical slices, each implemented, tested, verified and committed before the next, using vertical, contract-first or risk-first slicing.

    105k GitHub starsUsed in 1 repo~2.3k tokens
    Agent WorkflowsAuto-check passed
  • Implement

    bestofjs/bestofjs

    Implement a piece of work based on a spec or set of tickets.

    3.1k GitHub starsUsed in 18 repos~109 tokens
    Auto-check passed
  • Agent skill for resource-allocator - invoke with $agent-resource-allocator

    74k GitHub starsUsed in 2 repos~4.9k tokens
    Auto-check passed
  • Implement

    Automattic/simplenote-android

    End-to-end implementation workflow: plan, implement, verify, commit, and open a draft PR.

    1.9k GitHub stars~1.1k tokensUpdated yesterday
    Testing & QAAuto-check passed

More from asgard-ai-platform/skills

All 207 skills in this repo
  • Algo Ecom Bm25

    asgard-ai-platform/skills

    Implement BM25 ranking function for e-commerce product search relevance scoring.

    242 GitHub stars~1.4k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Mfg Cpk

    asgard-ai-platform/skills

    Calculate Cpk process capability index to assess whether a process meets specification requirements.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Price Elasticity

    asgard-ai-platform/skills

    Calculate price elasticity of demand to quantify how price changes affect sales volume.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Bayesian

    asgard-ai-platform/skills

    Apply Bayesian averaging to rank items by combining observed ratings with prior expectations.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Elo

    asgard-ai-platform/skills

    Implement Elo rating system to rank items or players from pairwise comparison outcomes.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed
  • Algo Rank Wilson

    asgard-ai-platform/skills

    Calculate Wilson Score confidence intervals for ranking items by positive proportion with sample size correction.

    242 GitHub stars~1.1k tokensUpdated 4 mo ago
    Auto-check passed

Questions about Algo Ad Vcg

What does Algo Ad Vcg do?

Implement VCG mechanism for incentive-compatible ad slot allocation with truthful bidding. Algo Ad Vcg is an agent skill from asgard-ai-platform/skills. Implement VCG mechanism for incentive-compatible ad slot allocation with truthful bidding.

When should I use Algo Ad Vcg?

Algo Ad Vcg fits situations like: the user needs to design a truthful auction mechanism; compute externality-based payments; understand why platforms may prefer GSP over VCG — even if they say truthful auction design; incentive-compatible mechanism.

How do I install Algo Ad Vcg in Claude Code?

Run `npx skills add asgard-ai-platform/skills --skill algo-ad-vcg -a claude-code`. Or copy the skill folder (algo-ad-vcg in asgard-ai-platform/skills) into .claude/skills/algo-ad-vcg in your project. Claude Code loads it when a task matches its description.

How do I install Algo Ad Vcg in Codex?

Run `npx skills add asgard-ai-platform/skills --skill algo-ad-vcg -a codex`. Or copy the skill folder (algo-ad-vcg in asgard-ai-platform/skills) into .agents/skills/algo-ad-vcg in your project. Codex loads it when a task matches its description.

Can I use Algo Ad Vcg in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add asgard-ai-platform/skills --skill algo-ad-vcg -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/algo-ad-vcg, .gemini/skills/algo-ad-vcg, .github/skills/algo-ad-vcg and .opencode/skills/algo-ad-vcg in your project.

What does Algo Ad Vcg need to run?

SKILL.md names no scripts, command-line tools or credentials: Algo Ad Vcg is instructions for the agent only.

Does Algo Ad Vcg access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Algo Ad Vcg safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Algo Ad Vcg use?

Algo Ad Vcg is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Algo Ad Vcg use?

About 993 tokens (SKILL.md is roughly 4k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 5k tokens, read only when the agent opens those files.

What are the alternatives to Algo Ad Vcg?

Skills that share tags, products or a category with Algo Ad Vcg: Implement (sickn33/agentic-awesome-skills, 47k stars), Implement (codewhale-hq/Codewhale, 41k stars), Incremental Implementation (addyosmani/agent-skills, 105k stars) and Implement (bestofjs/bestofjs, 3.1k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Algo Ad Vcg?

asgard-ai-platform (a GitHub organization) maintains it in asgard-ai-platform/skills, which has 242 GitHub stars. The repository holds 207 skills in this directory. The repository was last updated on June 6, 2026.

Source: asgard-ai-platform/skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.