AbstractMicrobial community diversity is pivotal for the functioning of our planet, but its drivers are still unclear, in particular the role of resource number and identity. To fill this gap, we studied the assembly of hundreds of soil-derived microbial communities on a wide range of well-defined resource environments, from single carbon sources to combinations of up to 16. We found a remarkable diversity in single resources but a linear one-by-one increase in the number of species with the number of additional resources. We show, both experimentally and theoretically, that both these observations could originate from generalist and specialist taxa interacting in a modular fashion within the community. Since generalists and specialists are ubiquitous in natural microbiomes, our results might apply to a variety of different ecological settings, providing a framework to predict how community diversity responds to changes in resource availability.One Sentence SummaryWhile many species coexist in single resources, community diversity only increases one-by-one as more resources are added.