Maintain the air barrier by sealing all joints and junctions between the air barrier material in the wall or ceiling and the window, door, and skylight frames.
The most common approach is to seal the joint using low-expansion foam.
Warning: Do not use high-expansion foam to seal around windows, doors, and skylights. The pressure exerted by high-expansion foam is enough to warp the frames of the units, leading to inoperable windows, doors, and skylights.
Remember that backer rod can be used to fill in large gaps prior to sealing with expanding foam.