Usually a greencap, something like 0.1 to 0.22uF, it only has to be a low voltage cap. I often use a 2.2uF tantalum or 0.47uF mono cap as I buy them both in bulk for general stuff like this.
Assuming the cap is charged to the LED Vf, any negative spike has to have enough energy to completely discharge that cap before the LED voltage gets to zero, then of course additional energy to cause any negative voltage on the LED.
If these are "power on" LEDs driven from say 24v the series resistor will already be quite high, and a spike capable of discharging a decent size cap and driving the LED reverse would have to be a pretty severe spike! I guess it depends on what spike voltages and energies you expect the system to endure?
Normally the spikes etc that kill LEDs are nS duration ESD type spikes that have low total energy but will take out an unprotected LED. LEDs on regulated voltage rails generally last the distance too even without a cap.