安装与下载
1 ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install persian-documents
2 手动安装
将技能文件夹复制到以下位置之一
~/.openclaw/skills/
{'/skills/'}
优先级:工作区 › 全局 › 内置
3 提示词安装
将此提示词复制到 Openclaw 即可自动安装。
请帮我使用 Clawhub 安装 skill-persian-documents。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
更倾向于下载?
获取包含原生技能文件的ZIP压缩包。
基本信息
persian-documents
安装指南
- ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install persian-documents - 手动安装
将技能文件夹复制到以下位置之一
全局模式
~/.openclaw/skills/
工作区
/skills/
优先级:工作区 > 本地 > 内置 - 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 persian-documents。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
更倾向于下载?
获取包含原生技能文件的ZIP压缩包。
下载技能 (.zip)
什么是
波斯语文档生成器可帮助创建适用于实际场景的波斯语报告、信函、文章、技术文档、简历和其他文档。它将波斯语文档创作视为 RTL 和双向文本渲染任务,而不是简单地把波斯语文本放入从左到右的版面中,并优先检查渲染后的结果。
可使用它生成可编辑的 DOCX 文件或定稿 PDF,并为段落、表格、列表和页面元素设置适当的文本方向。此技能还可指导 Markdown 起草,并帮助诊断波斯语文本、拉丁文字、数字或标点显示异常的文档。它是 Openclaw Skills 中既关注内容也注重文档质量的技能之一。
应用场景
创建波斯语 Word 文档,包括正式信函、报告和简历。
制作可直接打印的波斯语 PDF,确保文本整形和 RTL 布局正确。
起草波斯语 Markdown 文章、技术文档或笔记。
排版混合波斯语和英语术语、代码、URL、电子邮件地址、版本号或 ID 的内容。
构建 RTL 表格、嵌套列表、页眉、页脚和页面布局。
修复或重新生成波斯语文本显示反向、错乱或方向不正确的文档。
工作原理
确定所需格式:可编辑的 Word 文档使用 DOCX 脚本,定稿输出使用 PDF 脚本,草稿和简单笔记则可直接使用 Markdown。
分析文档结构,包括章节、混合方向文本、表格、列表、页眉和页脚,以及页面布局要求。
保持波斯语文本按逻辑顺序排列;不要反转字符,也不要通过空格或零宽字符来进行视觉修正。
生成文档时,为段落、表格、混合方向文本片段、字体和数字呈现采用支持 RTL 的结构。
检查渲染结果,确认 RTL 流向、英语和技术值的可读性、表格和列表方向、字体是否合适,以及标点是否完整。
修正渲染或布局问题,并在交付前验证最终文档。
配置指南
此技能介绍了内置的生成和验证脚本,但未指定软件包安装命令、命令行参数或外部依赖项。请使用技能目录中的脚本,并遵循其本地使用说明;不要假设存在未记录的标志。
此技能提供以下 DOCX 生成、PDF 生成和文档验证入口:
python scripts/generate_docx.py
python scripts/generate_pdf.py
python scripts/validate_doc.py
这些命令仅用于标识脚本;请根据脚本自身的使用说明提供所需输入。起草 Markdown 时,直接按逻辑文本顺序书写,并保留有意义的波斯语字符和 ZWNJ 用法。生成前请配置内容、格式和布局要求,然后检查渲染结果。
数据架构
此技能未定义单独的数据库、元数据架构或固定输出目录。它按照文档格式和内容结构组织工作:
格式或资源 用途
scripts/generate_docx.py 生成支持 RTL 的可编辑 Word 文档。
scripts/generate_pdf.py 生成具有波斯语文本整形和 RTL 布局的 PDF。
scripts/validate_doc.py 检查渲染后的文档是否符合 RTL 要求并排查常见问题。
references/persian-typography.md 关于波斯语排版、ZWNJ、字符形式和 Unicode 陷阱的指南。
references/document-patterns.md 报告、信函、技术文档和简历的模板。
Markdown 直接起草简单文章、笔记和其他文本。
文档可以包含标题、小标题、段落、列表、表格、页眉、页脚、页码和分页符。波斯语文本应按逻辑顺序排列;在适当情况下,波斯语正文使用波斯数字,代码、版本、ID、URL 和技术值则保留拉丁数字。最终渲染出的文档才是质量评估依据,而不只是其源文件。
高级特性
无需手动调整字符顺序,即可处理波斯语和英语双向文本。
支持适配 RTL 的段落、表格方向、单元格对齐、列表标记、页眉和页脚。
区分波斯语文本使用的波斯数字与技术值使用的拉丁数字。
保留有意义的 ZWNJ 用法,并提醒注意波斯语字符整形和 Unicode 陷阱。
提供验证脚本和实用的渲染检查清单,涵盖文本流向、字体、表格、列表、标点和分页符。
包含排版指南和可重复使用的文档模板;除使用指南外,此技能未指定钩子、多智能体工作流或自动触发器。
name: persian-documents description: Generate production-quality Persian documents with correct RTL layout, bidirectional text handling, and professional typography. Use this skill whenever the user asks to create Persian documents — reports, letters, articles, technical documentation, resumes, PDFs, Word documents, or any document containing Persian text mixed with English, numbers, code, URLs, or other LTR content. Also trigger when the user asks to "fix RTL" or "fix direction" in a Persian document, or when a document needs to be regenerated because Persian text rendered incorrectly. This skill is NOT just for writing Persian prose — it is for producing documents where the final rendered output is typographically correct, structurally sound, and ready for real-world use. version: 0.1.0
Persian Document Generator
Generate professional Persian documents that render correctly as RTL, not just Persian text inserted into an LTR layout.
When to use this skill
User asks for any Persian document (PDF, DOCX, report, letter, article, technical doc, resume)
Document contains mixed Persian/English content
Document contains numbers, URLs, code, or technical terms alongside Persian text
User reports that Persian text rendered incorrectly (reversed, scrambled, wrong direction)
User needs tables, lists, headers/footers, or page layout in a Persian document
Core principle
Persian document generation is a RTL and bidirectional text rendering problem, not simply writing Persian text. The final rendered document — not the source text — is the judge of correctness.
Never:
Reverse strings manually to "fix" RTL
Rely on right-alignment alone to make a document RTL
Assume Unicode text automatically guarantees correct rendering
Insert arbitrary spaces or zero-width characters as visual hacks
Always:
Use logical text order (the order a reader reads, not the order it appears visually)
Let the document format handle directionality through proper markup/structure
Validate the final rendered output, not just the source text
Document generation approach
Step 1: Determine the output format
Format Tool Best for
DOCX scripts/generate_docx.py Editable Word documents, formal letters, reports
PDF scripts/generate_pdf.py Finalized documents, print-ready, shared output
Markdown Direct Drafting, simple articles, notes
Step 2: Understand the content structure
Before generating, identify:
Document type and required sections
Mixed-direction elements (English terms, URLs, code, numbers)
Table structure and column content types
List types (ordered/unordered, nested)
Header/footer requirements
Page layout needs (margins, orientation)
Step 3: Generate with proper RTL structure
Use the appropriate script with RTL-aware settings. The scripts handle:
Paragraph direction and alignment
Table direction and cell alignment
Mixed-direction text run ordering
Font selection for Persian/Latin rendering
Number rendering (Persian vs. Latin numerals)
Step 4: Validate the output
After generation, check:
Text flows right-to-left
Mixed content reads naturally (English words not reversed)
Numbers and version strings are intact
Tables have correct column order
Lists have correct bullet/number placement
Headers/footers follow document direction
RTL and bidirectional text rules
Logical order, not visual order
Persian text must be stored and processed in logical order (the order characters are typed and read), not visual order (the order they appear on screen). The document renderer handles the visual display.
Correct: The text "سلام دنیا" is stored as سلام دنیا (logical order) Wrong: Reversing to "ادینمالس" or manually rearranging characters
Mixed Persian and English
When Persian and English appear together, each runs in its own direction within the same paragraph. The document format handles this — the model must not try to rearrange characters.
Examples of correct mixed content:
نسخه Next.js 16.0.7 منتشر شد.
API: https://api.example.com/v1/users
npm install @tanstack/react-query
ایمیل پشتیبانی: hello@example.com
In all cases, the Persian and English each maintain their own direction. The English is not reversed, and the Persian is not reordered.
Numbers
Persian numerals (۰۱۲۳۴۵۶۷۸۹) for Persian text contexts
Latin numerals (0123456789) for code, versions, IDs, URLs, and technical values
Never reverse or reorder numbers because of RTL context
Currency symbols stay with their values: $1,299.99 not 99.95$1,299
Punctuation
Persian punctuation marks (، ؛ ؟ ! « ») stay in their correct positions
Latin punctuation in mixed contexts stays Latin
The document renderer handles placement — the model must not manually insert/remove spaces around punctuation
ZWNJ and character shaping
Preserve meaningful ZWNJ usage (کتابها، میخواهم)
Do not add or remove ZWNJ arbitrarily
Persian characters must be properly shaped (joined/non-joined forms)
Avoid incorrect ي/ی or ك/ک substitutions — use the form appropriate to the context
Tables
Tables in Persian documents must have:
RTL table direction (columns flow right-to-left)
Column alignment matching content type (right-aligned for Persian text, left for English, center for numbers)
Correct cell content direction (mixed content stays logical)
Header row direction matching table direction
Lists
Unordered lists: bullets on the right, text flows RTL
Ordered lists: numbers on the right, text flows RTL
Nested lists: maintain direction at each level
List items with mixed content: each item follows the same direction rules as paragraphs
Document structure
Professional Persian documents include:
Title page or document title with proper alignment
Headings that follow RTL direction
Paragraphs with correct alignment and spacing
Lists with proper bullet/number placement
Tables with RTL column order
Headers and footers with correct direction
Page numbers (typically right-aligned or centered for RTL)
Page breaks where needed for section separation
Quality checklist
Before finalizing any document, verify:
Text flows right-to-left throughout
English words and terms are not reversed or scrambled
URLs, email addresses, and file paths are intact and readable
Version numbers, IDs, and technical values are unchanged
Numbers render correctly (Persian or Latin as appropriate)
Tables have correct column order and cell alignment
Lists have correct bullet/number placement
Headers/footers follow document direction
Fonts support Persian glyphs (avoid missing-character boxes)
ZWNJ usage is preserved where meaningful
Page breaks don't split content awkwardly
Mixed-direction sentences read naturally
Code blocks and technical content remain readable
References
Persian typography rules — Detailed guidance on Persian/Arabic typography, ZWNJ usage, character forms, and common Unicode pitfalls
Document generation patterns — Patterns for common document structures (reports, letters, technical docs, resumes)
Scripts
scripts/generate_docx.py — Generate RTL-aware Word documents with mixed-direction support
scripts/generate_pdf.py — Generate PDFs with correct Persian text shaping and RTL layout
scripts/validate_doc.py — Validate rendered documents for RTL correctness and common issues
小红书与抖音阅读器
PTMail 邮件管理 MCP