account-research
Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM.…
\"Implement Generalized Second Price auction for ad slot allocation and pricing. Use this skill when the user needs to understand search ad auctions, compute ad positions and costs-per-click, or analyze bidding dynamics — even if they say 'how does Google Ads auction work', 'ad
$ npx -y skills add charlieviettq/awesome-agent-skill --skill algo-ad-gsp --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/algo-ad-gspContext preview
The summary Claude sees to decide when to auto-load this skill.
\"Implement Generalized Second Price auction for ad slot allocation and pricing. Use this skill when the user needs to understand search ad auctions, compute ad positions and costs-per-click, or analyze bidding dynamics — even if they say 'how does Google Ads auction work', 'ad
name: "\"algo-ad-gsp\"" description: "\"Implement Generalized Second Price auction for ad slot allocation and pricing. Use this skill when the user needs to understand search ad auctions, compute ad positions and costs-per-click, or analyze bidding dynamics — even if they say 'how does Google Ads auction work', 'ad rank calculation', or 'second price auction for ads'.\"." allowed-tools: Read, Glob, Grep
GSP allocates K ad slots to N bidders, assigning the highest bidder the top slot, second-highest the second slot, etc. Each winner pays the bid of the advertiser ONE POSITION BELOW them (per-slot second price). Used by Google Ads and Bing Ads. Runs in O(N log N) for sorting bids.
**Trigger conditions:**
**When NOT to use:**
IRON LAW: GSP Is NOT Incentive-Compatible Unlike Vickrey (single-item second-price) auctions, truthful bidding is NOT a dominant strategy in GSP. Bidders may strategically shade bids below their true value. The equilibrium depends on competitor bids. Ad Rank = Bid × Quality Score (Google's variant adds format/extensions).
Collect: bids, quality scores (or ad rank scores) for all competing advertisers. Define available slot positions and their click-through rate multipliers. **Gate:** All bids positive, quality scores in valid range.
1. Compute Ad Rank for each advertiser: AdRank_i = Bid_i × QualityScore_i 2. Sort advertisers by Ad Rank descending 3. Assign top-K to slots 1 through K 4. Compute payment: CPC_i = AdRank_{i+1} / QualityScore_i (price to maintain position) 5. Last slot winner pays the minimum bid threshold
Check: all payments ≤ bids, positions ordered by Ad Rank, no advertiser pays more than their bid. **Gate:** Payment ≤ bid for all winners, positions consistent.
Return slot assignments with positions, CPCs, and estimated clicks.
{
"slots": [{"advertiser": "A", "position": 1, "ad_rank": 8.5, "cpc": 2.10, "est_clicks": 100}],
"metadata": {"total_bidders": 15, "slots_available": 4, "auction_type": "gsp"}
}**Input:** Bidders: A(bid=3, QS=8), B(bid=4, QS=5), C(bid=2, QS=9). Slots: 2. **Expected:** Ranks: A=24, C=18, B=20. Order: A(1st), B(2nd). CPC_A = 20/8 = 2.50, CPC_B = 18/5 = 3.60.
| Input | Expected | Why | |-------|----------|-----| | Tie in Ad Rank | Platform tiebreaker (historical CTR, etc.) | GSP needs strict ordering | | One bidder | Wins slot 1, pays minimum CPC | No competition → floor price | | Bid below threshold | Not eligible | Minimum bid requirement enforced |
Curated skill pack for LLM agents in engineer and science workflow (Cursor & Claude ready).
Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM.…
Evaluate LLM agents and tool-using workflows—task success, tool accuracy, latency/cost, safety, and regression suites. Use when shipping agent features,…
Design agent tools and CLI surfaces—schemas, naming, errors, idempotency, and discoverability for LLM callers. Use when defining tools for agents, SDKs, or…
\"Implement and select ad bidding strategies from manual CPC to automated target-CPA and target-ROAS. Use this skill when the user needs to choose a bidding…
\"Optimize advertising budget allocation across campaigns using marginal returns analysis. Use this skill when the user needs to distribute budget across…
\"Build CTR prediction models for estimating ad click-through rates from features. Use this skill when the user needs to predict click probability, build an ad…