Nahj al-Balāgha

Hadith 1923
taqwaintellect
٣٦٥. وَقَالَ (عليه ‏السلام): الْفِكْرُ مرْآةٌ صَافِيَةٌ، وَالِاعْتِبَارُ مُنْذِرٌ نَاصِحٌ، وَكَفَى أَدَباً لِنَفْسِكَ تَجَنُّبُكَ مَا كَرِهْتَهُ لِغَيْرِكَ.
365. Amīr al-mu’minīn, peace be upon him, said: Imagination is a clear mirror, and the taking of lessons (from things around) provides warning and counsel. It is enough for improving yourself that you should avoid what you consider bad in others.
Source: al-Sharīf al-Raḍī