As for the isnād (chain of transmission), it was already cited above.
The second report comes from Abū Hurayrah, traced back to the Prophet ﷺ. Al-Tirmidhī, al-Dāramī, al-Ḥākim, and al-Bayhaqī all recorded it through several routes from ʿAbd al-ʿAzīz ibn Muḥammad al-Darāwardī, who said: “Yazīd ibn Khuṣayfah informed us, from Muḥammad ibn ʿAbd al-Raḥmān ibn Thawbān, from him.” Al-Tirmidhī graded it “ḥasan (sound),” while al-Ḥākim ruled that it is “ṣaḥīḥ according to Muslim’s conditions,” a verdict with which al-Dhahabī agreed—and the assessment is indeed as they stated.
Ibn Khuzaymah also included it, as cited in al-Targhīb, and so did al-Nasāʾī; al-Shawkānī noted that it appears in (al-Yawm wa’l-Laylah). Ibn al-Sunnī narrated the first half of it with a similar wording in ʿAmal al-Yawm wa’l-Laylah. Likewise, Ibn Ḥibbān in his Ṣaḥīḥ and Ibn Ḥazm in al-Muḥallā transmitted the second half in near-identical form. The first additional clause is found in al-Dāramī— and in one recension of al-Tirmidhī—while the other addition occurs in the version of the first of those two and in that of al-Bayhaqī as well.
This ḥadīth has also been transmitted from ʿAbd al-Raḥmān ibn Thawbān, from his father, as a marfūʿ report in the wording:
“Whoever you see reciting poetry in the mosque, say: ‘May Allah split your mouth,’ three times; and whoever you see chanting it for him in the mosque, say: ‘You will not find it,’ three times; and whoever …”