Clown gobies (Gobiodon spp.) not only consider corals as domiciles, but also as a potential snack, according to a study to be published in the Journal of Fish Biology.
Since clown gobies spend much of their lives hiding and living amongst coral, it would be logical to assume that they would be tempted to take a bite out of them, but this has not been conclusively demonstrated until this study by Rohan Brooker, Philip Munday and Tracy Ainsworth of the ARC Centre of Excellence for Coral Reef Studies in Australia.
The authors examined the gut contents of three species of clown gobies inhabiting the Great Barrier Reef (Gobiodon brochus, G. histrio and G. quinquestrigatus), and found their diet to consist of algae, invertebrates, and cnidae (stinging cells) of corals, among other things. However, the authors were uncertain if the cnidae came from the host corals.
The broad range of food items found in the guts of the gobies also suggested that they are generalists that do not specialise on a diet of coral.
For more information, see the paper: Brooker, RM, PL Munday and TD Ainsworth (2010) Diets of coral-dwelling fishes of the genus Gobiodon with evidence of corallivory. Journal of Fish Biology, doi:10.1111/j.1095-8649.2010.02644.