/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.
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install discount-hunter - After installation, invoke the skill by name or use
/discount-hunter - Provide required inputs per the skill's parameter spec and get structured output
What is 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... It is an AI Agent Skill for Claude Code / OpenClaw, with 28 downloads so far.
How do I install Discount Hunter?
Run "/install discount-hunter" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Discount Hunter free?
Yes, Discount Hunter is completely free, licensed under MIT-0. You can download, install and use it at no cost.
Which platforms does Discount Hunter support?
Discount Hunter is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Discount Hunter?
It is built and maintained by Ally (@puppetjellyfish); the current version is v1.0.0.