The Messenger of Allah ﷺ came in while I was with Hafsah and said to me, "Why don't you teach her the incantation for the ant-sore, just as you taught her writing?"
حدثنا إبراهيم بن مهدي المصيصي حدثنا علي بن مسهر عن عبد العزيز بن عمر بن عبد العزيز عن صالح بن كيسان عن أبي بكر بن سليمان بن أبي حثمة
دخل علي رسول الله ﷺ وأنا عند حفصة فقال لي ألا تعلمين هذه رقية النملة كما علمتيها الكتابة
[Sahih] Ahmad reported it, 6/372, from Ali bin Mushir, and Nasai in Kubra, no. 7543, from the hadith of Abdul-Aziz bin Umar with the same wording. The hadith has other routes with Nasai in Kubra, no. 7542, and Hakim, 4/414, and others.