I suggest you download my bard mod and extract it with the pak extractor and see what I've done for scripting skills.

https://www.nexusmods.com/divinityoriginalsin2/mods/3/?

https://docs.larian.game/Pak_Extractor_Guide

Unfortunately what you want to do is rather difficult. I doubt damage can take an IF check in itself in the skill editor, and even using real scripts doesn't make that easy. Moreover, I'm not sure if it's possible to check that a character is unarmed, which is something many people have requested.

You can also see some stuff about skill creation here: https://docs.larian.game/Skill_creation