I've not used ghee in baking but I use it to cook things all the time. Use it instead of oil when frying things - it's much better for you and has a higher smoking temperature.

I wouldn't imagine you can substitute it for butter in baking, as the milk solids have been cooked out, but you could give it a go and see what happens.