In this work, the linear and gauge-invariant theory of cosmological perturbations in a class of anisotropic and shear-free spacetimes is developed. After constructing an explicit set of complete eigenfunctions in terms of which perturbations can be expanded, we identify the effective degrees of freedom during a generic slow-roll inflationary phase. These correspond to the anisotropic equivalent of the standard Mukhanov-Sasaki variables. The associated equations of motion present a remarkable resemblance to those found in perturbed Friedmann-Robertson-Walker spacetimes with curvature, apart from the spectrum of the Laplacian, which exhibits the characteristic frequencies of the underlying geometry. In particular, it is found that the perturbations cannot develop arbitrarily large super-Hubble modes.