Intestinal commensal bacteria induce protective and regulatory responses that maintain host-microbial mutualism. However, the contribution of tissue-resident commensals to immunity and inflammation at other barrier sites has not been addressed. We found that in mice, the skin microbiota have an autonomous role in controlling the local inflammatory milieu and tuning resident T lymphocyte function. Protective immunity to a cutaneous pathogen was found to be critically dependent on the skin microbiota but not the gut microbiota. Furthermore, skin commensals tuned the function of local T cells in a manner dependent on signaling downstream of the interleukin-1 receptor. These findings underscore the importance of the microbiota as a distinctive feature of tissue compartmentalization, and provide insight into mechanisms of immune system regulation by resident commensal niches in health and disease.