(1)
Damrah bin Habib (one of the Tabi'in or the followers of the Companions) narrated, 'They (the Companions that he met) recommended that after the grave is leveled and the people leave, that one should stand by the grave and say three times to the deceased, 'O so-and-so, say:
"There is no god but Allah", 'O so-and-so, say: "Allah is my Lord, Islam is my din (religion), and Muhammad is my prophet." Related by Sa'id bin Mansur.
Reference: Bulugh al-Maram 582
In-book reference: Book 3, Hadith 51
English translation: Book 3, Hadith 607