For al-Muʿizz, Ibn Sharaf composed conventional court poetry (panegyrics on his master, descriptions of flowers and fruits) and participated in literary colloquia.
[2] In 1055 (447), when al-Muʿizz fled al-Qayrawān for al-Mahdiyya in the face of the Hilālī invasion, Ibn Sharaf accompanied him.
For a short time he joined the court of al-Muʿizz's son, Tamīm, before moving to Mazara in Kalbid Sicily.
[2] In Aʿlām al-kalām, Ibn Sharaf wrote 20 ḥadīths in imitation of the maqāmāt of al-Hamadhānī.
The two surviving ones contain judgement of earlier poets and literary criticism typical of the Qayrawānī school.