Well The way I would do it is to make the buildings that give you the skills (just like in custom line wars, I played it once) sell items, now, the way this works is:
Unit gets the item
Unit gets Skill based on the item
Item Destroys itself
It's quite a simple concept, when you think about it
Event: - Unit accuires item
Condition: - item is equivalent to (one of the items that the skill place sells)
Action:
1. add ability *(ability that corresponds to the item)* to {triggering unit}
2. remove {aquired item} from the game
i'm not exactly sure how to remove the item but other than that this will work, it just takes time to do, so be ready for lots of boring, identical triggers