The words he used over Hasan and Husayn
He told them where the words came from.
إِنَّ أَبَاكُمَا كَانَ يُعَوِّذُ بِهَا إِسْمَاعِيلَ وَإِسْحَاقَ، أَعُوذُ بِكَلِمَاتِ اللَّهِ التَّامَّةِ مِنْ كُلِّ شَيْطَانٍ وَهَامَّةٍ، وَمِنْ كُلِّ عَيْنٍ لاَمَّةٍ
Aʿūdhu bi-kalimāti-Llāhi-t-tāmmati min kulli shayṭānin wa hāmmah, wa min kulli ʿaynin lāmmah
“I seek refuge in the perfect words of Allah from every devil and every crawling thing, and from every eye that harms.”
Where this comes from
He would seek protection for Hasan and Husayn with it and say: your father used to seek protection with it for Ismaʿil and Ishaq. Three things named: what cannot be seen, what can be seen and bites, and what a person does with a look.
The full narration
Narrated Ibn `Abbas:The Prophet (ﷺ) used to seek Refuge with Allah for Al-Hasan and Al-Husain and say: "Your forefather (i.e. Abraham) used to seek Refuge with Allah for Ishmael and Isaac by reciting the following: 'O Allah! I seek Refuge with Your Perfect Words from every devil and from poisonous pests and from every evil, harmful, envious eye
Source
Ṣaḥīḥ al-Bukhārī · 3371
- Agreed upon as authentic (al-Bukhārī / Muslim)