# Arabic Code Review

> مراجعة كود عربي — راجع الكود مع فحص التعامل مع النصوص العربية وRTL والتعليقات العربية

- **Type:** Skill
- **Install:** `agentstack add skill-moshe-ship-hurmoz-arabic-code-review`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Moshe-ship](https://agentstack.voostack.com/s/moshe-ship)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Moshe-ship](https://github.com/Moshe-ship)
- **Source:** https://github.com/Moshe-ship/hurmoz/tree/main/arabic-code-review

## Install

```sh
agentstack add skill-moshe-ship-hurmoz-arabic-code-review
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# مراجعة الكود العربي

مراجعة متخصصة للكود الذي يتعامل مع النصوص العربية. استخدم عندما يطلب المستخدم مراجعة كود يتعامل مع العربي.

## الفحوصات

### 1. ترميز Unicode
- هل الملفات محفوظة بـ UTF-8?
- هل يتعامل مع BOM بشكل صحيح?
- هل يعالج الحروف المركبة (combining characters)?

### 2. اتجاه النص (RTL)
- هل يستخدم `dir="rtl"` في HTML?
- هل CSS يستخدم `direction: rtl` و `text-align: right`?
- هل يستخدم Logical Properties (`margin-inline-start` بدل `margin-left`)?
- هل الأيقونات والأسهم معكوسة؟

### 3. معالجة النصوص العربية
- هل يتعامل مع التشكيل بشكل صحيح?
- هل يعمل regex مع العربي? (`\p{Arabic}` بدل `[a-zA-Z]`)
- هل الفرز (sorting) يستخدم `Intl.Collator('ar')`?
- هل البحث يطبّع الألف/الياء (أ/إ/آ → ا، ي → ى)?

### 4. الأرقام
- هل يدعم الأرقام العربية (٠١٢٣٤٥٦٧٨٩)?
- هل يستخدم `toLocaleString('ar')` للتنسيق?
- هل التاريخ يدعم التقويم الهجري?

### 5. أخطاء شائعة
```javascript
// خطأ: ما يشمل العربي
const isLetter = /[a-zA-Z]/.test(char);

// صح: يشمل كل اللغات
const isLetter = /\p{Letter}/u.test(char);

// خطأ: طول النص مع التشكيل
const len = text.length; // يحسب الحركات كحروف

// صح: تطبيع ثم حساب
const stripped = text.normalize("NFC").replace(/[\u064B-\u065F]/g, "");
const len = stripped.length;

// خطأ: فرز عربي
names.sort();

// صح: فرز بالعربي
const collator = new Intl.Collator("ar");
names.sort(collator.compare);

// خطأ: بحث بدون تطبيع
text.includes("محمد");

// صح: تطبيع الألف والتاء المربوطة
function normalizeArabic(t) {
  return t
    .replace(/[أإآ]/g, "ا")
    .replace(/ة/g, "ه")
    .replace(/ى/g, "ي");
}
normalizeArabic(text).includes(normalizeArabic("محمد"));
```

## صيغة المراجعة

مراجعة الكود العربي:

| # | الملف | المشكلة | الخطورة | الإصلاح |
|---|-------|---------|---------|---------|
| 1 | file.js:12 | regex لا يدعم العربي | عالية | استخدم `\p{Letter}` |
| ... | | | | |

**التقييم**: [X/10] جاهزية عربية

## متى تستخدم
- المستخدم يبني تطبيق عربي أو ثنائي اللغة
- يطلب مراجعة كود يتعامل مع نصوص عربية
- يسأل "هل الكود يدعم العربي بشكل صحيح?"

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Moshe-ship](https://github.com/Moshe-ship)
- **Source:** [Moshe-ship/hurmoz](https://github.com/Moshe-ship/hurmoz)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-moshe-ship-hurmoz-arabic-code-review
- Seller: https://agentstack.voostack.com/s/moshe-ship
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
