How can a puzzle get access to the coin’s amount, or other information relating to it?

This question was asked at chia_network.public on Keybase.

You can pass the amount in the solution of the puzzle and use the ASSERT_MY_AMOUNT condition to make sure that it is accurate. There are conditions that can assert other values as well.