Sky Flats have the advantage of exactly replicating the illumination pattern and spectrum of actual imaging conditions, simply because actual sky images are used.
Sky Flats are especially important for back-illuminated thinned CCD sensors, which can suffer from an effect known as fringing. Fringing is an interference pattern in reflections between the front and back surfaces of the sensor; the pattern seen is due to very tiny variations in the thickness of the sensor. The pattern is only noticeable in monochromatic light; unfortunately emission lines are present in the sky background from both natural and artificial sources. Since the sky background is dominant in deep exposures, fringing can be a significant problem. Due to variations in manufacturing, fringes may be more objectionable in some sensors than others.
Sky flats work well because they exactly represent the sky illumination, including the emission lines. This technique is essentially the same as for twilight flats, where the twilight sky is used as the light source, except that it is done with the sky background itself.
The first step is to set up the camera and focus. You should avoid repositioning the camera once the flat-field frames are taken.
Next take a large number (>30) of images of the night sky in a sparse part of the sky, using a different field for each exposure. Often the clock drive is turned off to allow the stars to trail; this reduces the peak level of the stars and ensures that different fields are used for each exposure. Ideally for flat-fields the overall illumination should be at 30% of the full well capacity, but this may require too long an exposure for night sky flats.
You should also take a similar number of bias and dark frames. Enter all of these calibration frames using the Set Calibration command. Make sure that Median, SD Mask, or Sigma Clipping is used for the flat-fields. You are now ready to calibrate light images using the sky flats. If you generate a Master Frame for the flat, you will be able to check it to ensure that no stars leaked through.
In some cases, such as survey imaging, you can use actual light-frame exposures to generate your sky flats. This was done, for example, for the Desktop Universe all-sky CCD mosaic, which is now included in Starry Night Pro Plus. In this case, several thousand mosaic frames were combined to produce an extremely clean master flat.