I keep getting kufri thoughts and they are unintentional and they occur to me at random times including Salah. I repent everytime but my questions are:

1. Do I need to take shahada again?
2. Is my Salah invalidated?

1- You do not
2- Your prayer is valid

I recommend you say La ilaha illa Allah 100 times a day (take a deep breath each time you say it). This helps with this situation