A shortcut to adiabaticity is a recipe for generating adiabatic evolution at an arbitrary pace. Shortcuts have been developed for quantum, classical and (most recently) stochastic dynamics. A shortcut might involve a counterdiabatic (CD) Hamiltonian that causes a system to follow the adiabatic evolution at all times, or it might utilize a fast-forward (FF) potential, which returns the system to the adiabatic path at the end of the process. We develop a general framework for constructing shortcuts to adiabaticity from flow fields that describe the desired adiabatic evolution. Our approach encompasses quantum, classical and stochastic dynamics, and provides surprisingly compact expressions for both CD Hamiltonians and FF potentials. We illustrate our method with numerical simulations of a model system, and we compare our shortcuts with previously obtained results. We also consider the semiclassical connections between our quantum and classical shortcuts. Our method, like the FF approach developed by previous authors, is susceptible to singularities when applied to excited states of quantum systems; we propose a simple, intuitive criterion for determining whether these singularities will arise, for a given excited state.