What is the phrase 'you are a good friend' when translated from English to German?

"Du bist ein guter Freund" to a male friend.
"Du bist ein gute Freundin" to a female friend.

But with caution !!

This in the wrong tone can be taken in a negative way,
(Meaning 'with you as a friend who needs enemies')

I always use the phrase "Du bist ein sehr guter Freund" this eliminates any possibility of misunderstanding.