Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
What is it recommended to do when an eclipse occurs?
It is recommended to take a bath (ghusl), to give charity, seek forgiveness and bestow prayers upon the Prophet ﷺ in abundance. It is also recommended to pray two rakats (in congregation). The best way of performing it is that be in each rakats two standings in which one recites the Qur’an and two bows (ruku`). It is recommended that there be two khutbahs after the rakats (similar to Jumah).