I have heard of people (and seen some) writing specific clauses in their marriage contract that exempt them from providing certain rights.

The one I saw myself was the woman saying she didn’t want to ask for permission to leave the house, so they wrote it in the contract. One I heard about was the husband saying he didn’t want to be responsible for teaching her religion.

Is this permissible? It seems very dangerous to me. If Allah SWT provides these rights, are we even able to say “no, I don’t want to give them,” or “no, I don’t want to receive them?” Are we allowed to reject the rights that Allah SWT commands?

Yes such conditions in the marriage contract are permissible. The wife can stipulate in the marriage contract that she does not need his permission to leave the house whenever she wants to. As for the husband not teaching her religion, sometimes if she does not know important religious matters, it’s obligatory for him to teach her and guide her, so they cannot put such a condition.

Yes, the default conditions Allah has put are the best for us, but he has allowed us to put our conditions if both sides agree on them. The hadith states any condition is ok as long as it doesn’t violate or go against the Qur’an.