<<xAct`xTensor`

<<xAct`xPert`

DefManifold[M,4,{a,b,c,d,e,f}]

DefMetric[-1,g[-a,-b],CD,{";","D"},WeightedWithBasis->AIndex]

DefMetricPerturbation[g,h,ϵ]

DefTensor[scalar[],M, PrintAs->"ϕ"]

DefTensorPerturbation[0,scalar[],M]

Perturbed[CD[-a][PD[-b][scalar[]]],1] //ExpandPerturbation

Perturbed[Sqrt[-Detg[]],1] //ExpandPerturbation