You can lead the hose outside through any opening. This should not be a problem even with skylights. It is better to use a window kit with which the window opening can be sealed. This prevents warm air from outside from flowing right back in. There are also ones that are suitable for roof windows, e.g. 
https://www.galaxus.ch/de/s2/product/kibernetik-fensterabdichtung-klimaanlage-zubehoer-4672275. However, I do not know this product and therefore cannot judge how good it is.