In the commons, communities whose growth depends on public good, individuals often rely on surprisingly simple strategies, or heuristics, to decide whether to contribute to the shared resource (at risk of exploitation by free-riders). Although this appears a limitation, we show here how four heuristics lead to sustainable growth when coupled to specific ecological constraints. The two simplest ones—contribute permanently or switch stochastically between contributing or not—are first shown to bring sustainability when the public good efficiently promotes growth. If efficiency declines and the commons is structured in small groups, the most effective strategy resides in contributing only when a majority of individuals are also contributors. In contrast, when group size becomes large, the most effective behaviour follows a minimal-effort rule: contribute only when it is strictly necessary. Both plastic strategies are observed in natural scenarios across scales that present them as relevant social motifs for the sustainable management of public goods.