न तद् परस्य सन्दध्यात् प्रतिकूलम् यद् आत्मनः
एष संक्षेपतो धर्मः कामादन्यः प्रवर्तते॥
na tad parasya sandadhyāt pratikūlam yad ātmanaḥ
eṣa saṁkṣepato dharmaḥ kāmādanyaḥ pravartate||
This is from Manusmriti, the treatise of wisdom and legal precedents and rules of ancient India..
The sum and substance of Dharma or proper conduct is brought out in this simple couplet..
One should not wish for others or do for others something which is proved to be of detriment to oneself
This is Dharma in brief... Action apart from this just arises out of lust, avarice and such unwelcome qualities..
If we analyze any literature containing lifestyle principles, the above idea would find its place everywhere though in different words and different languages..
This is the Golden rule..