DEV Community

Cover image for My deal bot showed me 148 picks in two weeks. It was 61 products: ClothingLab
Christian Anderson
Christian Anderson

Posted on Edited on

My deal bot showed me 148 picks in two weeks. It was 61 products: ClothingLab

I built myself a deal bot for clothes. Every morning it posted sale picks to Discord: things from shops I actually buy from, in my size, in stock. It worked. Then I counted what it had posted.

148 picks in 14 days. 61 different products. One brown zip hoodie turned up 23 times over four weeks. A pair of trainers ran 13 days straight. The bot wasn't finding deals any more, it was nagging me.

That's the first of three failures that ended up as ClothingLab, a free tool that does the boring part properly: sale stuff that's in stock in your size, from shops you pick, without showing you the same thing twice.

A ClothingLab digest for a made-up person: picks with the size that's in stock, budget tier and why it was picked, then one look per tier

Failure 1: it kept showing me the same hoodie

The daily post had sections: top picks, "on trend", looks, new in your size. Each one picked from the same pool. Top picks only remembered the last three days, and when everything had been seen it fell back to showing the whole list again. The "on trend" section didn't check what I'd seen at all.

The fix is one ledger that every section shares. Anything you've been shown stays out for 14 days. It only comes back if it's worth telling you again: it's at least 5% cheaper than when you saw it, or it went out of your size and came back. Colourways count as the same product, so "Hoodie - Black" and "Hoodie - Navy" don't take turns. And nothing appears twice in one post.

Failure 2: EU shoe sizes were silently thrown away

Shoe deals from European shops just never showed up. No error. The shops list sizes as bare numbers, 45 or 45.5, and sometimes glue the colour on: 46 2/3 / Cream White / Blue. My size check only understood "EU 46" with the letters in front, so a bare 45.5 got read as a UK size, which obviously didn't match, and the item was dropped as "wrong size". It was the biggest drop reason in every run.

The trick that fixed it: you can prove a shop is listing EU sizes from the numbers alone, because no adult UK or US shoe size is 39 or more. You can't tell UK from US that way, so those stay a per-shop setting. ClothingLab works your EU sizes out from your UK size and stamps them on the result, so you see "EU 44" and know what to order.

Failure 3: the stock was there, I was reading the wrong bit

Some shops showed "no size information" for every trainer. I'd assumed they were hiding it. They weren't. The page's visible size picker had no stock markers, but the exact per-size stock was sitting in data embedded in the page. One shop went from 0 usable trainer deals to 9 the day I read the data instead of the buttons.

The flip side was harder to accept. Some big high-street shops don't put per-size stock in the page at all; it loads later with JavaScript. For those my bot found zero items in my size. ClothingLab's rule is that an item with no per-size stock is never shown as "in your size". Fewer results, but none of them lie.

What ClothingLab is

The engine from my bot, rebuilt so it isn't hard-wired to me:

  • A short interview writes your profile: sizes (tops, waist and leg, UK shoe), fits you like and never wear, colours, brands, budget. It never asks for height or weight.
  • Two generic shop readers: any Shopify shop (its public products.json has every variant's size and an available flag) and any shop with a sitemap and proper product data on its pages. robots.txt is checked, there's a delay between requests, and you have to set a user agent that says who you are before it'll run.
  • Budget tiers 💸 Low / 👌 Mid / 💎 High, as plain £ lines per garment you can move, and one look per tier from a top, bottom and shoes in your size, using things you already own if you list them. If a tier has no full look today, it says so.
  • A watchlist for price drops, a daily digest (file, email or Discord), and an MCP server, so you can onboard and ask "any navy hoodies under £50?" from Claude, Cursor or any MCP client.

refresh, looks and search in a terminal

Both images are real output, from the made-up shop the tests use and a made-up person called Sam. My own sizes aren't in the repo.

What's not in it

My bot also reads a list of UK shops with their quirks worked out: the hidden stock data, the odd size formats, which ones block bots. That list stays mine. The free version ships with four example Shopify shops and makes adding your own a three-line job. It also doesn't read your email; if you want looks to use what you own, list it.

pipx install git+https://github.com/casareanderson/clothinglab
clothinglab init && clothinglab onboard
clothinglab refresh && clothinglab digest
Enter fullscreen mode Exit fullscreen mode

It's free and AGPL: github.com/casareanderson/clothinglab. The setup guide gets run on a fresh machine by GitHub every week, so if it says a step works, it does.

What size are you, and how many "deals" do you scroll past before you find one that's actually in it?


🤖 Drafted with AI assistance from my own homelab notes, logs and repos, then reviewed and edited before publishing.

Top comments (0)

⌂ 换网址