Finally I decide to give this a go, and it turns out, page element detection or OCR is not needed at all. All one needs is blindly clicking that "skip ads" button no matter if it is there. It is even faster because the button could be even clicked when it is not visible...
All of the search results on this forum about Youtube ad skipping are someone offering their creation and the replies suggesting use an extension or ad-block. But what if I want to actually build it and need a bit of help? I'm trying to learn how how these things operate so I can make better macros down the way. I appreciate suggestions but I thought discussion and alternatives would be elsewhere, I've used ad blockers and can't install extensions on work macs but I'm here to actually build it anyway. This happens so often on this forum.
I'm not currently skipping using a macro to skip Youtube ads, (I'm resigned to pressing the Skip button) but I've done it before, and it should be extremely easy to write a very short macro to skip ads. Something like the following: (Note: you will have to modify the screen coordinates to fit the area of the Youtube frame on your screen which contains the word "Skip" when an ad is skippable.)
For efficiency, put this macro in a KM group that is active ONLY when Safari (or your browser of choice) is the active app, and if you want to improve on this idea, you can also add an IF statement that will validate that the URL contains "youtube" before performing the OCR action.
Another way to improve this macro is to have the macro detect for itself where the word "Skip" appears on the screen, instead of hardcoding the coordinates. There are several ways to do this and I'll leave it to you to ponder for now.