The skin is a habitat for microbes that commonly infect preterm infants, but the use of sequencing for fine-scale study of the microbial communities of skin that develop in these infants has been limited by technical barriers. We treated skin swabs of preterm infants with a photoreactive dye that eliminates DNA from nonviable microbes and then sequenced the remaining DNA.