In order to become great at that, you have to make enough mistakes that affect other people until you understand what helps and what hinders them. You have to realize that your code isn't just implementation but is human-oriented communication, and tools are part of the puzzle.
The more your work hinders others, and the more you are forced to deal with the consequences of it, the more you will learn what helps and facilitates others.
You can also learn some of this by using and suffering from other people's bad work, as long as you don't allow it to make you complacent.
Finally, you need to have humility. Nobody who thinks they're great is going to be truly great. You need to recognize how you suck and how to suck less. "Take the log out of your own eye so that you can see clearly to take the speck of dust out of your brother's eye."