From my understanding, a gauge transformation in QFT is a local transformation in the fields under which the action is invariant. I usually write it, for a theory with scalars, fermions, and vector bosons, as:
$\Phi\rightarrow \Phi'=\Phi$
$\psi\rightarrow \psi'=U(x)\psi$
$A_\mu\rightarrow A_\mu'=A_\mu + \frac{1}{g}U(x)^{-1}\partial_\mu U(x)$
$\Rightarrow S\rightarrow S'=S$
(first question, just to make sure: is this correct?)
Real question, is this the most general gauge transformation I can write using only these fields? Can I use something more general than a transformation matrix $U(x)$?