a, CD8β+ effector T cells from the skin of S. epidermidis associated mice were co-cultured with wild-type (WT) or B2m−/− splenic dendritic cells (SpDC) untreated (Ctrl) or pre-incubated with heat-killed S. epidermidis, S. xylosus or S. aureus; LPS, Pam3Cys (P3C) or IL-1α. Flow plots illustrate the frequencies of IFN-γ+ CD8β+ and IL-17A+ CD8β+ T cells in overnight co-cultures. PMA, naive SpDC + PMA/ionomycin. b, Frequencies of IFN-γ+ CD8β+ and IL-17A+ CD8β+ T cells in overnight co-cultures as described in a (mean ± standard deviation of triplicate cultures). Data are representative of 2–3 independent experiments. ***P < 0.001, ****P < 0.0001 as calculated by Student’s t-test. c, Unassociated or S. epidermidis-topically associated mice were infected with C. albicans and treated with anti-CD8, anti-IL-17A or corresponding isotype control antibodies. d, Enumeration of C. albicans colony-forming units from dorsal skin biopsies from mice in c 2 days post C. albicans infection. e, S100a8 and S100a9 gene expression (fold increase over naive unassociated) by interfollicular keratinocytes purified from the ears of mice 2 weeks after S. epidermidis application. f, S100a8 and S100a9 gene expression (fold increase over naive unassociated and uninfected) in dorsal skin biopsies from mice in c 2 days post C. albicans infection. Results in d–f are representative of two independent experiments. *P < 0.05, **P < 0.01, ***P < 0.001 as calculated by Student’s t-test. g, Model of the response of the skin immune system to colonization with a new commensal. Skin-resident CD103+ dendritic cells (DC) may acquire commensals or commensal-derived antigens by reaching into skin appendages or via capture of soluble factors. CD8+ T cells primed by CD103+ dendritic cells in the lymph node, migrate to the skin and are locally tuned by IL-1 produced by CD11b+ dendritic cells. Commensal-specific CD8+ T cells can enhance antimicrobial defence of keratinocytes in an IL-17 dependent manner. Dotted lines indicate points that are not addressed in this work.