charlieviettq/awesome-agent-skill / .claude/skills/algo-price-dynamic
"algo-price-dynamic"
Verified"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'.".
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 4.3 KB |
| examples/sample_scenario.md | markdown | 5.0 KB |
| references/fairness-constraints.md | markdown | 10.8 KB |
| references/revenue-management.md | markdown | 11.0 KB |
examples/sample_scenario.md
View on GitHub# Example: 演唱會門票最後 72 小時動態定價
## Scenario
**TicketFlow** 是一家台灣票務平台,代理一場在台北小巨蛋舉辦的獨立樂團演唱會(座位數:13,500)。
活動日期:2026-04-18(週六)
現在時間:2026-04-15 10:00(距演出 72 小時)
產品經理 Cathy 帶著以下資料來詢問:
> 「我們現在賣了 11,200 張票,剩 2,300 張。這週搜尋量突然衝高,競品平台的黃牛票掛價都到 2,800 元。我們官方售價還在 1,800 元。要怎麼調?會不會調太高引爆客訴?」
平台當前資料:
- 官方售價:NT$1,800(普通區統一定價)
- 已售:11,200 / 13,500(83% 佔用率)
- 剩餘庫存:2,300 張
- 近 24 小時搜尋量:+340%(vs 過去 7 日平均)
- 近 24 小時購票轉換率:18%(平時 6%)
- 競品黃牛平台均價:NT$2,800
- 價格上限(主辦授權):NT$2,500
- 價格下限(合約保護):NT$1,800
---
## Analysis
### Phase 1: 輸入驗證
| 資料流 | 狀態 | 說明 |
|--------|------|------|
| 需求訊號 | ✅ 即時 | 搜尋量 +340%,轉換率 3× 基準 |
| 庫存狀態 | ✅ 即時 | 剩餘 17%(2,300 張),屬高稀缺區間 |
| 競品價格 | ✅ 可用 | 黃牛均價 NT$2,800(非官方競品,參考用) |
| 業務規則 | ✅ 確認 | Floor NT$1,800 / Ceiling NT$2,500 |
**Gate 通過**:三條資料流均為當日資料,業務規則已界定邊界。
---
### Phase 2: 核心演算法 — 需求曲線法
**步驟 1:估算當前需求彈性**
從平台歷史數據取得同類演出的價格-銷量曲線。保守估算:
| 假設售價 | 預估剩餘 72H 轉換率 | 預估增售張數 |
|----------|---------------------|-------------|
| NT$1,800(不動)| 18% | 414 張 |
| NT$2,000 | 14% | 322 張 |
| NT$2,200 | 10% | 230 張 |
| NT$2,500(上限)| 6% | 138 張 |
> 轉換率下滑假設來自彈性係數 ε ≈ −0.8(非必需娛樂品,短時間窗口,替代選項少)
**步驟 2:計算各價位預期收益**
```
R = 售價 × 預估增售張數
R(1,800) = 1,800 × 414 = 744,720
R(2,000) = 2,000 × 322 = 644,000
R(2,200) = 2,200 × 230 = 506,000
R(2,500) = 2,500 × 138 = 345,000
```
> 以純收益最大化,NT$1,800 仍最高——**但這忽略了稀缺性溢價與庫存耗盡風險**。
**步驟 3:加入庫存約束調整**
剩餘 17% 庫存(< 20% 閾值)觸發稀缺性加成。規則:
- 庫存 15–20%:+10% 基礎加成
- 距活動 < 96H:+5% 時間加成
- 需求訊號高燒(搜尋 +300%+):+5% 需求加成
加成合計:+20% → 建議在 NT$1,800 基礎上調整至 **NT$2,160**,取整至 **NT$2,200**。
**步驟 4:公平性與客訴風險評估**
- 採「時間分段」定價(非個人差別定價):公開公告「最後 72 小時票價調整」
- NT$2,200 vs 黃牛 NT$2,800:官方仍有 21% 折讓,提供購買正當性
- 不追蹤個別用戶調價,避免個人化差別定價引發 GDPR/個資疑慮
- **反製造商訓練效應**:明確聲明「活動前不降價」,阻止觀望行為
**步驟 5:競品價格戰防護**
黃牛屬非正式競品,不跟隨其定價邏輯。絕對不自動比照 NT$2,800——
官方票的信任溢價(正版保障、退換票保護)本身即差異化。
---
### Phase 3: 驗證計畫
| 指標 | 監控頻率 | 警示閾值 |
|------|----------|----------|
| 每小時新增銷量 | 每小時 | 跌破 20 張/H 觸發降價評估 |
| 客服投訴量 | 即時 | 單日 > 50 件重新評估定價策略 |
| 剩餘庫存 | 即時 | 降至 500 張以下啟動 Ceiling 評估 |
| 競品黃牛價 | 每 4 小時 | 僅作參考,不自動聯動 |
---
## Result
```json
{
"recommended_price": 2200,
"current_price": 1800,
"reasoning": {
"demand_signal": "high",
"search_volume_change_pct": 340,
"inventory_remaining_pct": 17,
"hours_to_event": 72,
"competitor_avg": 2800,
"scarcity_bonus_pct": 10,
"time_urgency_bonus_pct": 5,
"demand_signal_bonus_pct": 5
},
"expected_impact": {
"revenue_change_pct": 22,
"volume_change_pct": -44,
"incremental_revenue": "NT$506,000 (72H window)"
},
"fairness_controls": {
"segmentation": "time-based only — no individual targeting",
"public_announcement": true,
"floor_honored": true,
"price_ceiling_respected": true
},
"metadata": {
"strategy": "demand-curve + scarcity-constraint",
"update_frequency": "hourly",
"next_review": "2026-04-15T18:00+08:00",
"anti_gouging_note": "NT$2,200 is 21% below grey-market price; within reasonable markup"
}
}
```
**Cathy 的操作建議:**
1. **立即調價至 NT$2,200**,在購票頁面顯示「距活動 72 小時,票價已更新」
2. 每小時確認銷量;若單小時 < 20 張,降回 NT$2,000 評估
3. 剩餘票數 < 500 張時,可評估是否調至上限 NT$2,500(需主辦書面同意)
4. **不得**對相同座位區不同用戶顯示不同價格(個人化差別定價)
5. 活動結束後,收集此次彈性數據更新需求曲線模型,供下次演出參考
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis. | Stars: 472k | Updated | Claude CodeCodex | Unverified | Install |
| diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness. | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependencies | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |