Agent skill

Readme From DOCX

by zhimaAi in zhimaAi/ChatClaw

Update README and docs/readmes from Word docx (English and Chinese).

GPL-3.0Auto-check passedDocuments & Office

Install Readme From DOCX

skills CLI
$ npx skills add zhimaAi/ChatClaw --skill readme-from-docx -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install zhimaAi/ChatClaw readme-from-docx --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/zhimaAi/ChatClaw.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.cursor/skills/readme-from-docx .claude/skills/readme-from-docx && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
readme-from-docx
GitHub stars
307
Token cost
~2k tokens
SKILL.md length
422 words
Files
2
Skills in repo
2
Repo updated
First seen
Licence
GPL-3.0

At a glance

Update README and docs/readmes from Word docx (English and Chinese).

  • Works in 5 steps: 提取图片(按文档 rId 顺序) → 分析章节-图片映射(从提取结果推断) → 更新英文 README → …
  • The user provides docx files to update feature previews
  • SKILL.md covers 用户输入示例, 三个核心原则, Step 1: 提取图片(按文档 rId 顺序) and Step 2: 分析章节-图片映射(从提取结果推断), plus 4 more sections
  • Reaches schemas.openxmlformats.org

What it does

Readme From DOCX is an agent skill from zhimaAi/ChatClaw. Update README and docs/readmes from Word docx (English and Chinese). Use when the user provides docx files to update feature previews, wants to sync README with docx content, or asks to extract docx images and update readmes.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 1 other file (for example `reference.md`).

It sits in Documents & Office, covering Word documents and Technical documentation. It works with Microsoft Word. The repository describes itself as: ChatClaw: Get OpenClaw-like knowledge base personal AI agent in 5 mins. Sandbox-secured, ultra-small 30MB installer for macOS & Windows (install in 1 min). Connects to WhatsApp…. The licence is GPL-3.0.

When your agent uses it

  • The user provides docx files to update feature previews
  • Wants to sync README with docx content
  • Asks to extract docx images and update readmes

Example prompts

  • “/readme-from-docx”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. 提取图片(按文档 rId 顺序)
  2. 分析章节-图片映射(从提取结果推断)
  3. 更新英文 README
  4. 更新中文 README(根目录 + docs/readmes)
  5. 翻译其他语言

What it can do on your machine

Read from SKILL.md and the folder at commit 24cf232. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are python and markdown).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • schemas.openxmlformats.org

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Readme From DOCX loads about 2k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 422 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~2k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from zhimaAi/ChatClaw at commit 24cf232, republished under its GPL-3.0 licence (© zhimaAi). 422 words, ~1,991 tokens.

