Sunnats at the time of death and after death

1. When it becomes apparent that the time of death is close, then those present should face the
dying person towards the qiblah.(Mustadark Haakim‐Vol.1, pg.353) and they should make
talqeen i.e. recite the kalima to encourage him to recite. (Tirmidhi‐ Chapter of Janaaiz)

2. When the time of death has approached, the dying person should recite this dua: اَلّٰلهُمَّ اغْفِرْلٍيْ وَارْحَمْنِيْ وَأَلْحِقْنِي بِالرَّفِيْقِ الْأَعْلٰى
(Bukhari, Muslim, Tirmidhi)
Trans: O Allah, forgive me, and have mercy on me and join me with the companions who are in
the highest stage.

3. When there are indications that the soul is departing, recite this dua: اَلَّلهُمَّ أَعِنّيْ عَلٰى غَمَرَاتِ الْمَوْتِ وَ سَكَرَاتِ الْمَوْتِ
(Tirmidhi)
Trans: O Allah, assist me through the difficulties of death.

4. When death has occurred then those having any connection with the deceased should recite: ِاِنَّا لِله وَاِنَّا اِلَيْه رَاجٍعُوْن. الَّلهُمَّ أْجُرْنِيْ فِي مُصِيْبَتِيْ وَاخْلُفْ لِيْ خَيْرًا مِنْها
Trans: Verily to Allah we belong and to Him shall we return. O Allah, reward me in my difficulty
and grant me some thing better in exchange.

5.After the person has passed away, the deceased's eyes should be closed.