/install discount-hunter
Discount Hunter
When to Use
Activate when the user:
- Is on a checkout, cart, or payment page that has a promo/discount/coupon code input field
- Asks to "find a discount code", "try coupon codes", "find a promo code", or "get a discount"
Do NOT activate if:
- There is no visible promo/discount/coupon/voucher code field on the page
- The user is not on a checkout or cart page
Overview
- Detect whether the current page has a promo/discount code field.
- Identify the merchant/store name from the page.
- Hunt for codes across multiple coupon sites in parallel background tabs.
- Collect & deduplicate all found codes.
- Test each code one by one in the promo field — stop as soon as one works.
- Report results. Never click any payment/checkout/submit/pay button.
Phase 1 — Safety Check & Field Detection
- Take a
take_snapshotof the user's current page. - Scan the snapshot for any input field with labels, placeholders, or nearby text matching patterns like:
- "promo code", "discount code", "coupon code", "voucher code", "gift code", "referral code", "promotional code", "have a code?", "enter code", "redemption code"
- If NO such field is found:
"I couldn't find a promo/discount code field on this page. This skill only works on checkout or cart pages that have a code input. Please navigate to the payment/cart page first." Stop here.
- If a field IS found: Note its element ID for later use. Also note the location of any Apply / Redeem / Submit code button — this is the ONLY button that will ever be clicked. Identify and note any Pay / Place Order / Complete Purchase / Confirm buttons — these must never be clicked.
- Use
get_page_contentto identify the store/merchant name (from page title, logo alt text, or domain). - Report to user: "Found a promo code field on [Store Name]. Searching for codes now..."
Phase 2 — Code Hunting (Parallel Background Tabs)
Open a hidden window with create_hidden_window for research. Then open parallel tabs with new_hidden_page to search these sources simultaneously:
Search Targets
| Tab | URL Pattern |
|---|---|
| 1 | https://www.google.com/search?q=\x3Cstore>+promo+code+\x3Ccurrent_year> |
| 2 | https://www.google.com/search?q=\x3Cstore>+coupon+code+working+\x3Ccurrent_year> |
| 3 | https://www.retailmenot.com/view/\x3Cstore-domain> |
| 4 | https://www.honey.com/coupons/\x3Cstore-slug> (or search https://www.joinhoney.com/shop/\x3Cstore>) |
| 5 | https://www.coupert.com/coupons/\x3Cstore-slug> |
| 6 | https://www.coupons.com/coupon-codes/\x3Cstore-slug>/ |
| 7 | https://dealspotr.com/#_=&query=\x3Cstore> |
| 8 | https://slickdeals.net/coupons/\x3Cstore-slug>/ |
| 9 | Reddit: https://www.google.com/search?q=site:reddit.com+\x3Cstore>+promo+code |
| 10 | https://www.wikibuy.com/stores/\x3Cstore-slug> |
Replace \x3Cstore> with the merchant name (URL-encoded), \x3Cstore-domain> with the root domain (e.g. nike.com), and \x3Ccurrent_year> with the current year.
Extraction per tab
For each tab, after the page loads:
- Use
get_page_contentto extract text. - Use
evaluate_scriptor regex pattern matching to find strings that look like promo codes:- Uppercase alphanumeric strings (e.g.
SAVE20,WELCOME10,SUMMER2024) - Patterns:
[A-Z0-9]{4,20}— typically 4–20 characters, often containing numbers or dashes - Look near text like "code:", "use code", "coupon:", "promo:", "copy code", "get code"
- Uppercase alphanumeric strings (e.g.
- Collect all found codes into a running list.
- Close the tab with
close_pagewhen done.
Deduplication & Ranking
After all tabs are processed:
- Deduplicate the list (case-insensitive).
- Prioritize codes that appeared on multiple sources (more likely to work).
- Deprioritize obviously expired codes (those next to "expired" labels).
- Cap the list at 20 codes to keep testing time reasonable.
- Close the hidden window with
close_window. - Report: "Found N unique promo codes. Testing them now..."
Phase 3 — Code Testing Loop
⚠️ CRITICAL SAFETY RULES — must be followed throughout this phase:
- ✅ ONLY interact with the promo/discount code input field and its Apply/Redeem button
- ❌ NEVER click any button labeled: Pay, Place Order, Complete Purchase, Confirm Order, Buy Now, Checkout, Submit Payment, or any equivalent
- ❌ NEVER fill in payment details (card number, CVV, billing address)
- ❌ NEVER click any button that would advance past the current checkout step
- If at any point the page changes unexpectedly (navigates away from checkout), stop immediately and alert the user
Testing each code
For each code in the list:
- Re-take
take_snapshotto ensure the promo field element ID is still valid (page may have refreshed). clearthe promo code input field.fillthe promo code input with the current code.- Click the Apply / Redeem button (not any payment button).
- Wait for page feedback — use
take_snapshotorget_page_contentto check for:- ✅ Success signals: "Code applied!", "Discount added", price reduction visible, green checkmark, "You saved X"
- ❌ Failure signals: "Invalid code", "Code not found", "This code has expired", "Code does not apply", red error text
- Report progress in chat after each attempt: "Testing
SAVE20... ❌ Invalid. TestingWELCOME15... ✅ Code applied! You saved $12.00"
Stop testing as soon as a code succeeds.
If the apply action causes a page reload or navigation, re-verify you are still on the checkout page before continuing.
Handle "apply" button edge cases
- Some sites apply the code automatically on input (no button needed) — watch for real-time feedback after
fill. - Some sites require pressing
Enter— usepress_keywith"Enter"if no apply button is found. - If the field clears itself after each failed attempt, simply re-fill and retry.
Phase 4 — Report Results
If a working code was found:
✅ Discount code found:
WELCOME15This code has been applied to your cart. You saved $12.00 (15% off). Your new total is visible on the page. You're ready to complete your purchase when you're ready.
Show a summary table of all codes tested:
| Code | Source | Result |
|-------------|-----------------|------------|
| SAVE20 | RetailMeNot | ❌ Expired |
| SUMMER10 | Coupons.com | ❌ Invalid |
| WELCOME15 | Honey / Reddit | ✅ Applied! |
If NO working code was found:
❌ No working codes found after testing N codes. The following codes were tried:
CODE1,CODE2, ... Unfortunately none applied a discount. You may want to check the store's official newsletter or social media for current promotions.
Error Handling
- Promo field disappears mid-loop: Re-take snapshot, search for it again. It may be inside a collapsible section — try clicking "Have a promo code?" toggles.
- Rate limiting / CAPTCHA on coupon sites: Skip that source, continue with others.
- Page navigates away accidentally: Stop immediately, alert user: "The page navigated away unexpectedly. Please go back to your checkout page and run the skill again."
- Store name not identifiable: Ask the user: "What store are you checking out on? I'll search for codes specific to them."
- Code field is greyed out or disabled: Inform the user: "The promo code field appears to be disabled on this page. It may require a minimum cart value or the field may only be available at a different checkout step."
Notes
- This skill only tests codes — it does not complete any purchase.
- All coupon site browsing happens in a hidden window, so the user's checkout tab is never disturbed.
- The skill works best on standard e-commerce checkout pages. It may not work on heavily dynamic single-page checkouts that re-render the DOM on every interaction.
- If the store uses a multi-step checkout and the promo field is on a specific step, make sure the user is on that step before activating.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install discount-hunter - 安装完成后,直接呼叫该 Skill 的名称或使用
/discount-hunter触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
Discount Hunter 是什么?
Find discount/promo codes for the current checkout page from across the internet, then automatically test each code in the promo field until one works. Never... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 28 次。
如何安装 Discount Hunter?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install discount-hunter」即可一键安装,无需额外配置。
Discount Hunter 是免费的吗?
是的,Discount Hunter 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Discount Hunter 支持哪些平台?
Discount Hunter 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Discount Hunter?
由 Ally(@puppetjellyfish)开发并维护,当前版本 v1.0.0。