1. Keep your gun concealed until you understand the situation
2. If you’re not sure do NOT reveal your weapon
3. Take out ID and hold it as high as possible as most undercover police will do in this type of situation. I know this sounds like a lot to do, but it may save YOUR life.
4. Only when you are sure of your situation commit to action and then return your weapon to it’s concealed position ASAP, keeping your ID in Plain sight. In most situations the holding or displaying of your ID will tell law enforcement that you’re on their side.
I saw a CCW badge (similar to a police badge) offered for sale, but didn't really picture how it would be used. Perhaps the badge plus a concealed carry permit in a leather ID case would work in that situation.
Re: my previous comment to you about “CCW badges”
I looked up a couple of threads on CCW badges on two law enforcement forums...their comments were at least 99-1 against, for various reasons. Just ID seems to be the way to go.