Sunan Ibn Majah, Book 34, Hadith 63 (In-Book) ⓘ
‘Aishah narrated that when the Prophet saw a cloud approaching from any horizon, he would stop what he was doing, even if he was praying, and turn to face it, then he would say: “Allahumma inna na’udhu bika min sharri ma ursila bihi (O Allah, we seek refuge with You from the evil of that with which it is sent).” Then if it rained he would say: “Allahumma sayyiban nafi’an (O Allah, a beneficial rain),” two or three times. And if Allah dispelled it and it did not rain, he would praise Allah for that.
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا يَزِيدُ بْنُ الْمِقْدَامِ بْنِ شُرَيْحٍ، عَنْ أَبِيهِ الْمِقْدَامِ، عَنْ أَبِيهِ، أَنَّ عَائِشَةَ، أَخْبَرَتْهُ أَنَّ النَّبِيَّ ـ صلى الله عليه وسلم ـ كَانَ إِذَا رَأَى سَحَابًا مُقْبِلاً مِنْ أُفُقٍ مِنَ الآفَاقِ تَرَكَ مَا هُوَ فِيهِ وَإِنْ كَانَ فِي صَلاَتِهِ حَتَّى يَسْتَقْبِلَهُ فَيَقُولُ " اللَّهُمَّ إِنَّا نَعُوذُ بِكَ مِنْ شَرِّ مَا أُرْسِلَ بِهِ " . فَإِنْ أَمْطَرَ قَالَ " اللَّهُمَّ سَيْبًا نَافِعًا " . مَرَّتَيْنِ أَوْ ثَلاَثَةً وَإِنْ كَشَفَهُ اللَّهُ عَزَّ وَجَلَّ وَلَمْ يُمْطِرْ حَمِدَ اللَّهَ عَلَى ذَلِكَ .
also referenced under: Hadith 3889 (Reference) & Volume 5, Book 34, Hadith 3889 (DarusSalam)