From the Super Mario Wiki
Crabbles are hermit crab-like creatures in Yoshi's Island DS. If a Yoshi attempts to hit them with eggs or a Koopa Shell, their shells change color. They die when Yoshi successfully hits them three times. These enemies normally walk on platforms and can walk sideways and even upside down. They act much like Clawdaddies and might have been inspired by the Sidesteppers of the first Mario game, Mario Bros. since they change between the three colors of blue, green, and red.