Let $k$ be an algebraically closed field and $\mathcal M_g$ denote the moduli space (stack) of smooth curves of genus $g$ over $k$. Using the universal curve $\pi \colon \mathcal C_g \to \mathcal M_g$, there is a natural vector bundle $\pi_* \Omega_{\mathcal C_g / \mathcal M_g}$ of rank $g$ called the Hodge bundle. The fiber over a point $X \in \mathcal M_g$ is $H^0(X,\Omega_X)$. Let $\Omega \mathcal M_g$ denote the total space of this bundle. I would like to understand the tangent space of $\Omega \mathcal M_g$ at a point $(X, \omega)$, where $X$ is a smooth curve and $\omega$ is a global section of $\Omega_X$ (for simplicity let us assume that $g>1$).

By definition a tangent vector at $(X, \omega)$ is a morphism from the dual numbers (i.e. $\varepsilon^2=0$) $\operatorname{Spec}k[\varepsilon] \to \Omega \mathcal M_g$ with image $(X,\omega)$. Since $\Omega \mathcal M_g$ is a vector bundle of rank $g$ this map is the same thing as two maps $a \colon \operatorname{Spec}k[\varepsilon] \to \mathcal M_g$ and $b \colon \operatorname{Spec}k[\varepsilon] \to \mathbb A^g_k$ with image $X$ and $\omega$ respectively. By the universal property of $\mathcal M_g$ the map $a$ corresponds to a first order deformation of $X$ and the map $b$ to a tangent vector of $\mathbb A^g_k$ at $\omega$, i.e. just a different point of $\mathbb A^g_k$ or another differential on $X$. I would like to arrive at the following description (that I will sketch below) of the tangent space that is used for example in *Hubbard, John; Masur, Howard*, **Quadratic differentials and foliations**, Acta Math. 142, 221-274 (1979). ZBL0415.30038. before proposition 4.5 (for quadratic differentials) or in *Möller, Martin*, **Linear manifolds in the moduli space of one-forms**, Duke Math. J. 144, No. 3, 447-487 (2008). ZBL1148.32007. in the proof of theorem 2.1.

According to the papers above, the tangent space at $(X, \omega)$ can be identified with the set of Cartesian diagrams $$ \newcommand{\ra}[1]{\kern-1.5ex\xrightarrow{\ \ #1\ \ }\phantom{}\kern-1.5ex} \newcommand{\ras}[1]{\kern-1.5ex\xrightarrow{\ \ \smash{#1}\ \ }\phantom{}\kern-1.5ex} \newcommand{\da}[1]{\bigg\downarrow\raise.5ex\rlap{\scriptstyle#1}} \begin{array}{c} (X,\omega) & \ra{f} & (\mathcal X, \tilde{\omega})\\ \da{} & & \da{} \\ \operatorname{Spec}k & \ras{} & \operatorname{Spec}k[\varepsilon] \\ \end{array} $$ where $\tilde\omega$ is a global section of $\Omega_{\mathcal X}$ such that the pullback of $(\mathcal X, \tilde \omega)$ is $(X, \omega)$.

I can see that this gives a vector space of dimension $4g-3$ and is therefore isomorphic to the tangent space at $(X,\omega)$ by an isomorphism that does not change the deformation of the curve $X$, i.e. the map $a$. Moreover given one deformation $(\mathcal X, \tilde \omega)$ of $(X, \omega)$ all other deformations of $(X, \omega)$ only differ by an element of $H^0(X, \Omega_X)$. But I can not make this last map canonical. I can not figure out what the deformations of $(X, \omega)$ are, that do not change the differential $\omega$.