There's a lot of talk about 'war crimes' at the moment. I guess there must be a international 'war crimes act' that says what's illegal like you're not allowed to kill civilians or use chemical gas bombs but are they written down anywhere?
"War crimes" are codified in international treaties (especially the Geneva Conventions), and in determinations by courts and in statutes made in domestic legal tribunals.
This is one area of law, however, where it is often considered acceptable to impose criminal liability on people in a country that have not adopted a relevant treaty, and have not adopted domestic law prohibiting the conduct, on that theory that it is mandatory, globally binding, customary international law which it is proper for third parties to impose upon people and countries that violate it.
The analysis in the case of war crimes is not as contractarian as in other areas of international treaty enforcement and international law.
International Humanitarian law is written down. Here is one of the places.