Download SKILL.mdSave it as .claude/skills/readme-from-docx/SKILL.md (or your agent's skills folder). This skill also uses 1 other file; get the full folder from GitHub.
name
readme-from-docx
description
Update README and docs/readmes from Word docx (English and Chinese). Use when the user provides docx files to update feature previews, wants to sync README with docx content, or asks to extract docx images and update readmes.

Update README from Docx

当用户提供英文和中文 docx 文件并要求更新 README 功能预览时,使用本技能。

用户输入示例

请根据新版本的文档 @think_docs/AIParsing/readme-英文V3.docx @think_docs/AIParsing/readme-中文-V3.docx,
更新 README 中的【## 功能预览】中的内容,
以及其他语言的 README 都使用自己的语言翻译内容并替换自己的【## 功能预览】中的内容。

三个核心原则

① 图片必须按文档 rId 顺序提取

⚠️ 绝对禁止用 word/media/ 在 ZIP 中的文件名排序来命名输出图片!

图片命名只看一个标准:图片在文档正文中出现的 rId 顺序。 先读 word/_rels/document.xml.rels 建立 rId → media/path 映射,再遍历 word/document.xml 的 <w:body>,在每个 <w:p> 中找 <wp:inline> 或 <wp:anchor> → <a:blip> → r:embed,按出现顺序编号:第1个 → image1.png,第2个 → image2.png,依此类推。

具体步骤见 Step 1。

② 图片-段落映射每次从文档提取,不依赖历史记录

每次使用技能时,都要重新分析 docx 的 XML 结构,提取 rId 顺序,确定当前版本的图片-章节对应关系。不同版本的 docx 章节顺序和图片数量可能不同(例:英文14张、中文15张),不要假设上一版本的映射在新区本中仍然有效。

③ 中英文内容可能不一致,其他语言使用英文格式和英文图片
  • 根目录 README.md 和 README_zh-CN.md:中文内容 + zh-CN 图片,数量和顺序以中文 docx 为准。
  • README_en.md:英文内容 + en 图片,数量和顺序以英文 docx 为准。
  • 其他语言(zh-TW、ja-JP、ko-KR 等 15 种):翻译文字,图片路径固定使用 ../../images/previews/en/,章节数量和顺序与英文版保持一致,不要引入中文版才有的额外章节或图片。
④ 文档中的换行必须对应保留

⚠️ 不要将文档中的多行段落合并为一行输出!

docx 中一个段落在 XML 中可能被拆分为多个 <w:br/> 换行或多个 <w:p> 连续段落,生成 Markdown 时必须忠实还原:

  • <w:br/> 换行符 → Markdown 中的 (两个空格)+ 换行
  • 文档中独立的空行 → Markdown 中保留一个空行
  • 段落内的软换行(如标题与描述文字间的换行)→ 保留 \n 格式

示例(错误的合并输出):

markdown
<!-- ❌ BAD:将多行合并为一行,失去原文排版 -->
ChatClaw是一款开源的本地知识库、OpenClaw图形化桌面管家应用无需编程,一键部署至本地电脑。

示例(正确的保留换行):

markdown
<!-- ✅ GOOD:忠实保留文档换行 -->
ChatClaw是一款开源的本地知识库、OpenClaw图形化桌面管家应用
无需编程,一键部署至本地电脑。可连接 微信、 钉钉、企业微信、QQ、飞书,WhatsApp等主流通讯应用,
发送指令即可让 AI 帮你执行任务。内置 OpenClaw 5000+ 技能库,并支持类 ima 的本地知识库管理

在提取文本时,按 docx XML 中 <w:p> 的自然顺序拼接,保持与原文档一致的段落结构和换行位置。

Step 1: 提取图片(按文档 rId 顺序)

方法概述
  1. 解压 docx(本质是 ZIP)。
  2. 读 word/_rels/document.xml.rels,建立 rId → word/media/XXX.png 的映射。
  3. 读 word/document.xml,遍历 <w:body> 下每个 <w:p> 段落,查找其中的 <wp:inline> 或 <wp:anchor> 元素,从中取出 <a:blip r:embed="rIdX">,记录出现的 rId。
  4. 按 rId 在文档中首次出现的顺序,依次将图片文件重命名为 image1.png、image2.png… 保存到目标目录。
Python 参考脚本
python
import zipfile
import xml.etree.ElementTree as ET
import os

def extract_by_doc_order(docx_path, output_dir):
    os.makedirs(output_dir, exist_ok=True)
    with zipfile.ZipFile(docx_path) as z:
        # 1. 读 rels,建立 rId -> 实际ZIP路径的映射
        with z.open('word/_rels/document.xml.rels') as f:
            rels = ET.fromstring(f.read())
        rid_to_zip_path = {}
        for rel in rels:
            rid = rel.get('Id')
            target = rel.get('Target')       # 如 "media/image7.png"
            if target and 'media/' in target:
                # rels中是相对路径,ZIP中实际路径需要加 "word/" 前缀
                rid_to_zip_path[rid] = 'word/' + target

        # 2. 遍历 document.xml,按正文出现顺序收集图片
        with z.open('word/document.xml') as f:
            doc = ET.fromstring(f.read())

        wp_ns = '{http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing}'
        r_ns  = '{http://schemas.openxmlformats.org/officeDocument/2006/relationships}'
        blip_ns = '{http://schemas.openxmlformats.org/drawingml/2006/main}'
        body = doc.find('.//{http://schemas.openxmlformats.org/wordprocessingml/2006/main}body')

        seen, seq = set(), 0
        for elem in body:
            if elem.tag.split('}')[-1] != 'p':
                continue
            for dw in (elem.findall(f'.//{wp_ns}inline') +
                       elem.findall(f'.//{wp_ns}anchor')):
                for blip in dw.findall(f'.//{blip_ns}blip'):
                    embed = blip.get(f'{r_ns}embed')
                    if embed and embed in rid_to_zip_path and embed not in seen:
                        seen.add(embed)
                        seq += 1
                        out_name = f'image{seq}.png'
                        with open(os.path.join(output_dir, out_name), 'wb') as f:
                            f.write(z.read(rid_to_zip_path[embed]))
                        print(f'  [{seq}] {rid_to_zip_path[embed]} -> {out_name}')

    print(f'  提取到: {output_dir} ({seq} 张)')

# 用法
extract_by_doc_order('readme-英文V3.docx', 'images/previews/en/')
extract_by_doc_order('readme-中文-V3.docx', 'images/previews/zh-CN/')
输出目标
文档输出目录图片数量
英文 docximages/previews/en/image1.png ~ image14.png
中文 docximages/previews/zh-CN/image1.png ~ image15.png

先提取,再分析章节结构,不要在提取图片前假设章节数量或顺序。

Step 2: 分析章节-图片映射(从提取结果推断)

图片提取完成后,通过对比文档文本和图片的出现顺序,建立当前版本的章节-图片对应关系:

  • 遍历 docx 正文,每个 <w:p> 段落提取纯文本。
  • 段落含图片 → 对应一张图片(图片在该段落或紧邻的下一段落)。
  • 记录"章节标题段落"和"对应图片编号"的对应关系。
  • 输出一个章节列表(含序号、标题、图片编号),作为后续替换的基准。

映射示例(V3):

序号图片英文标题中文标题
1image1.pngAI Chatbot AssistantAI 聊天助手
2image2.png(续图)(续图)
3image3.pngMulti-Agent Mode…多Agent模式…
…………

注意:英文 docx 和中文 docx 的章节顺序和数量可能不同,必须分别分析。

Step 3: 更新英文 README

文件与路径
文件图片路径
README.md(根目录)./images/previews/zh-CN/(中文内容 + zh-CN 图片)
docs/readmes/README_en.md../../images/previews/en/(英文内容 + en 图片)
替换逻辑

在 ## Previews(英文)或其语言等价标题,到下一个顶级 ## … 标题之间,用分析出的章节-图片映射重写整个区块。每个功能块:

markdown
### 英文标题

描述段落。

![](./images/previews/zh-CN/imageN.png)

根目录 README.md 用中文内容(见 Step 4),路径前缀 ./。 docs/readmes/ 下的文件路径前缀 ../../。

Step 4: 更新中文 README(根目录 + docs/readmes)

根目录 README.md 和 docs/readmes/README_zh-CN.md 都用中文内容。

Show full SKILL.md (170 more words)Show less
文件与路径
文件图片路径
README.md(根目录)./images/previews/zh-CN/
docs/readmes/README_zh-CN.md../../images/previews/zh-CN/

中文版章节数量和顺序以中文 docx 为准(通常与英文一致,但可能多一张二维码图 image15.png)。

Step 5: 翻译其他语言

范围

docs/readmes/ 下除 README_en.md 和 README_zh-CN.md 以外的所有 README_*.md。

规则
  • 图片:固定使用 ../../images/previews/en/imageN.png(与英文版相同,不要引入 zh-CN 图片)。
  • 章节数量和顺序:与英文版严格对齐(不要因为中文版多一张图就加章节)。
  • 排版格式:使用英文版的 Markdown 结构(标题层级、图片数量和位置与英文版一致)。
  • 翻译内容:只翻译 ## Previews 区块(章节标题、### 小标题、描述段落),其余内容(安装说明、服务器部署、技术栈等)保持原样。
语言专属章节标题
语言代码Previews 标题Server Mode 标题
简体中文zh-CN## 功能预览## 服务器模式部署
繁体中文zh-TW## 功能預覽## 伺服器模式部署
英语en## Previews## Server Mode Deployment
日语ja-JP## プレビュー## サーバーモードデプロイ
韩语ko-KR## 미리보기## 서버 모드 배포
阿拉伯语ar-SA## المعاينة## نشر وضع الخادم
孟加拉语bn-BD## প্রিভিউ## সার্ভার মোড ডিপ্লয়মেন্ট
德语de-DE## Vorschau## Server-Modus-Bereitstellung
西班牙语es-ES## Previsualizaciones## Despliegue en Modo Servidor
法语fr-FR## Aperçus## Déploiement en Mode Serveur
印地语hi-IN## पूर्वावलोकन## सर्वर मोड परिनियोजन
意大利语it-IT## Anteprime## Distribuzione Modalità Server
葡萄牙语pt-BR## Visualizações## Implantação em Modo Servidor
斯洛文尼亚语sl-SI## Predogledi## Namestitev v načinu strežnika
土耳其语tr-TR## Önizlemeler## Sunucu Modu Dağıtımı
越南语vi-VN## Xem trước## Triển khai Chế độ Máy chủ

完整的小标题翻译对照见 reference.md。

完成前检查清单

  • 图片已按 rId 顺序提取:images/previews/en/ 14 张,images/previews/zh-CN/ 15 张(或以实际提取数量为准)。
  • 章节-图片映射已从当前文档分析得出(不是引用旧版本记录)。
  • 根 README.md 用中文内容 + ./images/previews/zh-CN/。
  • docs/readmes/README_en.md 用英文内容 + ../../images/previews/en/。
  • docs/readmes/README_zh-CN.md 用中文内容 + ../../images/previews/zh-CN/。
  • 所有其他语言 README 的 Previews 区块已翻译,图片路径固定 ../../images/previews/en/,章节数量和顺序与英文版一致。
  • 图片引用后有空行,不与下一个 ## 标题粘连。
  • 文档中段落内的换行已忠实还原(<w:br/> → \n),没有合并为单行。

© zhimaAi, GPL-3.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 1 other file in .cursor/skills/readme-from-docx of zhimaAi/ChatClaw.

  • SKILL.md
  • reference.md

Open the folder on GitHubat commit 24cf232

Compare with similar skills

Readme From DOCX next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Readme From DOCX compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Readme From DOCX this skillzhimaAi/ChatClaw307—~2kAutomated safety check: PassGPL-3.0
Documentsmagnus919/agent-skills115—~2.3kAutomated safety check: PassMIT
Writers Helpermagnus919/agent-skills115—~3.2kAutomated safety check: PassMIT
Documentcodewhale-hq/Codewhale41k—~170Automated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
DOCXrvdbreemen/OTGW-firmware20733 repos~4.3kAutomated safety check: PassProprietary

Similar skills

  • Documents

    magnus919/agent-skills

    Generate, inspect, validate, and fix PDF, Word (.docx), Excel (.xlsx), and PowerPoint (.pptx) documents: turn structured content into render-ready artifacts, verify structural and output quality…

    115 GitHub stars~2.3k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Writers Helper

    magnus919/agent-skills

    Guide any writer, fiction or nonfiction, through the whole writing lifecycle: premise and planning, outlining and worldbuilding, research, drafting and finishing, editing and revision, breaking…

    115 GitHub stars~3.2k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Document

    codewhale-hq/Codewhale

    Write or update repository/product documentation: README, user guides, API docs, architecture, migration notes, and changelog material.

    41k GitHub stars~170 tokensUpdated today
    DevelopmentAuto-check passed
  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • DOCX

    rvdbreemen/OTGW-firmware

    A skill your agent uses whenever the user wants to create, read, edit, or manipulate Word documents (.docx files).

    207 GitHub starsUsed in 33 repos~4.3k tokens
    Documents & OfficeAuto-check passed
  • Reads, creates and edits Word .docx files with python-docx, and drops to raw OOXML for tracked changes, comments and byte-exact edits.

    41k GitHub stars~2.5k tokensUpdated 2 days ago
    Documents & OfficeAuto-check passed

More from zhimaAi/ChatClaw

  • I18n Check

    zhimaAi/ChatClaw

    检查并补充前端和后端的i18n翻译文件。以中文(zh-CN)为基准,检查其他语言翻译文件是否缺少key,并补充缺失的key和对应的翻译值。对于日语(ja-JP)、韩语(ko-KR)、繁体中文(zh-TW),使用与非CJK语言对比的方式检测未翻译内容。

    307 GitHub stars~1.3k tokensUpdated 5 mo ago
    Auto-check passed

Works with

Questions about Readme From DOCX

What does Readme From DOCX do?

Update README and docs/readmes from Word docx (English and Chinese). Readme From DOCX is an agent skill from zhimaAi/ChatClaw. Update README and docs/readmes from Word docx (English and Chinese).

When should I use Readme From DOCX?

Readme From DOCX fits situations like: the user provides docx files to update feature previews; wants to sync README with docx content; asks to extract docx images and update readmes.

How do I install Readme From DOCX in Claude Code?

Run `npx skills add zhimaAi/ChatClaw --skill readme-from-docx -a claude-code`. Or copy the skill folder (.cursor/skills/readme-from-docx in zhimaAi/ChatClaw) into .claude/skills/readme-from-docx in your project. Claude Code loads it when a task matches its description.

How do I install Readme From DOCX in Codex?

Run `npx skills add zhimaAi/ChatClaw --skill readme-from-docx -a codex`. Or copy the skill folder (.cursor/skills/readme-from-docx in zhimaAi/ChatClaw) into .agents/skills/readme-from-docx in your project. Codex loads it when a task matches its description.

Can I use Readme From DOCX in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add zhimaAi/ChatClaw --skill readme-from-docx -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/readme-from-docx, .gemini/skills/readme-from-docx, .github/skills/readme-from-docx and .opencode/skills/readme-from-docx in your project.

What does Readme From DOCX need to run?

SKILL.md names no scripts, command-line tools or credentials: Readme From DOCX is instructions for the agent only. Our summary lists: Python 3.

Does Readme From DOCX access the network?

SKILL.md names 1 domain. In commands or code: schemas.openxmlformats.org; the agent is likely to contact it when it follows the instructions. This is read from the text; nothing was executed.

Is Readme From DOCX safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Readme From DOCX use?

Readme From DOCX is published under the GPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Readme From DOCX use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Readme From DOCX?

Skills that share tags, products or a category with Readme From DOCX: Documents (magnus919/agent-skills, 115 stars), Writers Helper (magnus919/agent-skills, 115 stars), Document (codewhale-hq/Codewhale, 41k stars) and Markitdown (ImCa0/just-laws, 781 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Readme From DOCX?

zhimaAi (a GitHub organization) maintains it in zhimaAi/ChatClaw, which has 307 GitHub stars. The repository holds 2 skills in this directory. The repository was last updated on May 13, 2026.

Source: zhimaAi/ChatClaw on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.