Hello,
When batteries and contacts get dirty, the best way to clean them is to gently scrape the contact surface areas.
You can use the tip of one of those slide razor knifes, and don't have to use the sharp blade. The metal there has sharp corners that act well for scraping surfaces to get them clean. It's about the same as the back edge of the knife blade.
The surface should start to look bright, and with light scratches everywhere. The light scratches help to make better contact too.
This is an ongoing problem in a lot of battery-operated stuff that draws some amount of current from the batteries. Flashlights also develop this problem and have to have the battery ends cleaned and the contacts cleaned.
If they are gold plated then you have to be gentler and maybe scraping isn't the way to go. It depends in part how bad they are.