Abu Hurairah reported,

The Prophet ﷺ said, "When the deceased is placed in his grave, he hears the sound of the footsteps of those who turn away from him. If he is a believer, the prayer stands at his head, the fasting stands at his right, the zakat stands at his left, and the good deeds such as charity, maintaining ties of kinship, kindness, and goodness to people stand at his feet.Then he is approached from the direction of his head, and the prayer says, 'There is no way in from my side.'Then he is approached from his right, and the fasting says, 'There is no way in from my side.'Then he is approached from his left, and the zakat says, 'There is no way in from my side.'Then he is approached from the direction of his feet, and the good deeds such as charity, maintaining ties of kinship, and kindness to people say, 'There is no way in from my side.'"And he mentioned the hadith in its full length.

Azami 3884

Hasan

عن أبي هريرة

عن النبي ﷺ قال: إن الميت إذا وضع في قبره إنه ليسمع خفق نعالهم حين يولون عنه فإن كان مؤمنا كانت الصلاة عنه رأسه، وكان الصيام عن يمينه، وكانت الزكاة عن يساره، وكان فعل الخيرات من الصدقة والصلة والمعروف والإحسان إلى الناس عند رجليه، فيؤتى من قبل رأسه فتقول الصلاة: ما قبلي مدخل ثم يؤتى عن يمينه فيقول الصيام: ما قبلي مدخل ثم يؤتى عن يساره فتقول الزكاة ما قبلي مدخل ثم يؤتى من قبل رجليه فيقول فعل الخيرات من الصدقة والصلة والمعروف إلى الناس: ما قبلي مدخل وذكر الحديث بطوله.

الأعظمي 3884حسن
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Funerals
Chapter
Conditions of the deceased in the grave
Section
Good deeds are a protection from the punishment of the grave
Numbering
Jami al-Kamil 3884 (2nd edition)
Azami 3884