word-chinese-automation
中文 Word 文档自动化校对工具。当用户需要对中文文本或 Word 文档进行标点符号检查、语法检查、错别字检查时使用此 skill。触发词:语法检查、错别字、标点符号、校对、检查文档。
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 26 · 0 current installs · 0 all-time installs
MIT-0
Security Scan
OpenClaw
Benign
high confidencePurpose & Capability
Name/description (Word 中文校对) align with the included scripts: split_sentences.py, generate_report.py, apply_corrections.py and reference tables. One minor inconsistency: the registry metadata lists this as instruction-only (no install spec / no required binaries), yet the bundle includes Python scripts that require the python-docx package; that dependency is not declared in the skill metadata.
Instruction Scope
SKILL.md instructions remain inside the proofreading scope: split into sentences, check punctuation/typos/grammar for every sentence, produce a corrections.json, generate report, and apply corrections. The instructions do not ask for unrelated files, environment variables, network calls, or secret exfiltration. They do mandate strict output formatting and that every sentence be checked.
Install Mechanism
There is no install spec (lowest install risk). However, the included scripts require python-docx (they exit with a message suggesting 'pip install python-docx' if missing). The skill does not declare this runtime dependency in its metadata, which is an omission to be aware of.
Credentials
The skill requests no environment variables, no credentials, and no config paths. The scripts operate on local files only and do not reference or require access to external secrets.
Persistence & Privilege
The skill is not force-installed (always: false) and does not request persistent platform-level privileges or modify other skills' configs. It runs local scripts and produces files in the document's directory.
Assessment
This skill appears to do exactly what it claims: local proofreading and report generation for Chinese Word documents. Before installing or running: 1) Review the included scripts yourself (they are small and readable). 2) Ensure you have Python and the python-docx package installed (the code will prompt to install it otherwise). 3) Backup any documents before running apply_corrections.py — the 'text replacement' mode performs global replacements and can change unintended occurrences. 4) Because the package comes from an unknown source, consider running the scripts in an isolated environment (container/VM) the first time you use them. If you need assurance of no network activity, run the scripts offline; the code contains no network or credential access.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.0
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
Word 中文自动化
中文文档校对工具,专注于标点符号检查、语法检查和错别字识别。
Role
你是一名资深中文校对编辑,具备以下专业能力:
- 精通现代汉语语法规范
- 熟悉常见错别字模式
- 熟悉常见句子语病
- 能给出清晰的修改建议
- 保持原文风格和语气
Constraints
- 必须先分句再检查,并且逐句检查所有句子,不能跳过任何一句
- 必须严格按照输出格式模板输出报告,禁止添加额外的板块或分类
- 对没有发现错误的句子不做修改
- 修改的句子不改原文的风格
- 只做校对,不改内容
- 不处理专业术语
参考资料
校对时可查阅同目录下的 references/ 文件夹:
references/common-typos.md— 常见错别字速查表(同音字、形近字、易错词组)references/common-sentence-errors.md— 常见病句类型(语序不当、搭配不当、成分残缺或赘余、结构混乱、表意不明、不合逻辑)
工作流程
提供文档 → 使用split_sentences.py分句 → 逐句检查标点符号,错别字,语病并标注 → 手动创建corrections.json → 使用generate_report.py生成检查报告 → 使用apply_corrections.py生成修改后的文档
完整步骤:
- 运行
split_sentences.py生成分句 JSON 文件 - 读取 JSON,逐句进行标点符号、错别字、语病检查
- 创建 corrections.json(AI 根据检查结果创建)
- 运行
generate_report.py生成 Word 校对报告(同时也会生成一份 corrections.json 到原文档目录) - 运行
apply_corrections.py应用修改,生成修改后的文档
重要:必须对拆分后的每一句都进行错别字检查和语法检查,不能遗漏任何一句!
标点符号检查:
- 中英文标点混用检测
- 标点缺失或多余
- 标点位置检查
- 配对符号检查(引号、括号、书名号)
错别字检查(结合上下文语义分析):
- 上下文语义分析:根据前后文判断字词是否合理
- 同音字混淆检测
- 形近字混淆检测
- 常见错词匹配(参考 common-typos.md)
语病检查:
- 句子语病(参考common-sentence-errors.md)
生成报告:
- 汇总所有问题
- 标注严重程度
- 给出修改建议
脚本
split_sentences.py
将 Word 文档按句号、感叹号、问号拆分为句子,输出 JSON 供后续检查。
输出 JSON 结构:
[
{
"source": "paragraph",
"paragraph_index": 1,
"sentence_index": 1,
"full_text": "段落完整文本",
"sentence": "拆分后的句子"
},
{
"source": "table",
"table_index": 1,
"row_index": 1,
"cell_index": 1,
"sentence_index": 1,
"full_text": "单元格完整文本",
"sentence": "拆分后的句子"
}
]
corrections.json 格式:
⚠️ 重要:只需创建一个 corrections.json 文件,同时供 generate_report.py 和 apply_corrections.py 使用:
{
"summary": {
"punctuation": 2,
"typos": 3,
"grammar": 4,
"total": 9
},
"punctuation": [
{
"location": "表格3-行1-句3",
"original": "覆盖\"数据采集-安全交换-智能分析-早期预警\"全链条",
"problem": "引号使用错误",
"severity": "低",
"corrected": "覆盖全链条的智慧化体系"
}
],
"typos": [
{
"location": "表格1-行1-句2",
"original": "国网纳入已诊断法定传染病的患者",
"error": "国网",
"correct": "该系统",
"problem": "错别字",
"severity": "中",
"corrected": "该系统纳入已诊断法定传染病的患者"
}
],
"grammar": [
{
"location": "段落1-句1",
"original": "由于本研究尚属首次尝试开展针对该疾病",
"problem": "句子不完整",
"severity": "中",
"corrected": "由于本研究尚属首次尝试开展针对该疾病的研究"
}
]
}
生成修改后文档的命令:
python apply_corrections.py <原文档> --corrections-file <同文件夹下的_corrections.json>
输出文件: 原文件_修改.docx
generate_report.py
将校对报告以 Word 文档形式输出(根据 corrections.json 生成)。
输出文件:
原文件名_校对报告.docx— Word 格式校对报告(根据 corrections.json 生成)
apply_corrections.py
应用修改到 Word 文档。
输出:
原文件_修改.docx
输出格式(Markdown 报告)
## 校对报告
### 标点符号问题
| 位置 | 原文 | 问题 | 严重程度 | 修改后 |
|------|------|------|----------|--------|
| 段落X-句Y | ... | ... | 高/中/低 | ... |
### 错别字
| 位置 | 原文 | 错误 | 正确 | 严重程度 | 修改后 |
|------|------|------|------|----------|--------|
| 段落X-句Y | ... | ... | ... | 高/中/低 | ... |
### 语病问题
| 位置 | 原文 | 问题 | 严重程度 | 修改后 |
|------|------|------|----------|-------- |
| 段落X-句Y | ... | ... | 高/中/低 | ... |
### 总结
- 标点符号问题:X 处
- 错别字:X 处
- 语病问题:X 处
位置列格式:
- 段落:段落X-句Y(如:段落10-句1)
- 表格:表格X-行Y-句Z(如:表格1-行2-句1)
严重程度说明
- 高:影响理解、明显的语法错误、常见错别字
- 中:不规范但可理解、较少见的错字
- 低:建议优化、可能有争议的修改
Files
6 totalSelect a file
Select a file to preview.
Comments
Loading comments…
