The skin provides both a physical barrier and an immunologic barrier to external threats. The protective machinery of the skin has evolved to provide situation-specific responses to eliminate pathogens and to provide protection against physical dangers. Dysregulation of this machinery can give rise to the initiation and propagation of inflammatory loops in the epithelial microenvironment that result in inflammatory skin diseases in susceptible people. A defective barrier and microbial dysbiosis drive an interleukin 4 (IL-4) loop that underlies atopic dermatitis, while in psoriasis, disordered keratinocyte signaling and predisposition to type 17 responses drive a pathogenic IL-17 loop. Here we discuss the pathogenesis of atopic dermatitis and psoriasis in terms of the epithelial immune microenvironment-the microbiota, keratinocytes and sensory nerves-and the resulting inflammatory loops.