Buddhism

To avoid negative karma, there are precepts in Buddhism - a set of recommendations for the unenlightened.

An excerpt from the article 28 facts about Buddhism

They are like a voluntary commitment and, according to the Buddha, it is good to follow them, but they cannot be imposed on anyone.