14From biofilms to whale pods, organisms have repeatedly converged on sociality as a strategy to improve individual fitness. Yet, it remains challenging to identify the most important drivers-and by extension, the evolutionary mechanisms-of sociality for particular species. Here, we present a conceptual framework, literature review, and model demonstrating that the direction and magnitude of the response of group size to sudden resource shifts provides a strong indication of the underlying drivers of sociality. We catalog six functionally distinct mechanisms related to the acquisition of resources, and we model these mechanisms' effects on the survival of individuals foraging in groups. We find that whether, and to what degree, optimal group size increases, decreases, or remains constant when resource abundance declines depends strongly on the dominant mechanism. Existing empirical data support our model predictions, and we demonstrate how our framework can be used to predict the dominant social benefit for particular species. Together, our framework and results show that a single easily measurable characteristic, namely, group size under different resource abundances, can illuminate the potential drivers of sociality across the tree of life. 15