The first source of knowing proper manners and good character is the revelation from Allah. In the Quran and sunnah, many qualities are stated and shown to be praiseworthy. The blameworthy qualities are also pointed out in numerous verses and hadith. A person should go to those verses and hadith and judge himself in the light of those teachings.
What about particular deeds? What about deeds that are not specifically covered in the Quran and sunnah? How can he judge his own deeds on a day-to-day basis and discover whether they are of good character or not? Al-Teebi has brought together two hadith that offer an answer to this question. In one hadith, the Prophet (peace be upon him) said, "Righteousness is good character." In the other hadith, he said, "Righteousness is that concerning which the soul feels tranquil and the heart feels tranquil." So, good behaviour is that behaviour concerning which the soul is at rest and pleased.
Therefore, whenever a believer performs a deed or is considering doing an act, he should study the act. If he finds that his soul is at rest with that act, he will realize that the act is an act of good and proper character. Similarly, if the believer thinks about an act and his soul feels very good about that act, he should perform it as it is part of the good character that every Muslim should try to possess.
"Commentary on the Forty Hadith of al-Nawawi" - Jamaal al-Din M. Zarabozo, p. 1026