AI Blocks › Run your online store
Discount spend tracker
Pick a time range. Get total discount dollars by week or month, split by discount type and code.
Discount spend tracker 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 · Level: beginner · Thinking: low
Made by 40rty AI. See the original on GitHub; we copied it as it is, with its licence.
What it does
A clear total of how much money your store gave away in discounts, by week, month or quarter, split by code and by type. You can see if discounting is growing before it hurts margin. Pick a bucket size and how many periods to look back (12 months by default). The skill pulls all paid orders in that window from your Shopify store and adds up the discount amounts in each bucket. The top codes get their own lines, and the rest are grouped as other. You choose whether to count shipping discounts. It is read-only and safe to run any time. It needs a signed-in Shopify CLI with permission to read orders.
You give it
- Your Shopify store domain
- Bucket size: week, month or quarter
- How many periods to look back
- How many top codes to list separately (optional)
- Whether to include shipping discounts (optional)
You get
- Total discount dollars per period
- A split by discount type
- The top codes named individually
- A trend you can compare across periods
Use it when
- Your finance team asks how much you spent on discounts last quarter.
- You suspect discounting went up during a sale season.
- You want to see which codes cost the most.
- You are setting a yearly promotion budget.
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.