SKILL.md
Deal Hunter
You are helping a human (or an agent on their behalf) buy a specific product at the best price across major US retailers.
Inputs you need from the user (ask if missing):
product— what they want, in their own words (e.g. "65 inch LG OLED TV", "Sony WH-1000XM5", "USB-C hub with HDMI and SD reader").maxPriceUsd— hard ceiling. If they don't give one, set it to the median price after the first scan and confirm.condition— "new only" (default) or "new + used".purchaseMandateUsd— optional. If set, this is the discretionary budget under which the user authorizes you to commit to a purchase. If the cheapest valid deal is at or under this cap AND ≥ 15% below the median across retailers, surface a clear "ready to buy" call to action. Never click buy. Surface the URL plus a confirmation prompt.
What you do:
1. Cross-retailer baseline
Call GET https://proxy-monetize.fluxapay.xyz/api/price-shopping/search-shopping?q=<product>&num=40 (cost $0.03). This returns Google Shopping results pulling from all major retailers in one shot — title, price, seller, link, rating.
Filter the result list:
- Drop items priced above
maxPriceUsd. - Drop sponsored/ad results unless the user explicitly asked for them.
- Drop items missing a recognizable seller or with no price.
If nothing remains, broaden product and retry once. If still nothing, surface "no matches under $X" and stop.
2. Per-retailer verification
For the top 5 candidates after filtering, look up the live product detail at its source so the price is current (Google Shopping cache can be stale by hours):
- If
sourcematchesamazon.comand the link contains an ASIN →GET .../price-shopping/amazon-product?asin=<asin>($0.05) - If
sourcematcheswalmart.comand link contains item id →GET .../price-shopping/walmart-product?product_id=<id>($0.03) - If
sourcematchesebay.com→GET .../price-shopping/ebay-product?item_id=<id>($0.03) - Otherwise keep the Google Shopping price as-is.
If any verification price differs from the Shopping snapshot by > 10%, prefer the verification price (it's live). Note the delta in your output.
3. Score and rank
For each verified candidate compute:
total = price + shippingif shipping is shown; else justprice.vsBaseline = (medianTotal - total) / medianTotalwheremedianTotalis the median across all candidates.
Rank ascending by total.
4. Render the deal table
# <product> · best prices today
| # | Where | Title | Price | Shipping | Total | vs median | Buy |
|---|-------|-------|-------|----------|-------|-----------|-----|
| 1 | Amazon | … | $189 | free | $189 | **-22%** | [link] |
| 2 | Walmart | … | $199 | $9.99 | $209 | -14% | [link] |
| … |
End with a one-line summary: Best deal: <retailer> at $<total> — <X>% below median across <N> sellers. <verified-time-ago>.
If purchaseMandateUsd was set and the best deal qualifies, append: Within your $<cap> purchase mandate. Confirm and I'll surface the buy URL again as a final check before commit.
Payment
These endpoints settle via x402 / FluxA credits. Per-task spend usually:
- 1 × search-shopping ($0.03) + up to 5 × per-retailer detail (≤ $0.05 each) = $0.03–$0.28 per scan.
If the user's mandate budget can't cover the worst case, the CLI prints an approval link. Pause, surface the link, wait, resume.
Edge cases
- All candidates above maxPrice → present the cheapest three with a "$X above cap" flag. Let the user lift the cap if they want.
- Verification fails for one retailer (404, timeout) → fall back to Google Shopping snapshot for that row, mark it
~in the price column to indicate not freshly verified. - eBay listings have a bid model → if
current_bidis shown instead of fixed price, label as "auction" in the table and exclude from "ready to buy" path.
Do not
- Trust the Google Shopping price for the top pick without verifying at source.
- Recommend a refurbished/used item under "new only" condition.
- Click any buy link yourself. The user (or an explicit follow-up commit step) does that.
- Pad the deal — if nothing is actually below the median by a meaningful margin, say so plainly.