Q.Can walnut shells, branches and leaves go in the compost?
I read they can be toxic and therefore should stay out of the compost pile. What do you think? Thank you!

You can compost these parts of the tree, though you will need to wait the appropriate time before using this composted material.
These links have more information.
https://www.extension.iastate.edu/news/2005/jul/070701.htm
https://www.gardeningknowhow.com/garden-how-to/info/allelopathic-plants.htm
https://www.gardeningknowhow.com/composting/ingredients/nut-shells-in-compost.htm