Arabic Bidi Agent Guard — AI skill for Claude Code
Zero-dependency Python linter, Unicode sanitizer, and AGENTS.md / CLAUDE.md ruleset preventing Arabic RTL/LTR Markdown scrambling in AI coding agents.
How to install Arabic Bidi Agent Guard
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open tarikra1/arabic-bidi-agent-guard and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Arabic Bidi Agent Guard does
Zero-dependency Python linter, Unicode sanitizer, and AGENTS.md / CLAUDE.md ruleset preventing Arabic RTL/LTR Markdown scrambling in AI coding agents.
Alternatives in AI
- Datafog Python — Offline PII firewall for AI agents and LLM apps: fast local detection and redaction, Claude Code hook, LiteLLM 69 ★
- Natural Talk — 中文:让 AI 像人一样说话、创作的完整规则集 28 ★
- Localization — AI agent skills for Hebrew, RTL, translation, and cultural adaptation 22 ★
README
arabic-bidi-agent-guard
[](https://github.com/tarikra1/arabic-bidi-agent-guard/actions/workflows/ci.yml) [](CHANGELOG.md) [](LICENSE) [](pyproject.toml) [](pyproject.toml)
**Prevent Arabic RTL / English LTR text scrambling in AI coding agents and Markdown interfaces—without injecting invisible Unicode watermarks.**
Most developer chat interfaces, IDE panels, and Markdown renderers (**Claude Code**, **Cursor**, **GitHub**, **VS Code**, **Antigravity**) render paragraph containers left-to-right (`LTR`) without automatic per-span `` isolation. When an LLM mixes Arabic prose with inline English identifiers, CLI flags, backtick spans, or parentheses on the same line, the Unicode Bidirectional Algorithm scrambles word order, flips parentheses, and jumps trailing punctuation across the line.
`arabic-bidi-agent-guard` solves this at both layers:
- Preventive Agent Rule (
rules/AGENTS.md): Drop-in instruction file forCLAUDE.md,AGENTS.md, or.cursorrulesthat trains LLMs to keep Arabic sentences purely Arabic while isolating English identifiers into standalone bullets, code blocks, or dedicated Markdown table columns. - Deterministic CLI Linter & Sanitizer (
bidi-guard): Zero-dependency Python CLI and library for CI pipelines and post-generation agent hooks that catches BiDi collisions and strips hidden directional control characters (U+200E–U+2069).
Why Not Just Inject Unicode `RLM` / `LRI` Characters?
LLMs that try to "fix" Arabic alignment by emitting hidden characters (`U+200F`, `U+202B`, `U+2067`) silently break code copy-pasting, corrupt JSON/YAML parsers, tri
Related Skills
Unicode Smuggling Guard
Detects invisible Unicode hidden in code, docs and AI agent files (CLAUDE.md, SKILL.md, MCP tool descriptions)
Invisible Text Forensics
Agent Skill that finds and removes invisible Unicode in text: zero-width characters, AI watermarks, bidi overr
Arabic Rtl Fix
🇸🇦 مهارة لأي وكيل AI تُصلح اتجاه النص العربي في تطبيقات Electron — An AI-agent skill that fixes Arabic RTL t
Nitaq
نِطاق · Nitaq — stops AI agents from acting on injected instructions (Arabic, Arabizi, English, Base64). Actio
AiNetLinter
Roslyn-based C# (.NET 10) linter for AI-readability rules, with an MCP server exposing 20 solution-analysis to
Plumb
Keep your AI's context true to the code — a zero-dependency context-integrity linter for Claude Code. Verifies
Related Agents
QA Detector
L05-detector. Independent QA Detector and red-team reviewer for "Beyond the Scroll": verifies lecturer require
i18n
Internationalization expert for Arabic/English, RTL/LTR, dictionary system, and translation helpers
Hebrew LaTeX Formatter
Formats Hebrew academic content for XeLaTeX compilation with correct RTL, polyglossia, and font configuration.