Skip to main content
ClaudeWave
Skill209 estrellas del repoactualizado 7d ago

algo-price-dynamic

Implement dynamic pricing strategies that adjust prices in real-time based on demand, time, and competition. Use this skill when the user needs to build a dynamic pricing system, implement surge pricing, or optimize prices for perishable inventory — even if they say 'real-time pricing', 'surge pricing', or 'demand-based price adjustment'.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/asgard-ai-platform/skills /tmp/algo-price-dynamic && cp -r /tmp/algo-price-dynamic/algo-price-dynamic ~/.claude/skills/algo-price-dynamic
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Dynamic Pricing

## Overview

Dynamic pricing adjusts prices in real-time based on demand signals, time, inventory, and competitive conditions. Common in airlines, hotels, ride-sharing, and e-commerce. Objective: maximize revenue (or profit) subject to capacity/inventory constraints.

## When to Use

**Trigger conditions:**
- Pricing perishable inventory (hotel rooms, airline seats, event tickets)
- Implementing demand-responsive pricing for e-commerce
- Building surge pricing or time-based pricing systems

**When NOT to use:**
- For one-time pricing decisions (use Van Westendorp or conjoint)
- When price changes are impractical (regulated markets, long-term contracts)

## Algorithm

```
IRON LAW: Dynamic Pricing Requires REAL-TIME Data
Stale data produces prices optimal for PAST conditions, not current ones.
Three data streams must be current:
1. Demand signal (bookings, searches, cart additions)
2. Inventory/capacity status
3. Competitive prices (where applicable)
Update frequency: minutes for ride-sharing, hours for hotels, daily for retail.
```

### Phase 1: Input Validation
Collect: current demand indicators, remaining inventory/capacity, time until expiration/event, competitor prices, price floor/ceiling constraints.
**Gate:** Real-time data feeds connected, business rules defined.

### Phase 2: Core Algorithm
**Rule-based:** If demand > threshold, increase price by X%. Tiered rules by inventory level.

**Demand-curve based:** 1. Estimate demand curve at current conditions. 2. Find price that maximizes revenue = P × Q(P). 3. Apply inventory constraint: if capacity is scarce, price up; if excess, price down.

**ML-based:** Train model to predict demand at each price point given context features. Optimize over predicted demand curve.

### Phase 3: Verification
Monitor: revenue per unit, booking pace, customer complaints, competitive position. A/B test new pricing rules.
**Gate:** Revenue improved without significant volume loss or customer backlash.

### Phase 4: Output
Return recommended price with reasoning and expected impact.

## Output Format

```json
{
  "recommended_price": 1200,
  "current_price": 999,
  "reasoning": {"demand_signal": "high", "inventory_remaining_pct": 15, "competitor_avg": 1100},
  "expected_impact": {"revenue_change_pct": 18, "volume_change_pct": -5},
  "metadata": {"strategy": "demand-curve", "update_frequency": "hourly"}
}
```

## Examples

### Sample I/O
**Input:** Hotel room, 3 days until date, 85% occupancy, average competitor price $150
**Expected:** Price above competitor ($160-170) due to high occupancy, short time horizon.

### Edge Cases
| Input | Expected | Why |
|-------|----------|-----|
| Zero demand | Drop to floor price | Stimulate demand, recover some revenue |
| Last unit available | Price near ceiling | Scarcity maximizes willingness to pay |
| Competitor flash sale | Don't auto-match if unnecessary | Avoid price war; assess if your product differentiates |

## Gotchas

- **Customer fairness perception**: Visible price discrimination (same product, different prices for different users) generates backlash. Segment by time, channel, or bundle — not by individual.
- **Price war spiraling**: Automated competitive pricing can create a race to the bottom. Set absolute floors and rate-of-change limits.
- **Demand cannibalization**: If customers learn prices drop later, they wait. This is the "strategic customer" problem — don't train customers to delay.
- **Regulatory risk**: Dynamic pricing may violate anti-gouging laws during emergencies. Build in legal constraint rules.
- **A/B testing bias**: Testing different prices creates revenue measurement challenges. The control group at the "wrong" price loses money by design.

## References

- For revenue management models (airline/hotel), see `references/revenue-management.md`
- For fairness constraints in dynamic pricing, see `references/fairness-constraints.md`
algo-ad-biddingSkill

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 strategy, set up automated bidding, or optimize bid parameters — even if they say 'what bidding strategy should I use', 'target CPA setup', or 'smart bidding configuration'.

algo-ad-budgetSkill

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'.

algo-ad-ctrSkill

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 ranking model, or evaluate ad creative performance — even if they say 'predict click rate', 'ad relevance scoring', or 'which ad will get more clicks'.

algo-ad-gspSkill

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'.

algo-ad-vcgSkill

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'.

algo-blockchain-basicsSkill

Explain blockchain fundamentals including distributed ledger architecture, consensus mechanisms, and block structure. Use this skill when the user needs to understand blockchain concepts, evaluate whether blockchain fits a use case, or design a blockchain-based solution — even if they say 'how does blockchain work', 'do I need blockchain', or 'distributed ledger'.

algo-blockchain-smart-contractSkill

Design and implement smart contracts as self-executing programmatic agreements on blockchain. Use this skill when the user needs to build automated on-chain logic, evaluate smart contract security, or design tokenized business rules — even if they say 'smart contract development', 'automated agreement', or 'on-chain logic'.

algo-ecom-bm25Skill

Implement BM25 ranking function for e-commerce product search relevance scoring. Use this skill when the user needs to build a text-based product search engine, improve search result relevance, or replace basic TF-IDF with a more robust ranking function — even if they say 'product search ranking', 'search relevance', or 'BM25 implementation'.