The Messenger of Allah ﷺ, whenever he sat in a gathering or finished a prayer, would speak certain words. Ayesha asked him about these words, and he said, "If a person has spoken good, these words act as a seal upon it until the Day of Resurrection, and if he has spoken otherwise, they serve as an expiation. The words are, Glory be to You and praise be to You, there is no god but You, I seek Your forgiveness and turn to You in repentance."
حدثنا أبو سلمة حدثنا خالد بن سليمان الحضرمي عن خالد بن أبي عمران عن عروة
أن رسول الله ﷺ كان إذا جلس مجلسا أو صلى تكلم بكلمات فسألته عائشة عن الكلمات فقال إن تكلم بخير كان طابعا عليهن إلى يوم القيامة وإن تكلم بغير ذلك كان كفارة سبحانك وبحمدك لا إله إلا أنت أستغفر الله وأتوب إليه
Its isnad is sahih. Khalid bin Sulayman Hadrami was deemed trustworthy by Ibn Hibban, while Husayni considered him unknown, but Ibn Hajar disputed this. Khalid bin Abu Imran Tujibi was a trustworthy jurist, whose hadith appears in Muslim.Nasai narrated the hadith, 3/71, number 1344, in the chapter on Sahw, and in Amal al-Yawm, 309, number 400.