[proofplan]
We start from the previously established identity $\delta\theta = -\operatorname{div}(X_\theta) = -\sum_k g(\nabla_{e_k} X_\theta, e_k)$ for the metric-dual vector field $X_\theta$, and show that the right-hand side equals $-\sum_k \langle \nabla_{e_k}\theta, e_k\rangle$ by passing the covariant derivative across the metric duality. The key computation differentiates the defining identity $g(X_\theta, e_i) = \langle \theta, e_i\rangle$ in the direction $e_j$. Metric compatibility of $\nabla$ converts $\nabla_{e_j}$ on the left into $g(\nabla_{e_j} X_\theta, e_i) + g(X_\theta, \nabla_{e_j} e_i)$, while the Leibniz rule for $\nabla$ on tensors converts the right-hand side into $\langle \nabla_{e_j}\theta, e_i\rangle + \langle\theta, \nabla_{e_j} e_i\rangle$. The terms involving $\nabla_{e_j} e_i$ cancel because $\theta$ and $g(X_\theta, \cdot)$ agree on $\nabla_{e_j} e_i$. Setting $j = i$ and summing yields the assertion.
[/proofplan]
[step:Reduce to the identity $\sum_k g(\nabla_{e_k} X_\theta, e_k) = \sum_k \langle \nabla_{e_k}\theta, e_k\rangle$]
Let $(M, g)$ be an oriented Riemannian manifold of dimension $n$, $\nabla$ the Levi-Civita connection, $\theta \in \Omega^1(M)$ a smooth $1$-form, $X_\theta \in \mathfrak{X}(M)$ the vector field metrically dual to $\theta$ (so $\theta(V) = g(X_\theta, V)$ for all $V \in TM$), and $\{e_k\}_{k=1}^n$ a local orthonormal frame field on an open set $U \subseteq M$ (so $g(e_k, e_\ell) = \delta_{k\ell}$ on $U$).
By the [Codifferential and Divergence](/theorems/2755) identity, $\delta\theta = -\operatorname{div}(X_\theta)$ pointwise on $M$. By the definition of divergence as the trace of the covariant derivative, $\operatorname{div}(X_\theta) = \operatorname{tr}(\nabla X_\theta)$, where $\nabla X_\theta : TM \to TM$ is the endomorphism defined by $V \mapsto \nabla_V X_\theta$. The trace of an endomorphism with respect to an orthonormal basis is the sum of its diagonal entries, so on $U$,
\begin{align*}
\operatorname{div}(X_\theta) = \operatorname{tr}(\nabla X_\theta) = \sum_{k=1}^n g(\nabla_{e_k} X_\theta, e_k).
\end{align*}
Hence on $U$,
\begin{align*}
\delta\theta = -\sum_{k=1}^n g(\nabla_{e_k} X_\theta, e_k).
\tag{V}
\end{align*}
The remaining task is to prove
\begin{align*}
\sum_{k=1}^n g(\nabla_{e_k} X_\theta, e_k) = \sum_{k=1}^n \langle \nabla_{e_k}\theta, e_k\rangle,
\tag{$\star$}
\end{align*}
where $\langle \nabla_{e_k}\theta, e_k\rangle := (\nabla_{e_k}\theta)(e_k)$ denotes the natural pairing of the $1$-form $\nabla_{e_k}\theta \in \Omega^1(M)$ with the vector field $e_k \in \mathfrak{X}(U)$.
[/step]
[step:Differentiate the duality identity $g(X_\theta, e_i) = \langle \theta, e_i\rangle$ via metric compatibility on the left]
Fix indices $i, j \in \{1, \ldots, n\}$ and consider the smooth function $g(X_\theta, e_i) = \langle \theta, e_i\rangle$ on $U$, equal by definition of metric duality. Differentiate both sides in the direction $e_j$.
For the left-hand side, the Levi-Civita connection $\nabla$ is metric-compatible: for any vector fields $Z, W \in \mathfrak{X}(U)$ and any $Y \in \mathfrak{X}(U)$,
\begin{align*}
Y\big(g(Z, W)\big) = g(\nabla_Y Z, W) + g(Z, \nabla_Y W).
\end{align*}
Apply with $Y := e_j$, $Z := X_\theta$, $W := e_i$:
\begin{align*}
e_j\big(g(X_\theta, e_i)\big) = g(\nabla_{e_j} X_\theta, e_i) + g(X_\theta, \nabla_{e_j} e_i).
\tag{M}
\end{align*}
For the right-hand side, the covariant derivative $\nabla$ extends to $\Omega^1(M)$ as a derivation that commutes with contractions. Applied to the contraction $\langle \theta, e_i\rangle = \theta(e_i)$ of the $1$-form $\theta$ with the vector field $e_i$, this yields the Leibniz identity
\begin{align*}
e_j\big(\theta(e_i)\big) = (\nabla_{e_j}\theta)(e_i) + \theta(\nabla_{e_j} e_i),
\end{align*}
which, in pairing notation, reads
\begin{align*}
e_j\langle \theta, e_i\rangle = \langle \nabla_{e_j}\theta, e_i\rangle + \langle \theta, \nabla_{e_j} e_i\rangle.
\tag{T}
\end{align*}
Since the left-hand sides of (M) and (T) coincide,
\begin{align*}
g(\nabla_{e_j} X_\theta, e_i) + g(X_\theta, \nabla_{e_j} e_i) = \langle \nabla_{e_j}\theta, e_i\rangle + \langle\theta, \nabla_{e_j} e_i\rangle.
\end{align*}
[/step]
[step:Cancel the $\nabla_{e_j} e_i$ terms via metric duality]
By the definition of $X_\theta$ as the metric dual of $\theta$, applied with $V := \nabla_{e_j} e_i \in \mathfrak{X}(U)$,
\begin{align*}
g(X_\theta, \nabla_{e_j} e_i) = \langle \theta, \nabla_{e_j} e_i\rangle.
\end{align*}
Substituting into the previous equation,
\begin{align*}
g(\nabla_{e_j} X_\theta, e_i) + \langle \theta, \nabla_{e_j} e_i\rangle = \langle \nabla_{e_j}\theta, e_i\rangle + \langle\theta, \nabla_{e_j} e_i\rangle.
\end{align*}
Cancelling $\langle\theta, \nabla_{e_j} e_i\rangle$ from both sides leaves the pointwise identity
\begin{align*}
g(\nabla_{e_j} X_\theta, e_i) = \langle \nabla_{e_j}\theta, e_i\rangle.
\tag{P}
\end{align*}
This holds for all $i, j \in \{1, \ldots, n\}$ and all points of $U$.
[/step]
[step:Sum over the diagonal $i = j = k$ to recover the codifferential]
Set $i = j = k$ in (P) and sum over $k = 1, \ldots, n$:
\begin{align*}
\sum_{k=1}^n g(\nabla_{e_k} X_\theta, e_k) = \sum_{k=1}^n \langle \nabla_{e_k}\theta, e_k\rangle.
\end{align*}
This is identity ($\star$). Substituting back into (V),
\begin{align*}
\delta\theta = -\sum_{k=1}^n g(\nabla_{e_k} X_\theta, e_k) = -\sum_{k=1}^n \langle \nabla_{e_k}\theta, e_k\rangle.
\end{align*}
This is the asserted local formula.
[guided]
We have arrived at the pointwise identity (P), namely $g(\nabla_{e_j} X_\theta, e_i) = \langle \nabla_{e_j}\theta, e_i\rangle$, valid for every pair $i, j \in \{1, \ldots, n\}$ on $U$. It remains to extract the codifferential formula. The previous step did most of the geometry; this step is a contraction.
How do we recover the codifferential $\delta\theta$, which from (V) equals $-\sum_k g(\nabla_{e_k} X_\theta, e_k)$? The sum on the right pairs the index of differentiation with the index in the metric — both are $k$. Looking at (P), this is precisely the diagonal $i = j = k$. So we set $i = j = k$ in (P) and sum over $k = 1, \ldots, n$:
\begin{align*}
\sum_{k=1}^n g(\nabla_{e_k} X_\theta, e_k) = \sum_{k=1}^n \langle \nabla_{e_k}\theta, e_k\rangle.
\end{align*}
This is identity ($\star$). Note that (P) is a stronger pointwise statement than ($\star$) — it asserts equality for *every* pair $(i, j)$, not just on the diagonal — but we only need the diagonal here, since the trace of an endomorphism in an orthonormal basis is the diagonal sum.
Why is this frame-independent, despite our use of a particular orthonormal frame $\{e_k\}$? The diagonal sum $\sum_k \langle \nabla_{e_k}\theta, e_k\rangle$ is the metric trace $\operatorname{tr}_g(\nabla\theta)$ of the $(0,2)$-tensor $\nabla\theta$. In a general frame, $\operatorname{tr}_g(\nabla\theta) = g^{kl}(\nabla_{e_k}\theta)(e_l)$ with the metric inverse $g^{kl}$ supplying the change-of-frame correction; for an orthonormal frame, $g^{kl} = \delta^{kl}$ and the formula collapses to the diagonal. Likewise for $\sum_k g(\nabla_{e_k} X_\theta, e_k) = \operatorname{tr}(\nabla X_\theta) = \operatorname{div}(X_\theta)$, which is intrinsically defined.
Substituting ($\star$) back into the divergence formula (V) from the first step,
\begin{align*}
\delta\theta = -\sum_{k=1}^n g(\nabla_{e_k} X_\theta, e_k) = -\sum_{k=1}^n \langle \nabla_{e_k}\theta, e_k\rangle.
\end{align*}
This is the asserted local formula for $\delta\theta$ on $U$. Since every point of $M$ lies in some open set $U$ admitting a local orthonormal frame, the formula holds pointwise on all of $M$.
A brief retrospective on the mechanism. The proof passed the covariant derivative across the metric duality $\theta \leftrightarrow X_\theta$ via three coordinated rules: metric compatibility ($\nabla g = 0$) on the geometric side, the tensor Leibniz rule on the analytic side, and the duality identity $g(X_\theta, V) = \langle\theta, V\rangle$ applied to $V = \nabla_{e_j} e_i$ to cancel the "extra" frame-derivative terms. This cancellation is what converts a frame-dependent computation into the frame-independent identity ($\star$). Conceptually, the metric duality $\flat: \mathfrak{X}(M) \to \Omega^1(M)$ is parallel ($\nabla\flat = 0$ as a tensor, since $\flat$ is built from $g$ and $\nabla g = 0$), so differentiation commutes with raising and lowering indices.
A sanity check: in flat $\mathbb{R}^n$ with the standard Euclidean frame $e_k = \partial_{x_k}$, the Christoffel symbols $\Gamma^l_{jk}$ vanish, so $\nabla_{e_k}\theta = \partial_{x_k}\theta$ component-wise. If $\theta = \sum_k \theta_k\, dx_k$, then $\langle \nabla_{e_k}\theta, e_k\rangle = \partial_{x_k}\theta_k$, and
\begin{align*}
\delta\theta = -\sum_k \partial_{x_k}\theta_k = -\operatorname{div}(\theta^\sharp),
\end{align*}
the familiar Euclidean divergence (up to sign) of the metric-dual vector field, in agreement with the [Codifferential and Divergence](/theorems/2755) identity invoked in the first step.
[/guided]
[/step]