Since Gyan Riley, my son, is an excellent classical guitarist I have the chance to try things out as I write them with him. I also have had the help of the wonderful David Tanenbaum from time to time. Other than that I try to visualize the fret board when I think I am doing something with unusual voicings.
I try to remember how marvelous harmonics sound on the guitar and when they can be effective. I have also experimented with different scordaturas to give the guitar a different kind of voice.
In general, I just try to write the music as I hear it and try to make it work technically for the player afterwords if there is some adjustment needed. That said, the bottom line is to create the most engaging music you can in the context of the guitar’s possibilities and when needed take a little help from your friends.