For a Hopf algebra $H$ with antipode $S$, let $M$ be a left $H$-module with the action $h \otimes m \mapsto \rho(h,m)$, and also a left $H$-comodule with coaction $\delta \colon m \mapsto m^{(-1)} \otimes m^{(0)}$. For $M$ to be a [Yetter-Drinfeld](https://en.wikipedia.org/wiki/Yetter%E2%80%93Drinfeld_category) module, it must satisfy the compatibility condition 
$$
 \delta(\rho(h,m)) = h\_{(1)}m^{(-1)} S(h\_{(3)}) \otimes \rho(h\_{(2)},m^{(0)})\,.
$$
Is there a natural commutative diagram to draw that illustrates this compatibility condition? I've included my attempt below in a CW answer. Also, is there any more reason behind this condition besides "*it's the condition we need to be true to get the [nice braiding](https://en.wikipedia.org/wiki/Yetter%E2%80%93Drinfeld_category#Braiding) to work out in the Yetter-Drinfeld category?*".



A diagram for understanding action/coaction compatibility in a Yetter-Drinfeld module
Here's my best attempt at a clean commutative diagram. I only got this from decomposing the compatibility condition though, and I don't have any motivation for *why* this is the diagram that we want to commute.


$$\require{AMScd}
\begin{CD}
 H \otimes M @>{\rho}>> M @>{\delta}>> H \otimes M \\
 @V{\Delta^2 \otimes \delta}VV @. @AA{m^2 \otimes \rho}A \\
 H^{\otimes 4} \otimes M @>>{\mathbb{1} \otimes T \otimes \mathbb{1}}> H^{\otimes 4} \otimes M @>>{\mathbb{1}\otimes\mathbb{1}\otimes S \otimes\mathbb{1}\otimes\mathbb{1}}> H^{\otimes 4} \otimes M
\end{CD}
$$


In this diagram, the Hopf algebra is associative and coassociative so the maps $$\Delta^2 \colon H \to H \otimes H \otimes H \quad\text{and}\quad m^2 \colon H \otimes H \otimes H \to H$$ are well defined. The symbol $H^{\otimes 4}$ is short for $H \otimes H \otimes H \otimes H$, and $T$ is an "outer twist" map where $T(a \otimes b \otimes c) = c \otimes b \otimes a$ . Or if you prefer, if $\tau$ is the usual twist map $\tau(a \otimes b) = b \otimes a$, then we can write $T$ as $(\mathbb{1}\otimes{\tau})(\tau\otimes\mathbb{1})(\mathbb{1}\otimes{\tau})$, which I think relates this more closely to the braiding we want in the category.


