It should not even use useabilityonplayer - the current default UI already has instances of code that don't work for international users (non-ASCII characters in player names), it does not do to introduce more, so this should be fully hardcoded if you even want to go there.
But then there is still the question of which spells to use, and will you do click-to-cure with potions also (in which case you would need to hardcode it also because /use_itemvdl is also buggy if you have items in your non-shared bank)? As much as I agree that it is an essential feature for many players, but if you start adding it to the defaultUI you can't have all the problems that are accepted in custom UIs because that's the best we can do. DefaultUI needs to be better IMHO. Of course fixing all the bugs would be best.