# Arabic Word Documents (RTL DOCX)

> Word documents in Arabic and other RTL languages that open correct: direction, tables, fonts, TOC and mixed English terms.

Arabic Word Documents (RTL DOCX) is a free AI agent skill on Agensi by asad eisa, in Technical Documentation. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [asad eisa](https://www.agensi.io/creators/asad-eisa)
- Category: [Technical Documentation](https://www.agensi.io/skills/technical-documentation)
- Uses: 3
- Version: 1.0
- Last updated: 2026-10-05
- Security: scan passed (2026-10-05); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/arabic-word-documents-rtl-docx
- Tags: documentation, writing, translation, python, arabic-language, rtl-layout, hebrew, urdu

## About this skill

AI agents write Arabic Word files that look fine in the chat and break the moment someone opens them: paragraphs start at the left margin, the first table column lands on the wrong side, bold Arabic stays regular, `PostgreSQL و` collapses into `PostgreSQLو`, and `C#` turns into `#C`. None of it shows up in the text, so the agent never notices.

This skill gives your agent a tested Python library (python-docx) that writes every direction flag Word needs, and the rules for when to use each one.

**What it handles**

- **Direction everywhere:** paragraphs, runs, tables, sections and document defaults, so text the reader types later is RTL too.
- **Mixed Arabic and English:** text is split by script automatically. Brackets, version numbers and terms like `C#`, `C++`, `.NET`, `+963` stay intact.
- **Formatting that actually reaches Arabic:** bold, italic and size go into Word's complex-script slots, and template styles are cleaned so headings and the table of contents don't fall back to Calibri.
- **Full reports:** real headings, a table of contents with page numbers, numbered figure and table captions, page numbers that skip the cover, and tables with fixed column widths and a header row that repeats on every page.
- **Existing files:** `audit_docx()` lists what a reader would see wrong; `fix_docx()` repairs a document made elsewhere; `insert_before()` adds a chapter without rebuilding the file and losing manual edits.
- **Visual check:** `preview()` converts through Microsoft Word (or LibreOffice) and renders every page to PNG so the agent can look before delivering.

Works for Arabic, Persian, Urdu and Hebrew. Free and open source (MIT).

## Requires

- Python

## Known limitations

Generating the .docx needs only Python. Visual previews need Microsoft Word or LibreOffice, and page numbers in the table of contents are filled in only by Word (LibreOffice shows the headings without numbers). Text inside images is not handled here: draw Arabic labels with the arabic-pdf skill's draw_text() or as SVG. Table placement in LibreOffice previews can differ from Word; Word's rendering is the reference.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Arabic Word Documents (RTL DOCX) skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### How does this skill fix the common RTL formatting issues found in AI-generated Word documents?

This skill provides specialized logic and tools to ensure Word documents correctly handle Right-to-Left (RTL) formatting, including table directions, mixed-language text alignment (Arabic/English), and complex script font styling that standard AI outputs often break.

### Does this skill support languages other than Arabic, such as Hebrew or Persian?

Yes, it is fully compatible with Arabic, Persian (Farsi), Urdu, and Hebrew, ensuring that specific language nuances like script-specific bolding and bidirectional text (like 'C++' or phone numbers) remain intact.

### What exactly is included in the 'Arabic Word Documents' skill package?

You receive a specialized Python library based on python-docx, pre-configured rules for RTL direction flags, and utility functions for auditing, fixing, and previewing documents as PNGs.

### Can my AI agent verify that the document looks correct before delivering it to the user?

The skill includes a 'preview()' function that uses Microsoft Word or LibreOffice to render the document into PNG images, allowing your AI agent to visually verify the layout before sending the file to a user.

### Can I use this skill to repair an Arabic document that was already created with broken formatting?

The skill includes a 'fix_docx()' function designed to repair existing documents generated by other tools, and an 'insert_before()' feature to add new content to a file without losing previous manual edits.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
