Creating a proper twist for a character’s arm or leg is probably one of the most common things people are struggling with during rigging.

Interestingly, there is still no general solution to the subject even with the modern feature-packed 3d apps which continuously provide more and more functionality.
Only a few approaches can be found online which suggest a workable solution to overcome flipping issues, gimbal lock and axis independency. But so far there is no out-of-the-box solution. Still, these workarounds always require a couple more nodes, ik-handles and/or constraints.
Anyone researching on the subject eventually figures out that the main issue with setting up a working twist is the Euler Rotation and that it only can be solved when utilizing Quaternion orientation. But Quaternions are pretty hard to grasp for the average artist and good, as well as understandable explanations are sparse. The air is getting thin in this area.

So, some action needed to be taken resulting in a single node handling all the twisting you’d ever wanted.
QuatTwist simply connects to the transform you want to handle the twist and gathers all the relevant quaternion-based data for the calculation.
It also provides additional controls as well as segmentation attributes which greatly reduces the need for additional nodes and twist-related networks.

quatTwist is under the terms of the MIT License

All files of the toolset are combined as a module. This allows for an easy installation and keeps all necessary files in one location.

To install unzip the download and drag the provided dragDropInstaller.py in the main Maya window. Depending on the type of chosen installation all files will be created and placed automatically. Also a log file will be created documenting the installation.

If you need help during the installation see the included installation guide which can also be opened from the installer window.

After the installation restart Maya. The Constrain menu in the rigging menu bar now contains the quatTwist menu items.