It works in the following way:
1. Copy + install the Google Apps script in your Gmail. The script runs every 10 minutes by default.
2. The script will automatically use a series of Regexes as a first line of defense (modify as you like!). If that fails it will use an LLM of your choice to make the call (this is optional but highly effective).
3. Flagged emails skip the inbox and get tagged with a "Cold email" label. Nothing gets deleted.
From running this for the past couple of weeks, it catches 99% of all cold emails and helps me stay in flow state. Hope this helps other people too!