  We prove a general criterion for the density in energy of suitable
subalgebras of Lipschitz functions in the metric-Sobolev space
$H^{1,p}(X,\mathsf{d},\mathfrak{m})$ associated with a positive and finite
Borel measure $\mathfrak{m}$ in a separable and complete metric space
$(X,\mathsf{d})$. We then provide a relevant application to the case of the
algebra of cylinder functions in the Wasserstein Sobolev space
$H^{1,2}(\mathcal{P}_2(\mathbb{M}),W_{2},\mathfrak{m})$ arising from a positive
and finite Borel measure $\mathfrak{m}$ on the
Kantorovich-Rubinstein-Wasserstein space $(\mathcal{P}_2(\mathbb{M}),W_{2})$ of
probability measures in a finite dimensional Euclidean space, a complete
Riemannian manifold, or a separable Hilbert space $\mathbb{M}$. We will show
that such a Sobolev space is always Hilbertian, independently of the choice of
the reference measure $\mathfrak{m}$ so that the resulting Cheeger energy is a
Dirichlet form. We will eventually provide an explicit characterization for the
corresponding notion of $\mathfrak{m}$-Wasserstein gradient, showing useful
calculus rules and its consistency with the tangent bundle and the
$\Gamma$-calculus inherited from the Dirichlet form.
