党政公文格式化
将文字或 Word 转为规范党政机关公文格式 Skill: 党政公文格式化 Owner: wing-art Summary: 将文字或 Word 转为规范党政机关公文格式 Tags: latest:1.0.2 Version history: v1.0.2 | 2026-07-09T08:31:26.327Z | user - Removed the sample file skill-card.md. - No changes to features or behavior; documentation updated and streamlined in SKILL.md. - All functionality remains as previously described. v1.0.1 | 2026-07-09T06:55:14.720Z | user - Added skill documentation (README.md) and metadata fil
Rank
62
Safety
84
Downloads
1.1k
Updated
Oct 11, 2026
Version
1.0.2
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1.1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1.1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 1.0.2release · observed Jul 9, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s179t0n7qy7rwex3mw410r5yj185eah7:format-official-docx- Setup complexity is LOW. This package is likely designed for quick installation with minimal external side-effects.
- Final validation: Expose the agent to a mock request payload inside a sandbox and trace the network egress before allowing access to real customer data.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-wing-art-format-official-docx/snapshot"
Documentation
CLAWHUB
34,140 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
--- name: format-official-docx description: 将粘贴的中文文本或现有 .docx 文档,转换为符合党政机关公文格式规范的 Word 文档。支持函、请示、报告、通知、批复、意见、纪要、上行文等文种。功能包括红头、发文字号/签发人、密级标注(密级★期限)、主送机关自动补全冒号、--date today 自动填日期、附件说明与附件首页“附件N”标识、发文机关署名居中且成文日期右空四字、版记落偶数页、页码、字体缺失告警,以及保留表格的重排(format-only)模式。附带格式校验脚本。 --- # 党政公文格式化 生成规范的 .docx 文件;不要只给建议而不实际生成。 ## 快速流程 1. 判断意图: - `format-only`(仅重排):保留段落文字与顺序,只调整版式与样式。 - `generate`(生成):创建公文外壳并撰写简洁正文。 2. 选择文种。若不明确,参考 `references/document-types.md`;否则不必加载。 3. 版式细则参考 `references/format-rules.md`。本地细则优先于通用 GB/T 9704 知识。 4. 用 `scripts/generate_official_docx.py` 生成。 5. 正式公文(请示/函/报告)生成后,尽量运行 `scripts/check_official_docx.py` 做格式校验。 6. 最终文件保存到 `outputs/`。 前置依赖:`python-docx`;若缺失请用 `pip install -r requirements.txt` 安装。 ## 核心规则 - 除非用户要求起草或修改,否则保留原文实质内容。 - 不要臆造缺失的元数据;应询问用户,或使用 `XXXX` 等占位符。 - 标题/红头使用方正小标宋简体,正文使用仿宋_GB2312,一级标题使用黑体,二级标题使用楷体_GB2312,数字及拉丁文字使用 Times New Roman。 - 严格的 format-only 模式不得新增结尾、署名、附件或元数据。 - 现有 .docx 的 format-only 重排会保留段落文字与表格(重新套用正文规范字体);不保留图片、批注、修订痕迹、文本框、复杂页眉。 ## 常用命令 生成请示: ```bash python scripts/generate_official_docx.py --input body.txt --output out.docx --doc-type request --red-header "某单位文件" --outgoing-no "某字〔XXXX〕XX号" --signer "XXX" --title "某单位\n关于XXXX的请示" --recipient "某上级机关:" --issuer "某单位" --date "XXXX年XX月XX日" --add-closing ``` 生成函: ```bash python scripts/generate_official_docx.py --input body.txt --output out.docx --doc-type letter --letterhead "某单位" --outgoing-no "某字〔XXXX〕XX号" --title "关于XXXX的函" --recipient "某单位:" --issuer "某单位" --date "XXXX年XX月XX日" --no-page-number ``` 仅重排: ```bash python scripts/generate_official_docx.py --input source.docx --output formatted.docx --doc-type generic --format-only --promote-first-paragraph-title ``` 格式校验: ```bash python scripts/check_official_docx.py out.docx --doc-type request python scripts/check_fonts.py ``` ## 关键参数 - `--doc-type`:文种,`generic` / `request` / `report` / `letter` / `notice` - `--format-only`:仅重排模式 - `--red-header`:请示/上行文的红色“发文机关名称+文件”红头 - `--letterhead`:函的红色机关头 - `--letter-special-margins`:仅在明确要求时使用本地函首页页边距(上 5.1 / 下 2.1) - `--outgoing-no`、`--signer`、`--title`、`--recipient`、`--issuer`、`--date`、`--contact` - `--attachment`、`--copy-to`、`--print-org`、`--print-date`、`--disclosure-note` - `--secret-level`:左上角三号黑体密级行,如 `秘密★1年` - `--add-closing`:仅在缺失时补充标准请示/报告结尾 - `--date today`:自动填入当前日期(也接受 `XXXX年XX月XX日`) - `--bold-headings`:一级(黑体)标题加粗;默认关闭,遵循三号黑体不加粗规范 ## 最终检查 检查标题/红头字体、页边距、行距、首行缩进、标题发文机关行、发文字号/签发人、右对齐的署名与日期、联系人/披露说明、页码、版记。若本机未安装方正小标宋简体或仿宋_GB2312,Word 会替换字体。
README.md
# format-official-docx(党政公文格式化) 将纯文本或现有 Word 文档,按党政机关公文格式规范,生成/重排为规范的 `.docx`。 支持 **请示、报告、函、通知、批复、意见、纪要** 等文种,以及密级标注、红头、附件、版记、页码等要素。 > 本技能默认遵循「三号仿宋_GB2312 正文、方正小标宋简体标题、版记落偶数页」等常见规范; > 具体以你单位印发的格式细则为准。文中示例均使用 `某单位` 等占位名称,请按实际替换。 ## 特性 - 生成(generate)与重排(format-only)两种工作流 - 文种:请示 / 报告 / 函 / 通知,校验亦支持 批复 / 意见 / 纪要 - 红头(发文机关+文件)、发文字号、签发人、密级(左上角 三号黑体 `密级★期限`) - 主送机关自动补全中文冒号;成文日期支持 `--date today` 自动填 - 附件说明(首行缩进)+ 附件首页「附件N」标识 - 发文机关署名居中、成文日期右空四字 - 版记(抄送 / 印发机关 / 印发日期)强制落偶数页 - 字体缺失时主动告警(避免 Word 静默替换导致排版漂移) - `--bold-headings` 可选:一级黑体标题加粗 ## 安装 ```bash pip install -r requirements.txt ``` 依赖:`python-docx>=1.2.0`。 ## 快速开始 生成一份请示: ```bash python scripts/generate_official_docx.py \ --input body.txt --output out.docx --doc-type request \ --red-header "某单位文件" --outgoing-no "某字〔2026〕1号" --signer "XXX" \ --title "某单位\n关于某事项的请示" --recipient "某上级机关" \ --issuer "某单位" --date today --add-closing \ --attachment "关于某事项的说明" --copy-to "某机关" \ --print-org "某办公室" --print-date "2026年7月9日" \ --contact "(联系人:XXX,联系方式:XXXXXXXX)" --secret-level "秘密★1年" ``` 将已有 `.docx` 重排为规范格式(**保留表格**): ```bash python scripts/generate_official_docx.py \ --input source.docx --output formatted.docx --doc-type generic \ --format-only --promote-first-paragraph-title ``` 校验格式信号: ```bash python scripts/check_official_docx.py out.docx --doc-type request python scripts/check_fonts.py ``` ## 常用参数 | 参数 | 说明 | |---|---| | `--doc-type` | `generic` / `request` / `report` / `letter` / `notice` | | `--format-only` | 仅改版式与字体,不新增结尾、署名、附件等要素 | | `--red-header` | 请示/上行文红头,如 `某单位文件` | | `--letterhead` | 函的红头机关名称 | | `--secret-level` | 左上角密级,如 `秘密★1年` | | `--attachment` | 可多次,附件名称 | | `--copy-to` | 抄送机关 | | `--print-org` / `--print-date` | 印发机关 / 印发日期 | | `--date today` | 自动填入当前日期 | | `--add-closing` | 请示/报告自动补结尾(仅在缺失时) | | `--bold-headings` | 一级黑体标题加粗(默认不加粗) | ## 字体说明 生成脚本写入的字体名为规范名称:`方正小标宋简体`、`仿宋_GB2312`、`楷体_GB2312`、 `黑体`、`宋体`、`Times New Roman`。若本机未安装对应字体,Word 打开时会替换渲染, 脚本会在生成时向 stderr 告警。装好字体即可获得与打印一致的规范排版。 ## 文种速查 详见 `references/document-types.md`;版式细则见 `references/format-rules.md`。 ## License MIT-0
_meta.json
{
"ownerId": "kn78ykfdjrjqt3k7qfhmj66ef585ekjt",
"slug": "format-official-docx",
"version": "1.0.2",
"publishedAt": 1783585886327
}references/document-types.md
# 公文文种选择速查 仅在用户未明确文种时使用。 - 请示:向上级请求批准或指示;一事一请;结尾用 `妥否,请批示。` - 报告:向上级汇报工作、情况或结果;不提批准请求;补全结构时以 `特此报告。` 结尾。 - 函:不相隶属机关之间商洽、询问、请求协助、答复或反馈意见;无意见答复通常用函。 - 通知:布置工作、转发文件、公布事项、要求执行。 - 批复:上级答复下级请示。 - 意见:提出指导意见、实施办法、政策或工作建议。 - 纪要:会议记录,含议定事项、参会单位、后续跟进。 判断参考: - 用户明确说请示/函/报告,从其意。 - “征求意见/无意见/函复” → 通常为函。 - “请批准/请审定/提请研究” → 通常为请示。 - “汇报/报送情况/说明进展” → 通常为报告。 - “请各单位落实/转发” → 通常为通知。
references/format-rules.md
# 党政机关公文格式规则 本规则提炼自本地公文格式规范。若与通用 GB/T 9704 知识冲突,以本规则为准。 ## 页面 - 用 A4 纸;标准页边距:上 3.7 厘米、下 3.5 厘米、左 2.8 厘米、右 2.6 厘米。 - 部分本地函模板首页用上 5.1 厘米、下 2.1 厘米;仅在明确要求时使用。 - 固定行距 28.9 磅。默认文字颜色为黑色。 - 双面打印,左侧装订。 ## 字体 - 红头 / 主标题:方正小标宋简体。 - 主标题:二号,居中。 - 正文:三号仿宋_GB2312;数字及拉丁文字用 Times New Roman。 - 一级标题(一、):三号黑体。 - 二级标题((一)):三号楷体_GB2312。 - 三级/四级标题(1. / (1)):三号仿宋_GB2312。 - 页码:四号宋体,格式为 — 1 —。 - 版记:四号仿宋_GB2312。 ## 函 正式函应包含: - 红色机关头,如 `某单位`,用大号红色方正小标宋简体。 - 机关头下方红色分隔线。 - 分隔线下方为发文字号,通常右对齐,如 `某字〔XXXX〕XX号`。 - 文种标题在文号下方居中。 - 正式标题通常包含发文机关行与事由行。 - 主送机关以 `:` 结尾。 - 正文简洁;复函/无意见函可用:“贵单位关于征求某事项意见的来函收悉。经研究,我单位无意见。特此函复。” - 署名/日期右对齐并留出适当右空;可加联系人行与披露说明,如 `(此件不公开)`。 - 使用套印红头纸时,底部加红色结束线。 ## 请示 / 上行文 正式请示/上行文应包含: - 红色“发文机关名称+文件”红头,如 `某单位文件`,方正小标宋简体。 - 发文字号居左、签发人居右,同处一行;下方红色分隔线。 - 标题通常分为发文机关行与事由行。 - 主送机关以 `:` 结尾。 - 正文以 `妥否,请批示。` 结尾,除非用户禁止或正文已含此句。 - 署名与日期保持在一起。 - 多页/上行文加页码。 - 版记落偶数页:含印发机关与日期,并加分隔线。 ## 报告 - 含标题、主送机关、正文、署名/日期。 - 仅在补全结构且正文缺失时,以 `特此报告。` 结尾。 - 上行报告可在日期下方加联系人行。 ## 附件 - 正文之后空一行。 - 单个附件:`附件:XXX`。 - 多个附件:`附件:1.XXX`,换行后 ` 2.XXX`。 - 附件名换行时与名称首字对齐。 - 每个附件首页左上角以三号仿宋_GB2312 标注 `附件1` / `附件2`。 ## 署名 / 日期 / 版记 - 署名/日期前空约三行。 - 发文机关署名居中排版;成文日期右空四字(右对齐,右边距留约 2.26 厘米)。 - 署名与日期保持在一起;不要用“此页无正文”。 - 版记含抄送、印发机关、印发日期;抄送单位以 `。` 结尾。 - 主送/抄送标点:同一系统用 `、`;不同系统用 `,`。 ## 文字规范 - 使用规范标点:《》、嵌套〈〉、〔〕;不要用 `< >` 代替 `〈〉`。 - 涉密文件:左上角三号黑体标注 `密级★保密期限`。
AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/wing-art/skills/format-official-docx",
"sourceUrl": "https://clawhub.ai/wing-art/skills/format-official-docx",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T09:44:28.436Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-wing-art-format-official-docx/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-wing-art-format-official-docx/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T09:44:28.436Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1.1K downloads",
"href": "https://clawhub.ai/wing-art/format-official-docx",
"sourceUrl": "https://clawhub.ai/wing-art/format-official-docx",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T09:44:28.436Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "1.0.2",
"href": "https://clawhub.ai/wing-art/format-official-docx",
"sourceUrl": "https://clawhub.ai/wing-art/format-official-docx",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-09T08:31:26.327Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-wing-art-format-official-docx/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-wing-art-format-official-docx/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 1.0.2",
"description": "- Removed the sample file skill-card.md. - No changes to features or behavior; documentation updated and streamlined in SKILL.md. - All functionality remains as previously described.",
"href": "https://clawhub.ai/wing-art/format-official-docx",
"sourceUrl": "https://clawhub.ai/wing-art/format-official-docx",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-07-09T08:31:26.327Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
