Imam al-Nawawi's introduction to this chapter
قَالَ الله تَعَالَى: ﴿وَالَّذِينَ جَاءوا مِنْ بَعْدِهِمْ يَقُولُونَ رَبَّنَا اغْفِرْ لَنَا وَلإخْوَانِنَا الَّذِينَ سَبَقُونَا بِالإيمَانِ﴾ [الحشر: ١٠].
Allah Almighty said: "And (also for) those who came after them, saying: 'Our Lord, forgive us and our brothers who preceded us in faith.'" (Surah al-Hashr: 10)
وعن عائشة رضي الله عنها: أنَّ رجلًا قَالَ للنبيِّ - صلى الله عليه وسلم: إنَّ أُمِّي افْتُلِتَتْ نَفْسُهَا وَأُرَاهَا لَوْ تَكَلَّمَتْ تَصَدَّقَتْ، فَهَلْ لَهَا أَجْرٌ إنْ تَصَدَّقْتُ عَنْهَا؟ قَالَ: «نَعَمْ». متفقٌ عَلَيْهِ.
It is narrated from Sayyidah Aishah (may Allah be pleased with her) that a man said to the Prophet (peace and blessings be upon him): "My mother died suddenly, and I think that if she had been able to speak she would have given charity. Will she have a reward if I give charity on her behalf?" He (peace and blessings be upon him) said: "Yes."
(Agreed upon)
وعن أَبي هريرة - رضي الله عنه: أنَّ رسول الله - صلى الله عليه وسلم - قَالَ: «إِذَا مَاتَ الإنْسَانُ انْقَطَعَ عَمَلُهُ إِلاَّ مِنْ ثَلاثٍ: صَدَقةٍ جَاريَةٍ، أَوْ عِلْمٍ يُنْتَفَعُ بِهِ، أَوْ وَلَدٍ صَالِحٍ يَدْعُو لَهُ». رواه مسلم.
It is narrated from Sayyiduna Abu Hurayrah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When a person dies, his deeds come to an end except for three (things): an ongoing charity, or knowledge from which benefit is derived, or a righteous child who supplicates for him."
(Narrated by Muslim)