I put the things I don't want the birds to eat like avocado and onion deep in my compost with the things like apple peels and lettuce trimmings on the top of the pile. Next day I turn it all in after they have had fun getting what they want from it. So the deepest part of the compost is bad stuff but the top layers are all safe. With the middle layer being their poop. I have yet to see them dig deep enough to get at the bottom layer. I have a long compost pile and just work from one end to the other so I don't turn up the bottom before the worms have a chance to break it down.