Communitygithub.com

Rylai DOCX

创建、检查、编辑和验证 Word DOCX 文件,使用 python-docx 包,支持 Markdown 转换、文本替换、元数据检查以及可选的 PDF 渲染。

Rylai DOCX 是什么?

Rylai DOCX 是一款专为 AI 代理(如 Claude Code、Codex、Hermes)设计的工作流技能,专注于使用纯 Python 工具处理 Microsoft Word DOCX 文件。它基于开源的 `python-docx` 库实现文档的创建、结构检查、文本替换和元数据检查,避免了对复杂 Office 套件的依赖。当用户需要验证布局效果时,可借助 LibreOffice 将文档渲染为 PDF 以便视觉审查。该技能提供了一个统一的 CLI 脚本 (`scripts/docx_tool.py`),支持从 Markdown 生成样式化 DOCX、批量替换模板变量、以及提取文档的段落数、表格数和全文内容。其工作流程强调不覆盖用户源文件、自动设置作者元数据为 `Rylai`(除非用户指定其他作者),并在保存后重新验证文档的可读性。适用于需要程序化生成或批量修改 Word 文档的开发场景,兼顾灵活性与质量保障。

兼容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/Rylaispirit/rylai-codex-hermes-skills/tree/HEAD/skills/docx

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Rylai DOCX 是做什么的?

这是一个原创的 Rylai Codex-Hermes-Claude 工作流。使用开源的 python-docx 包进行文档操作,仅当本地渲染有用时才使用 LibreOffice。

运行时

  • 捆绑脚本所需:Python 3 和 python-docx。
  • 可选:LibreOffice (soffice) 用于 PDF 渲染。
  • 将 scripts/docx_tool.py 相对于此技能文件夹进行解析。
  • 除非用户批准安装,否则不要安装软件包。
  • 除非用户明确要求其他作者,否则将新文档或修改后文档的作者元数据设置为 Rylai。

工作流程

  1. 检查源文件并确定所请求的文档结构。
  2. 将指令排除在最终文档正文之外。
  3. 创建新的输出路径,而不是覆盖用户的源文件。
  4. 重新打开保存的 DOCX 以验证其可读性。
  5. 对于对布局敏感的工作,使用 LibreOffice 渲染为 PDF 并检查结果。

捆绑的 CLI

从简单的 Markdown 创建样式化 DOCX:

python scripts/docx_tool.py create input.md output.docx --title "报告"

支持的 Markdown 包括标题、段落、无序列表、有序列表、块引用、简单强调、内联代码和管道表格。

检查结构和元数据:

python scripts/docx_tool.py inspect output.docx
python scripts/docx_tool.py inspect output.docx --text

替换文本同时保持源文件不变:

python scripts/docx_tool.py replace input.docx output.docx \
  --set "{{client}}=Rylai Studio" \
  --set "{{date}}=2026-08-09"

当 LibreOffice 可用时渲染为 PDF:

python scripts/docx_tool.py render output.docx rendered

质量规则

  • 保留现有文档的视觉惯例,除非用户要求重新设计。
  • 使用真正的标题样式,而不是视觉上放大的正文段落。
  • 保持表格可读性,避免将太多列挤在一页上。
  • 使用 inspect 命令验证元数据、段落数、表格数和提取的文本。
  • 当 LibreOffice 不可用时,报告视觉验证已跳过。

Individual skills in this repo

This repo contains 12 individual skills — each has its own dedicated page.

Rylaispirit/rylai-codex-hermes-skills

Plan, build, render, and verify academic presentation decks with citations, accessible visuals, clear argument flow, speaker-ready pacing, and visual QA.

Rylaispirit/rylai-codex-hermes-skills

Create publication-quality chart images from supplied data using an available plotting library, with explicit scales, labels, and visual QA.

Rylaispirit/rylai-codex-hermes-skills

Plan, draft, and review persuasive copy for landing pages, product pages, ads, email, headlines, offers, calls to action, positioning, and message variants.

Rylaispirit/rylai-codex-hermes-skills

Plan, draft, revise, and audit creative or long-form writing with a portable core workflow that does not depend on missing legacy templates.

Rylaispirit/rylai-codex-hermes-skills

Create or optimize marketing images, social graphics, product mockups, banners, cover art, listing visuals, brand assets, image prompts, WebP files, and OG images.

Rylaispirit/rylai-codex-hermes-skills

Create, inspect, extract, merge, split, rotate, and render PDF files with local open-source tools, including structural and visual verification.

Rylaispirit/rylai-codex-hermes-skills

Create, inspect, extract, edit, render, and verify PowerPoint presentations with python-pptx and optional LibreOffice.

Rylaispirit/rylai-codex-hermes-skills

Create editable PowerPoint decks from a local JSON specification using Rylai's visual system, python-pptx, deterministic slide types, and optional rendering.

Rylaispirit/rylai-codex-hermes-skills

Perform an evidence-led SEO audit using accessible pages, source code, crawl data, and current search documentation without assuming missing plugins.

Rylaispirit/rylai-codex-hermes-skills

Extract a practical design system from screenshots or mockups and produce implementation-ready UI specifications using vision and repository context.

Rylaispirit/rylai-codex-hermes-skills

Plan and produce video with available AI tools or programmatic frameworks. Use for video prompts, avatars, explainers, demos, templates, pipelines, and generation.

Rylaispirit/rylai-codex-hermes-skills

Create, inspect, edit, and verify Excel XLSX workbooks with openpyxl, including CSV import, formulas, styling, error checks, and optional LibreOffice rendering.

相关技能