Look at how often people tweak, clarify, and edit their comments even here on hacker news. So you'll probably just end up with "stifled" advice (using the terminology from the article), as you can see with all these suggestions in this thread.
If I was giving advice to someone who was too assertive and taking too much credit, I would never say "Think about what a black woman would do." Things like this are so transparently racist it shouldn't even need to be explained. You are simultaneously characterizing a race and gender of people and also telling someone else to act like a different race and gender.
The reason the advice was poorly received is because it is nonsense. The recipient of the advice asked the perfect question - "what does it mean to act like a white man?" The OP, when asked, also doesn't seem to know what it means. I'd say there is a lesson there - don't repeat something just because it was will received when you originally heard it. You may not understand it. It may be something of an emperor's new clothes situation where nobody can question the person who gave the original advice, but that doesn't make it good.
Saying that white men are confident and black women aren't is simultaneous bi-directional racism. You are generalizing white men and black women AND telling black women to act more white?