____ _ _ _
/ ___| (_)| |__ __ _ __ __ __ _ _ _ | |__
\___ \ | || '_ \ / _` |\ \ /\ / / / _` || | | || '_ \
___) || || |_) || (_| | \ V V / | (_| || |_| || | | |
|____/ |_||_.__/ \__,_| \_/\_/ \__,_| \__, ||_| |_|
|___/
سيبويه · Sibawayh: Arabic writing skill and grammar checker for AI agents
Your AI writes Arabic. Sibawayh makes it correct Arabic.
A source-available Agent Skill (SKILL.md) and Arabic spelling, grammar and punctuation checker. It makes Claude Code, Codex, Cursor, GitHub Copilot and other AI coding agents write correct, natural Modern Standard Arabic (MSA, فصحى), and check it before they answer.
سيبويه مهارة مفتوحة المصدر جزئيًا (Source-available) لوكلاء الذكاء الاصطناعي (Agent Skill)، ومدقّق إملائي ونحوي للغة العربية. تجعل Claude Code وCodex وCursor وGitHub Copilot وغيرها تكتب العربية الفصحى سليمةً وطبيعية، ثم تراجعها قبل الإجابة: الهمزات والإملاء وعلامات الترقيم والنحو والأسلوب واتجاه النص من اليمين إلى اليسار.

Install · How it works · What it catches · Checker · Evaluation · How it is tested · بالعربية · FAQ · Contribute
🤔 Why AI-generated Arabic needs checking
Ask ChatGPT, Claude or any other AI model for Arabic and you get text that is understandable, but that a native reader spots in a second:
| What goes wrong | Looks like |
|---|
| English grammar in Arabic words | تم إنشاء الملف من قبل المستخدم |
| Broken agreement | الملفات الذين تم رفعهم موجودين |
| Wrong number–noun gender | ثلاث مهندسين |
| Wrong hamza | إستخدام، الى |
| English punctuation | نعم, ولكن? |
| Scrambled RTL | lines starting with an English word flip direction |
| Dialect slipping into formal text | عشان، بدي، هيك |
Sibawayh is named after سيبويه, the 8th-century scholar whose al-Kitāb is the foundational book of Arabic grammar. It gives the agent the rules, a checker and a review checklist, so that its Arabic reads as if a careful native writer wrote it.
✨ Before and after: AI Arabic with and without Sibawayh
Real Claude Code outputs for the same prompt, with and without the skill.
| ✗ Typical AI output | ✓ With Sibawayh |
|---|
|
تم إستخدام الأداة من قبل الفريق, وهاذا ساعدنا كثيرا.
لدينا 3 ملفات و٤ مجلدات.
الملفات الذين تم رفعهم موجودين هنا
|
استخدم الفريق الأداة، وهذا ساعدنا كثيرًا.
لدينا 3 ملفات و4 مجلدات.
الملفات التي رُفعت موجودة هنا
|
See what the checker reported on the left-hand text
1:1 INFO translationese-density Translationese density 15.8 per 100 words (تم/يتم: 2, من قبل: 1) …
1:4 ERROR hamza-wasl Hamzat al-wasl: write a bare alif, not إ (form X masdar) → استخدام
1:32 FIX punct-latin Latin punctuation between Arabic words → ،
1:34 ERROR misspelling Misspelling (no alif after ها) → وهذا
2:16 WARN digit-mix Mixed digit systems; this text uses Western (0-9) digits → 4
The script finds nothing on line 3: a regex can't reliably catch agreement with non-human plurals. That line gets fixed in the model's checklist review. This is exactly the split Sibawayh is designed around.
⚙️ How it works
flowchart LR
A["✍️ Write<br/>with SKILL.md rules"] --> B["🔍 Check<br/>check_arabic.py --fix"]
B --> C["📋 Review<br/>7-point checklist"]
C --> D["✅ Answer<br/>clean Arabic only"]