The Messenger of Allah ﷺ supplicated against the confederates, saying, "Allah, Revealer of the Book, Swift in reckoning, defeat the confederates. Allah, defeat them and shake them."
حدثنا محمد بن عبد الله بن نمير حدثنا يعلى بن عبيد حدثني إسمعيل بن أبي خالد سمعت
دعا رسول الله ﷺ على الأحزاب فقال اللهم منزل الكتاب سريع الحساب اهزم الأحزاب اللهم اهزمهم وزلزلهم
Bukhari narrated it in Jihad and Expeditions, chapter on invoking Allah against the polytheists for defeat and upheaval, hadith no. 2933, 6392, 7489, and Muslim in Jihad, chapter on the desirability of praying for victory when meeting the enemy, hadith no. 21/1742, 22, from the hadith of Ibn Abu Khalid, through the same chain.