Whenever a strong wind blew, the Prophet ﷺ would say, "O Allah, I ask You for the good of what You have sent it with, and I seek refuge with You from the evil of what You have sent it with."In another narration, the following was added at the beginning, Whenever he saw the wind, he would become alarmed.
كان النبي ﷺ إذا هاجت ريح شديدة قال: اللهم إني أسألك من خير ما أرسلت به، وأعوذ بك من شر ما أرسلت به. وفي رواية زاد في أوله: كان إذا رأى الريح فزع.
Bukhari narrated it in Adab al-Mufrad (7171), Abu Yaala (2905), and Tahawi in Sharh Mushkil (926), all of them through Abdul-Rahman bin Mahdi, who said, Muthanna bin Saeed narrated to us, from Qatada, from Anas, who related it. Its chain of transmission is sahih.Abu Yaala also narrated it (8391, Ithaf Mahra), as did Ibn Abu Dunya in Rain, Thunder, and Lightning (129), both of them through Ibn Fudayl, from Amash, from Anas, who related something similar with the addition mentioned at its beginning. Its chain of transmission is hasan because of Ibn Fudayl, who is Muhammad bin Fudayl bin Ghazwan.