Compost is a catch all term for decomposed organic material. It depends on what was composted to mak the compost. Most store bout compost are not desireable for either torts or plants. Leaf compost can be an ideal substrate for forest dwelling species though. Pleas tell us what species you are keeping and what you are hopeing to accomplish with the compost for a more accurate answer.
its peat compost I am making a couple of nesting sites for my female herman I have made some using sand and top soil mix and just wanted to mix a different substrate to give tort a choice as she has never laid before and I had her xrayed yesterday and she is carrying 5 eggs and is ready to lay.
I don't think that it would be harmful. The only thing I could think of would be if the compost is not seasoned yet, it could get hot as it continues to demcompose. However, if it is prebagged from a big-box store, I'd say go for it!
I would at least bake it to kill any spores or bacteria...eggs are moist when laid and are likely to get pieces of compost stuck to them. You don't want the spores and bacteria causing trouble in the incubator. Peat is low in Ph so naturally inhibits a lot of bacteria, but to be safe, bake it or nuke it in the microwave after moistening it and let it cool before use. Vermiculite is a good additive to make thecompost more pliable and it is inert/sterile.