Why can we use fundamental vector fields for vertical vector fields to prove the form of the curvature of a connection? There's a standard proof that roughly goes that, to prove the equivalence for a connection form $\omega$ on a $G$-principal bundle $P$ ($u, v \in \Gamma(TP)$):
\begin{eqnarray}
\Omega(u,v) &=& d\omega(\mathrm{Hor}(u), \mathrm{Hor}(v))\\
&=& d\omega(u,v) + \frac{1}{2} \left[ \omega(u), \omega(v) \right]
\end{eqnarray}
we can simply do it for horizontal and vertical vector fields, as any vector field can be decomposed thusly. This proof is in Kobayashi & Nomizu, it's here, it's here, etc. But for the vertical part, the proof assumes ("without loss of generality", according to one source) that we can pick a fundamental vector field instead of a more general vertical vector field.
The first part of the equality works without that choice, since $\mathrm{Hor}(u)$ is always zero for any vertical field, but for the second part, we are meant to pick $X, Y \in \mathfrak{g}$ and then use as vertical vectors $u = X^*$, $v = Y^*$, the fundamental vector fields based on the element $X$ and $Y$. Part of the proof relies then on the derivative of the connection :
\begin{eqnarray}
d\omega(X^*,Y^*) &=& X^*(\omega(Y^*)) + Y^*(\omega(X^*)) - \omega([X^*, Y^*])\\
&=& X^*(Y) + Y^*(X) - [X, Y]
\end{eqnarray}
The term $X^*(Y) + Y^*(X)$ is then supposed to vanish, from what I have seen, due to $X, Y$ being a constant function $P \to \mathfrak{g}$, and therefore zero when applied to a vector field as a differential operator.
I can understand why it would make sense at a point to consider the value of a vertical vector field as the same as that of a fundamental vector field, but if there are derivatives involved, then the Lie algebra element associated to that field may be different at a nearby point, and the derivative may not vanish.
From here, the set of fundamental vector fields very much do not cover the entire space of vertical vector fields. So what is the justification that there is no loss of generality in using fundamental vector fields here?
 A: Lemma: Let $M$ be a smooth manifold, $\omega \in \Omega(M)$ be a differential one-form on M, and $\text{d}\omega:\Gamma(TM)\times\Gamma(TM)\rightarrow C^{\infty}(M)$ be the exterior derivative of $\omega$. For any vector fields $X,Y\in\Gamma(TM)$, the value of $\text{d}\omega(X,Y)$ evaluated at $p\in M$ only depends on the values of $X,Y$ at $p$ and is independent of their values at other points.
Why: Let's calculate  $\text{d}\omega(X,Y)(p)$.
To start with, we choose a chart $(U,x)$ in the neighborhood of $p$. At any point $q\in U$, we can write
$$X_q=X^\mu(q)\partial_\mu(q)$$
where $\partial_\mu(q)$ are the basis vectors for $T_qM$ induced by the chart $(U,x)$, and $X^\mu(q)$ are the components of $X_q$ w.r.t. this basis. On the patch $U$, we can then write
$$X=X^\mu\partial_{\mu}$$
Now,
$$\text{d}\omega(X,Y)(p)=\text{d}\omega(X^\mu\partial_{\mu},Y^\nu\partial_\nu)(p)\\=(X^\mu\cdot Y^\nu\cdot\text{d}\omega(\partial_{\mu},\partial_\nu))(p) \\=X^\mu(p)Y^\nu(p)\text{d}\omega(\partial_{\mu},\partial_\nu)(p)\\=X_p(x^\mu)Y_p(x^\nu)\text{d}\omega(\partial_{\mu},\partial_\nu)(p)$$
where we used the $C^\infty(M)$-bilinearity of $\text{d}\omega$.
We see that the final result only depends on $X_p$ and $Y_p$ and is independent of their values at other points.
Q.E.D.

Back to the original problem, on a smooth principal $G$-bundle $P$, the connection form $\omega$ is a $\mathfrak{g}$-valued one-form, and its the exterior derivative can be defined as$$\text{d}\omega(X,Y):=\text{d}\omega^\alpha(X,Y)e_\alpha$$ where $e_\alpha$ is an arbitary basis of $\mathfrak{g}$, and $\omega^\alpha\in\Omega(P)$ are the components of $\omega$ w.r.t. the basis. This expression is independent of the choice of basis, hence the exterior derivative is well-defined.  Applying the above lemma (use the explicit expression we found) to $\text{d}\omega^\alpha(X,Y)$ when $X,Y$ are vertical vector fields, after several steps, we will find that at any point $p\in P$, $$\text{d}\omega(X,Y)(p)=-[A_p,B_p]_{\mathfrak{g}}$$
where $A_p,B_p\in\mathfrak{g}$ are the Lie algebra elements that generate the vertical vectors $X_p,Y_p$, respectively.
Using the same idea to what we've used in the discovery of the lemma (write $X,Y$ in terms of a basis induced by a chart), we'll find that at any point $p\in P$,
$$[\omega(X),\omega(Y)]_{C^\infty(P,\mathfrak{g})}(p)=[A_p,B_p]_{\mathfrak{g}}$$
Therefore, when $X,Y$ are vertical vector fields,
$$(\text{d}\omega(X,Y)+[\omega(X),\omega(Y)]_{C^\infty(P,\mathfrak{g})})(p)=-[A_p,B_p]_\mathfrak{g}+[A_p,B_p]_\mathfrak{g}=0_\mathfrak{g}$$
hence $(\text{d}\omega(X,Y)+[\omega(X),\omega(Y)]_{C^\infty(P,\mathfrak{g})})=0_{C^\infty(P,\mathfrak{g})}$ in this case.

Note: If we look back, we might be able to notice that the proof of the lemma applies not only to the differential 2-form $\text{d}\omega:\Gamma(TM)\times\Gamma(TM)\overset{\sim}{\rightarrow} C^{\infty}(M)$, but also to all $V$-valued tensor fields $$t:\underbrace{\Gamma(T^*M)\times\cdots\times\Gamma(T^*M)}_{p}\times\underbrace{\Gamma(TM)\times\cdots\times\Gamma(TM)}_{q}\overset{\sim}{\rightarrow} C^\infty(M,V)$$ on $M$, where $V$ is a vector space. The value of an image under $t$ evaluated at any point $p\in M$ only depends on the values of the covector field and vector field arguments of that image at that point, in the way we found in the proof of lemma.

Reference: Modern Differential Geometry for Physicists (2nd ed.), Chris J Isham, p.139-140, p.273
