ومن تآليفه تقييد على معرب ابن عصفور نقل عنه فيه الجمال ابن هشام في شرح التسهيل، ويذكر عنه أنه دخل على سلطان وقته بتونس أظنه أبا عصيدة فوجده قد أكل فأنشده:
Among his works is a taqyid on al-Muʿrib [?] of Ibn ʿUsfur, from which al-Jamal ibn Hisham quoted him in the commentary on al-Tashil. It is mentioned of him that he went in to the sultan of his time in Tunis — I think it was Abu ʿAsida — and found that he had eaten; and he recited to him:
لقد فاتك الجدي يا بن الحباب ... بخبز سميذ كثير اللباب
You have missed the kid, O Ibn al-Habbab, ... with bread of fine flour, with much crumb;
ولم يبق منه سوى عظمة ... وذاك لعمري طعام الكلاب
Nothing of it is left but a bone, ... and that, by my life, is the food of dogs.
فلما وصل في إنشاده إلى قوله: طعام بادره الفقيه ابن الحباب فقال: به طعامكم طعامكم.
When he reached in his recitation the words "the food", the jurist Ibn al-Habbab got in ahead of him and said: In it [?] — your food, your food.
قال بعض أصحابنا ففي كلامه تورية عجيبة ولكن لا ينبغي مثل هذا مع الملوك لقول أهل السياسة: إذا داعبت الملك فأجمل الأدب ووفه حق اللعب- اه. توفي عام أحد وأربعين وسبعمائة.
One of our companions said: In his words there is a wonderful double meaning (tawriya), but such a thing is not fitting with kings, because of the saying of the people of statecraft: When you jest with a king, make your manners beautiful and give the play its due. End of quotation. He died in the year 741.