This is the proper way skylights should be installed.
Sealing In The Skylights.
This is GAF Ice and Water barrier. It help prevent leaks caused by wind-driven rain and ice dams.