Whatever you feed your fish... BLue legs are straight up omnivores. They eat just about anything that winds up on the substrate or rockwork. There more of a fire and forget type creature.
If you have a decent amount of brown diatom algae, I'd let them eat that first Otherwise get some sinking pellets or just a little frozen food (brine, mysis, etc)
this is gonna sound like a smart ass answer...but your snails. I have found that when my hermits get hungry, or just want a bigger shell, they harass and kill a snail. Eat it. And move in. I had planned to avoid hermits in my next tank.