Self-propelling organisms locomote via generation of patterns of self-deformation. Despite the diversity of body plans, internal actuation schemes and environments in limbless vertebrates and invertebrates, such organisms often use similar traveling waves of axial body bending for movement. Delineating how self-deformation parameters lead to locomotor performance (e.g. speed, energy, turning capabilities) remains challenging. We show that a geometric framework, replacing laborious calculation with a diagrammatic scheme, is well-suited to discovery and comparison of effective patterns of wave dynamics in diverse living systems. We focus on a regime of undulatory locomotion, that of highly damped environments, which is applicable not only to small organisms in viscous fluids, but also larger animals in frictional fluids (sand) and on frictional ground. We find that the traveling wave dynamics used by mm-scale nematode worms and cm-scale desert dwelling snakes and lizards can be described by time series of weights associated with two principal modes. The approximately circular closed path trajectories of mode weights in a self-deformation space enclose near-maximal surface integral (geometric phase) for organisms spanning two decades in body length. We hypothesize that such trajectories are targets of control (which we refer to as "serpenoid templates"). Further, the geometric approach reveals how seemingly complex behaviors such as turning in worms and sidewinding snakes can be described as modulations of templates. Thus, the use of differential geometry in the locomotion of living systems generates a common description of locomotion across taxa and provides hypotheses for neuromechanical control schemes at lower levels of organization.