  We present a method for parametrizing linear cosmological perturbations of
theories of gravity, around homogeneous and isotropic backgrounds. The method
is sufficiently general and systematic that it can be applied to theories with
any degrees of freedom (DoFs) and arbitrary gauge symmetries. In this paper, we
focus on scalar-tensor and vector-tensor theories, invariant under linear
coordinate transformations. In the case of scalar-tensor theories, we use our
framework to recover the simple parametrizations of linearized Horndeski and
"Beyond Horndeski" theories, and also find higher-derivative corrections. In
the case of vector-tensor theories, we first construct the most general
quadratic action for perturbations that leads to second-order equations of
motion, which propagates two scalar DoFs. Then we specialize to the case in
which the vector field is time-like (\`a la Einstein-Aether gravity), where the
theory only propagates one scalar DoF. As a result, we identify the complete
forms of the quadratic actions for perturbations, and the number of free
parameters that need to be defined, to cosmologically characterize these two
broad classes of theories.
