  In light of upcoming observations modelling perturbations in dark energy and
modified gravity models has become an important topic of research. We develop
an effective action to construct the components of the perturbed dark energy
momentum tensor which appears in the perturbed generalized gravitational field
equations, {\delta}G_{\mu\nu} = 8{\pi}G{\delta}T_{\mu\nu} + {\delta}U_{\mu\nu}
for linearized perturbations. Our method does not require knowledge of the
Lagrangian density of the dark sector to be provided, only its field content.
The method is based on the fact that it is only necessary to specify the
perturbed Lagrangian to quadratic order and couples this with the assumption of
global statistical isotropy of spatial sections to show that the model can be
specified completely in terms of a finite number of background dependent
functions. We present our formalism in a coordinate independent fashion and
provide explicit formulae for the perturbed conservation equation and the
components of {\delta}U_{\mu\nu} for two explicit generic examples: (i) the
dark sector does not contain extra fields, L = L(g_{\mu\nu}) and (ii) the dark
sector contains a scalar field and its first derivative L = L(g_{\mu\nu},
{\phi}, \nabla_{\mu}{\phi}). We discuss how the formalism can be applied to
modified gravity models containing derivatives of the metric, curvature
tensors, higher derivatives of the scalar fields and vector fields.
