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_snapshot of 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_content to 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=+promo+code+ |
| 2 | https://www.google.com/search?q=+coupon+code+working+ |
| 3 | https://www.retailmenot.com/view/ |
| 4 | https://www.honey.com/coupons/ (or search https://www.joinhoney.com/shop/) |
| 5 | https://www.coupert.com/coupons/ |
| 6 | https://www.coupons.com/coupon-codes// |
| 7 | https://dealspotr.com/#_=&query= |
| 8 | https://slickdeals.net/coupons// |
| 9 | Reddit: https://www.google.com/search?q=site:reddit.com++promo+code |
| 10 | https://www.wikibuy.com/stores/ |
Replace with the merchant name (URL-encoded), with the root domain (e.g. nike.com), and with the current year.
Extraction per tab
For each tab, after the page loads:
- Use
get_page_content to extract text. - Use
evaluate_script or 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"
- Collect all found codes into a running list.
- Close the tab with
close_page when 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_snapshot to ensure the promo field element ID is still valid (page may have refreshed). clear the promo code input field.fill the promo code input with the current code.- Click the Apply / Redeem button (not any payment button).
- Wait for page feedback — use
take_snapshot or get_page_content to 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. Testing WELCOME15... ✅ 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 — use press_key with "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: WELCOME15
> This 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.