Exports a Claude Doc to a Word .docx file with right-to-left Arabic (Saudi thesis style) or English (APA 7) formatting, including cover page, table of contents, and references.
Ships in doc-to-word-rtl. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Turn a Claude Doc into a .docx that opens in Word already in its house style. Two scripts in this skill's scripts/ folder, one per language; each is the single source of truth for its house style, and its options override it when a client's template differs:
md_to_docx_rtl.py (right-to-left paragraphs and tables, Traditional Arabic, thesis spacing)md_to_docx_en.py (APA 7 student paper)The doc's language is the one most of its prose is written in; the client's instructions win when they name a style.
Formal report. When the user asks for a cover page, a table of contents or an APA reference list ("docx فورمال", "غلاف + فهرس"), the scripts below do not add them. Read references/formal-layout.md first and build with docx-js following it; the bidi, pagination and TOC rules there come from renders that failed.
Build the final file with the script. The connector's own docx export carries no bidi settings, so its Arabic tables and paragraphs come out mirrored.
read with ref: {object: "project", id: <doc id>}. For a short claude.ai/artifact/... link, Artifact read it first to get the doc id. Done when you hold the doc id and the file id of every tab.export with format: "markdown". Large results are saved to a JSON file and the tool message names its path: that path is the script input as is. Small inline results: write {"data":{"bytes_b64":"<the value>"}} to <scratch>/<tab>.json. Done when every tab has an input file on disk.notes list each dropped construct; images become [image: <alt>\] lines and charts or other widgets become [embedded content: <caption>\]. When the notes report any, fetch every one, in document order:
payload: {"projection": "outline"}. Each picture is a <media blob='blob/<id>' alt='…'/>, each chart an <embed ref='node/<id>' caption='…'/>. A <gap> inside a list or table hides its blocks; read that block with {"kind": "view", "parentId": "<its id>"} when the outline shows fewer pictures than the notes count.read ref: {object: "blob", id: "<id>"} gives its asset; then Artifact read with the doc's link and path: "<asset>" saves the file and prints its path.read ref: {object: "node", id: "<id>"}, engine: "widget", payload: {"kind": "screenshot"} saves a PNG and prints its path.<scratch>/images.json as a list of {"alt": "<alt or caption>", "path": "<file>"} in the order they appear.
Done when the list holds one entry per dropped picture and chart.<base dir>/scripts/<script>, where <base dir> is the "Base directory for this skill" line shown when this skill loads and <script> is the one for the doc's language. Run it in place (pip install python-docx --break-system-packages if the import fails). Done when python3 <base dir>/scripts/<script> -h prints usage.python3 <base dir>/scripts/<script> <input> "<doc title>.docx" [--images <scratch>/images.json] [options], passing an option for every client-template value that differs from the house style. Done when the script prints OK -> ... and images: N embedded, 0 missing for every tab; direction: LTR from the Arabic script on an Arabic doc means the script is damaged: stop and tell the user.soffice --headless --convert-to pdf, then pdftoppm -r 60 -png and view a body page, a table page, a numbered-list page, and a page with a picture when there is one. Done when every page viewed passes every check:
EngDawood/claude-doc-to-docx-arabic: a pull request that bumps version in .claude-plugin/plugin.json. For a copy installed in Claude (claude.ai / Cowork) as a .plugin file, also repackage it with the cowork-plugin skill (customize mode).md_to_docx_rtl.py)Taken from a hand-formatted Saudi master's thesis chapter.
| Element | Style | Option |
|---|---|---|
| Page | A4, margins 2.54 cm, centered page number | --paper, --margins |
| Body | Traditional Arabic 16, colour 0D0D0D, justified, line 1.08, 8 pt after | --ar-font, --en-font, --size, --color, --line |
# | 22 bold, centered; Title style, so it stays out of the table of contents | derives from --size |
## | 18 bold | derives from --size |
### | 16 bold | derives from --size |
| Heading alignment | centered when it opens with المحور / الفصل / مراجع / المراجع; right otherwise (أولاً، 1.، خلاصة) | CENTER_H_RE in script |
Caption جدول (n): … | 16 bold centered, kept with the table | |
| Table | full width, 14 pt, header bold on E7E6E6 repeated each page, rows unsplit, cells vertically centered, text right, numbers centered | --table-size |
| After a table | 10 pt space before the next paragraph | |
| Lists | 16 pt, 4 pt after, every numbered list restarts at 1 | |
| References (under a heading with المراجع / References) | right-aligned, hanging indent 0.635 cm | |
| English-only paragraph | left-to-right, same font | |
| Pictures and charts | centered, scaled to the text width (at most 18 cm tall); a chart's caption under it | --images |
| Right-aligned text | no jc set, so Word aligns it to the start (right) of the RTL line; jc="right" would land on the left | |
date · @name line under the title | removed | --keep-byline |
--- | page break |
md_to_docx_en.py, APA 7)| Element | Style | Option |
|---|---|---|
| Page | US Letter, margins 2.54 cm, page number top right | --paper, --margins |
| Body | Times New Roman 12, double-spaced, left-aligned, first line indented 1.27 cm, no space between paragraphs | --font, --size, --line |
# | paper title, bold centered; Title style, so it stays out of the table of contents | |
## | APA Level 1, bold centered | |
### | Level 2, bold flush left | |
#### | Level 3, bold italic flush left | |
##### | Level 4, bold indented | |
Table n: Title | "Table n" bold on its own line, title italic on the next | |
| Table | horizontal rules only (top, under header, bottom), header row repeats, rows unsplit | --table-size |
Note. line after a table | "Note." italic, then the text | |
| Lists | double-spaced, every numbered list restarts at 1 | |
References heading | starts a new page; entries hanging indent 1.27 cm | |
| Pictures and charts | centered, scaled to the text width (at most 18 cm tall); a chart's caption under it | --images |
date · @name line under the title | removed | --keep-byline |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
/doc-to-word-rtl:doc-to-word-rtlfrom doc-to-word-rtl
npx claudepluginhub engdawood/awesome-arabic-claude-skills --plugin doc-to-word-rtl