Simple Tag Macro Help

I am looking at creating a macro that can use simple instant cast abilities, ie Shaman’s Frost Shock, to be able to tag mobs without over stacking. Short explanation, my macro language is terrible and I am learning a lot everyday but a basic start I used was something like

/cast [@target, harm, exists] Frost Shock”

Now I know it isn’t correct but it highlights what I want to do. I want a macro that will cycle to a new target, and cast frost shock, but I am trying to figure a way to set it up where a determining factor for casting frost shock would be whether or not the debuff is currently active on the mob. Aka I don’t want to cast frost shock twice on one mob, while not hitting another mob at all.

When used the way it is worded above it does cycle from mob to mob but of course will only use frost shock when it is off cooldown. I can press the macro faster than the second global CD for abilities meaning if there are two mobs in front of me and I press the macro it will target mob A and use frost shock, I hit the macro immediately again and the macro will cycle to mob B but frost shock isn’t off cd yet so as I hit the macro a third time it will cycle BACK to mob A and by then frost shock is off CD so it uses it essentially hitting mob A twice and mob B never.

The debuff for frost shock is about 6 seconds, if I can write the macro to recognize the debuff and NOT cast frost shock on a mob with it I can essentially tag mobs without much worry of doubling up. That is unless we are talking about a group of 6+ mobs then the macro wouldn’t work so well unless I guess the deciding factor for casting frost shock wasn’t the active debuff but whether or not the mob is at full HP. Then anything under 100%, or whatever the value you assign, wouldn’t get shocked but rather skipped over (assuming I am the one who brought them down from 100% lol)

Any help would be appreciated! World questing and just lore quests in general are becoming more and more difficult to get through on such highly populated servers, tagging seems to be the new challenge…