← 返回 Skills 市场
452
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install doc-format-gw
功能描述
公文排版工具 - 根据公文格式规范自动排版Word文档。适用于发送Word文件前进行格式调整。
使用说明 (SKILL.md)
公文排版工具
根据公文格式规范自动排版Word文档。
触发条件
用户要求:
- 排版Word文档
- 格式化公文
- 根据公文格式规范排版
- 发送Word前格式化
功能
- 自动识别标题层级(一级、二级、三级、四级)
- 设置正文格式(字体、字号、行距、对齐)
- 设置页边距
- 表格格式化
- 页码设置
使用方法
python3 ~/.npm-global/lib/node_modules/openclaw/skills/doc-format-gw/format_gw.py \x3Cinput.docx> \x3Coutput.docx>
或者在Python中调用:
from format_gw import format_document
format_document('input.docx', 'output.docx')
格式规范
详见同目录下的 references/format-rules.md
依赖
- python3
- python-docx
安全使用建议
This skill appears to do what it says: format .docx files locally using python-docx. Before installing/using it: 1) Install python3 and python-docx in a controlled environment (virtualenv) and test on non-sensitive sample documents. 2) Be aware the script assumes several Chinese fonts; if fonts are missing the output may be incorrect (references mention halting on missing fonts but the script doesn't enforce that). 3) The script contains a bug in the table formatting loop (uses an undefined variable row_index) that can cause a runtime error — you may need to fix that or avoid documents with tables until patched. 4) The SKILL.md example path may not match your installation layout; run the bundled format_gw.py directly. No secrets or network access are requested, so main risks are functional (fonts, formatting) rather than data-exfiltration.
功能分析
Type: OpenClaw Skill
Name: doc-format-gw
Version: 1.0.0
The skill bundle is a legitimate tool for formatting Word documents according to Chinese government standards. The core logic in `format_gw.py` uses the standard `python-docx` library to adjust fonts, margins, and paragraph styles based on regex-detected heading levels. There are no indicators of malicious behavior, such as network calls, unauthorized file access, or prompt injection.
能力评估
Purpose & Capability
Name/description match the included code: format_gw.py uses python-docx to adjust fonts, margins, headings, tables and save a new .docx. The required runtime (python3) and declared dependency (python-docx in SKILL.md) are consistent with this purpose.
Instruction Scope
Runtime instructions only run the formatter on an input .docx and produce an output .docx (no network calls, no env vars). Notes: SKILL.md shows an example invocation path (~/.npm-global/...), which may be incorrect depending on how the skill is installed; references/format-rules.md mentions stopping when fonts are missing but the code does not implement a font-availability check. The code only reads the provided input file and local reference file, so scope is limited to document processing.
Install Mechanism
No install spec (instruction-only with a bundled Python script). This minimizes install-time risk. The script requires the third-party python-docx package (not enforced by registry metadata), which is a common Python dependency.
Credentials
No environment variables, credentials, or config paths are requested or accessed. The skill does not attempt to read unrelated system files or network endpoints.
Persistence & Privilege
always is false and the skill does not request persistent or elevated privileges. It does not modify other skills or system-wide settings.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install doc-format-gw - 安装完成后,直接呼叫该 Skill 的名称或使用
/doc-format-gw触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
📋 核心格式
标题: 方正小标宋_GBK,二号字,居中
正文: 方正仿宋_gbk,三号字,两端对齐,首行缩进2字符
页边距: 上37mm,下35mm,左28mm,右26mm
📑 标题层级
一级: 方正黑体 + 一、
二级: 方正楷体 + (一)
三级: 方正仿宋(粗体) + 1. 或 1、
四级: 方正仿宋 + (1)
📊 表格规则
表题: 方正小标宋
表头: 方正黑体14pt居中
表体: 方正仿宋14pt
元数据
常见问题
机关公文排版skill 是什么?
公文排版工具 - 根据公文格式规范自动排版Word文档。适用于发送Word文件前进行格式调整。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 452 次。
如何安装 机关公文排版skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install doc-format-gw」即可一键安装,无需额外配置。
机关公文排版skill 是免费的吗?
是的,机关公文排版skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
机关公文排版skill 支持哪些平台?
机关公文排版skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 机关公文排版skill?
由 batduke(@batduke)开发并维护,当前版本 v1.0.0。
推荐 Skills