AI Blocks › Run your online store
Old discount code cleaner
Get expired, unused and duplicate discount codes found, then switched off or deleted if you say so. Deletes cannot be undone.
Old discount code cleaner is a free AI skill for the job "Run your online store". Give the instructions to an AI assistant that supports the required files and tools, then review its output.
Free · No account · MIT licence · Made by 40rty AI
Made by 40rty AI. See the original on GitHub; we copied it as it is, with its licence.
What it does
A tidy list of discount codes in your Shopify store that are expired, never used or near-duplicates, with the option to switch them off or remove them. Old codes pile up after campaigns and make the admin hard to read. The skill connects to your store through the Shopify command line and reads all discounts. It flags codes past their end date, codes with zero redemptions, and families of codes with repeating prefixes. You choose what to flag and what to act on. By default it only reports, and it changes things only after you confirm. Deleting is permanent and cannot be undone, so deactivating is the safer first step. It needs a signed-in Shopify session with discount access.
You give it
- Your store domain
- Access to Shopify with read and write discount permission
- What to flag: expired, unused or duplicates
- Whether to only report, deactivate or delete
You get
- A report of expired, unused and duplicate codes
- Codes deactivated, if you approve
- Codes deleted, if you approve
- A summary of what changed
Use it when
- Your discount list has hundreds of codes from past sales and you cannot tell what is live.
- You want to remove codes that never got used.
- A campaign ended and you want its codes switched off.
- Customers keep finding old codes that should not work.
How to use it
- Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
- Ask for the job in your own words. Your AI opens the skill when it fits.
- It works best when your AI can access your Shopify admin and change live store data.