How can I identify bad peanuts before using them?
It's hard to say what is going to be ABSOLUTELY sure here, but I'd look for ones that have a different color from the rest in the container- if it's been overroasted, for example, you might want to avoid it.  Otherwise, I guess going by smell might be your best bet- if it has a more oily or rancid smell, you'd want to avoid it.  Look at your batch of nuts, and taste one or two of each dominant color shade/shape, and find like ones is my best suggestion.