G

公文排版

Officev1.4.0
By user_2ecc1bb2Updated 2026-11-05gongwenformat-pro@user_2ecc1bb2/gongwenformat-pro
Documents

According to AlphaMoat, as of 2026-10, 公文排版 has 197,606 downloads and 142 stars — ranked by downloads #124 among 10,914 AI skills in this ranking, and #22 of 909 in Office.

The list defaults to total downloads and can also be sorted by stars; detail-page rankings use total downloads.

Downloads
197.6K
Stars
142
Overall download rank
#124
Top 2% overall · Top 3% in Office
PlatformDownloadsStarsComments
SkillHub ↗197.6K142—

Platforms count differently and update at different times.

What this skill does

Following the Chinese national standard GB/T 9704-2012 for official Party and government documents, this skill auto-formats Markdown/TXT/DOCX or chat text into a standard-format Word document: the title uses size-2 Xiaobiaosong centered, hierarchy numbering is auto-detected, and advanced parameters cover the red header, document number, copy number, security level, urgency, signer, primary recipient, notes, and the imprint block (printing authority/date, CC list). PDF export via LibreOffice is also supported.

Profile published 2026-10-29

What you can do with it

  • Format research briefs, speeches, and reporting materials into formal Word documents
  • Apply the GB/T 9704-2012 layout to notices, requests, and reports
  • Add the red header, document number, drafting date, and signature block
  • Configure copy number, security level, urgency, and signer for classified documents
  • Set the imprint block (printing authority, date, CC) and export to PDF

When to use it

  • When a user with finished content asks for a formal document or "help me format this"
  • When given a TXT or non-standard Word file to be reformatted into official style
  • When keywords like official-document formatting, red-header files, or GB/T 9704 appear

Example prompts

Generated from the skill’s documentation as examples; not results of actual runs.

Format this research brief into a standard official document with the red header 'XX Provincial People's Government' and document number X政发〔2026〕12号
Produce an official document with copy number, security level, signer, and primary recipient, then convert to PDF
Reformat this TXT report into Word with the imprint block and CC authorities

Monthly Trend

Downloads197.6K
53.3K130.8K208.3K2026-09 · Downloads 64.0K2026-10 · Downloads 197.6K26-0926-10
Stars142
1251341432026-09 · Stars 1262026-10 · Stars 14226-0926-10
MonthDownloadsMoMStars
2026-10197.6K—142
2026-0964.0K—126

SKILL.md (original)

The author’s original file, shown as plain text without edits or review by AlphaMoat. Links are not clickable; check commands before running them. Fetched 2026-10-23.

5.3 KB · SkillHub v1.4.0
---
name: gongwenformat-pro
description: "党政机关公文标准排版Pro版(GB/T 9704-2012)。将Markdown/TXT/DOCX文本转换为符合国标排版的Word文档。当用户提到以下任何关键词或场景时必须使用此技能:公文排版、标准格式、Word文件、排版、写成Word、生成docx、发文格式、材料排版、红头文件、正式文件、排版成Word、帮我排个版、公文格式、公文、政府文件、机关公文、通知格式、请示格式、报告格式、函的格式、会议纪要排版、发言稿排版、研讨材料排版、汇报材料排版、红头、发文字号、版记、国家标准格式、GB/T 9704、docx排版、word标准格式、帮我做个正式文件、排版发我、转成Word、生成正式文档。也适用于用户写好内容后要求生成正式文件、发来TXT或不标准Word要求重排的场景。"
---

# 党政机关公文标准排版 Pro Skill

依据《党政机关公文格式》国家标准(GB/T 9704-2012),将任意格式文本自动排版为标准公文格式的 Word 文档。

## 何时使用
Show all (129 lines)

- 用户写好了研讨材料、发言稿、汇报材料、通知、请示等,需要生成正式Word文件
- 用户要求"排版"、"标准格式"、"公文格式"、"红头文件"
- 用户说"发给我Word"、"生成docx"、"帮我排个版"
- 用户发来 TXT、不标准的Word文件,要求排成标准格式

## 使用方法

### 第一步:准备输入文件

接收用户发来的文件,或将用户聊天中发的文字保存为文件。

**输入格式支持:**
- **Markdown (.md)**:自动识别 `##` 标题和 `**加粗**` 标记
- **纯文本 (.txt)**:按空行分段,智能识别层级序号
- **Word (.docx)**:提取纯文本后智能识别层级
- **直接文字**:用户在聊天中发的文字,保存为 .txt 后处理

### 第二步:生成Word文件

```bash
python3 <skill-path>/scripts/gongwen_format.py \
  --title "公文标题" \
  --input /tmp/content.md \
  --output /tmp/output.docx
```

基础参数:
- `--title`:公文标题(二号小标宋,居中)
- `--input`:输入文件路径(支持 .md / .txt / .docx)
- `--output`:输出文件路径(支持 .docx 或 .pdf)
- `--format`:输出格式 `docx`(默认)或 `pdf`(需要 LibreOffice)

查看完整参数列表:`python3 <skill-path>/scripts/gongwen_format.py --help`

### 第三步:发送文件

将生成的 `.docx` 文件发送给用户。

## 排版标准与高级参数

详细的排版标准参数(页面设置、字体字号、段落格式、页码、层次序号)、高级参数(红头、发文字号、版记、抄送等)以及注意事项,请查阅:

👉 **`references/gb9704-2012.md`** - GB/T 9704-2012 排版标准参数速查

### 常用高级参数速览

| 参数 | 说明 | 示例 |
|------|------|------|
| `--redhead` | 红头机关名称 | `--redhead "XX省人民政府"` |
| `--doc-number` | 发文字号 | `--doc-number "X政发〔2026〕12号"` |
| `--author` | 发文机关(落款) | `--author "XX镇人民政府"` |
| `--date` | 成文日期 | `--date "2026年4月16日"` |
| `--print-author` | 印发机关(版记) | `--print-author "XX镇人民政府办公室"` |
| `--print-date` | 印发日期(版记) | `--print-date "2026-04-17"` |
| `--cc` | 抄送机关(版记) | `--cc "县委办公室"` |
| `--copies` | 份号(6位数字) | `--copies "000001"` |
| `--secret-level` | 密级和保密期限 | `--secret-level "机密★20年"` |
| `--urgency` | 紧急程度 | `--urgency "特急"` |
| `--signer` | 签发人(上行文) | `--signer "张三"` |
| `--recipient` | 主送机关 | `--recipient "县委办公室"` |
| `--notes` | 附注(可多个) | `--notes "此件公开发布"` |

## 快速示例

用户说:“帮我把这篇研讨材料排成标准格式发给我”

操作步骤:
1. 将用户发来的内容保存为文件(md/txt/docx),或接收用户发送的文件
2. 运行 gongwen_format.py 生成 Word
3. 发送 .docx 文件给用户

### 完整示例(包含所有新要素)

用户说:“帮我排一份涉密公文,要包含份号、密级、签发人、主送机关、附注”

```bash
python3 <skill-path>/scripts/gongwen_format.py \
  --title “关于进一步加强党建工作的通知” \
  --input /tmp/content.md \
  --output /tmp/output.docx \
  --redhead “XX省人民政府” \
  --doc-number “X政发〔2026〕12号” \
  --copies “000001” \
  --secret-level “机密★20年” \
  --urgency “特急” \
  --signer “张三” \
  --recipient “各市、县人民政府,省直各部门:” \
  --author “XX省人民政府” \
  --date “2026年4月26日” \
  --notes “此件公开发布” “联系人:李四,电话:0571-88888888” \
  --print-author “XX省人民政府办公室” \
  --print-date “2026-04-27” \
  --cc “省委办公厅,省人大常委会办公厅,省政协办公厅”
```

### PDF 导出示例

用户说:"帮我排版,要 PDF 格式"

```bash
python3 <skill-path>/scripts/gongwen_format.py \
  --title "关于XXX的实施意见" \
  --input /tmp/content.md \
  --output /tmp/output.pdf
```

也可以用 `--format pdf` 参数:

```bash
python3 <skill-path>/scripts/gongwen_format.py \
  --title "关于XXX的实施意见" \
  --input /tmp/content.md \
  --output /tmp/output.docx \
  --format pdf
```

> ⚠️ PDF 导出需要安装 LibreOffice:`sudo apt install libreoffice-writer`

Popular in Office

腾讯文档 TENCENT DOCSOffice

A full manual for creating, editing, and managing Tencent Docs through MCP.

↓ 2.2M★ 327u_b0de8114
WPS Office 全家桶Office

WPS Office 全家桶 - 四引擎(WPS/MS Office/LibreOffice/纯Python)智能识别用户已安装软件,纯Python模式支持排序/筛选/图表/公式/统计,含文档模板(代码生成)、最佳实践案例、故障排除大章(20+避坑+15 FAQ+15错误ID 统一索引)、自动重试、硬件自适应、环境自检、Skill更新提醒;v5.1新增:kingdoc云端桥接(白名单探测+配置预检+subprocess上传+差异检查)、条件格式/数据验证跨引擎IO(JSON中间格式保真往返)、会议纪要三段式要素化(待办清单+决策记录+风险异议)+说话人标注(MFCC聚类);v5.2新增:公文一键排版(GB/T 9704 规则库约束+结构识别套版+红头预留位+联合行文)、批量水印与敏感信息打码(身份证/手机号/银行卡/邮箱双轨识别+黑色矩形覆盖+打码清单)、跨文档知识检索与问答(本地TF-IDF零依赖+跳转+可选zwjh记忆桥接);删除:与contract-review重复的轻量合同审查模块,改为文档互链引导;v5.2.5修复:MS Office引擎下Excel/PPT创建必然失败(错用Word COM对象),新增get_ms_excel/get_ms_ppt及三槽位统一释放release_ms,MS Office路径透传filepath参数;v5.3.5修复:SKILL.md frontmatter 修复 tags 块序列误混入联系方式行导致标准 YAML 解析失败;v5.4.0新增:留存型功能——定时任务与报告中心(schedule_register 升级为三平台统一调度层 schtasks/cron/launchd,错过策略 skip/run_once,注册表 JSON 可导出导入;新建 report_center.py 报告中心,templates/reports/*.json 参数化模板 + ECharts 单文件 HTML 输出(图表内联、无服务端、双击即开);report_generator 升级支持 --format html;wps.py CLI 统一埋点 SQLite,自动供 report_center 生成周度使用摘要附在报告末尾;watch.py 职责收窄为纯事件采集);v5.3.0新增:统一CLI入口 wps(registry.json注册表分发,office --app/--action 与 convert 子命令、--list 一屏列出全部命令,薄路由层不改脚本内部逻辑)、全命令 --json 机器可读输出(固定 ok/error_id/elapsed/data 四字段,对齐 E001-E015,wps_error.py 新增 emit_json 统一出口)、_worker 启动优化(wps_pure 改惰性加载,pywin32/python-docx/openpyxl 经核查已惰性导入,ENGINE_CACHE 进程级单例复用,COM 释放统一走 release_ms 三槽位)、转换三入口合并为 convert(format_converter/md_converter/wps_docx_to_ppt 内部按目标格式路由,旧脚本保留为兼容别名并提示新命令,v6.0.0 移除)

↓ 766.6K★ 159user_1a470ba8
ppt-generator-skillOffice

A skill that generates PPT decks from a topic and style.

↓ 592.7K★ 346user_3b34947d
秘书材料星公文写作-妙笔skillOffice

体制内资深办公室主任+管理学博士,自学编程开发的智能公文写作Skill,让所有办公室同仁少掉头发、少加无用的班,材料一稿过关,省下的时间留给自己、享受生活!————————我们能给你带来的核心价值:1、颠覆传统写作:逻辑建模38类公文全链条,特有模板化引导问答模式,分分钟省心生成高质量大稿。--------2、替你“向上管理”:独有审稿人画像机制,文稿一键结构性修改,精准匹配审稿人画像,过稿率提升至少10倍!----------3、‌杜绝AI编造:缺失的数字、文号、人名、日期一律用[待补]标注,绝不杜撰,守住公文底线。-----------4、‌算法格式托底:数十万全量智控知识库+6500行前沿核心控制代码,格式精准对齐GB/T 9704,出稿零失误。——————————————————本skill历史版本开放了5%知识库的免费试用版,下载即可使用,但需注意:知识库有著作权,仅用于个人使用,不可用于其他任何目的。有兴趣的可以试试。——————————————————————单次付费版skill已发布,2元一次使用全量知识库。具体在发布者“熵衍信息”主页skill里。

↓ 578.4K★ 46u_70fc650d
WPS Office 全家桶Office

WPS Office 全家桶 - 四引擎(WPS/MS Office/LibreOffice/纯Python)智能识别用户已安装软件,纯Python模式支持排序/筛选/图表/公式/统计,含文档模板(代码生成)、最佳实践案例、故障排除大章(20+避坑+15 FAQ+15错误ID 统一索引)、自动重试、硬件自适应、环境自检、Skill更新提醒;v5.0新增:定时任务注册管理(schtasks/crontab)、目录轮询监听(YAML规则+大文件分片)、使用统计与稳定性中心(SQLite埋点+引擎健康+引擎偏好)、COM三步自愈(regsvr32→修复安装→手动指引)、对话式数据查询(NL2SQL式意图解析+查询计划+连续追问)、multi-agent编排引擎桥接(白名单探测+流水线模板注册)

↓ 508.0K★ 4user_814dbe54
WPS全家桶·办公管家.SkillOffice

WPS/MS Office/LibreOffice/纯Python 四引擎智能办公全家桶:文档/表格/PPT/公文/会议纪要一体化。

↓ 429.5K★ 2user_185644ed
腾讯文档在线协作自动化Office

通过 Tencent Docs Open API 以 curl + jq 创建、读取、列出、搜索和管理腾讯文档的自动化工作流,覆盖在线文档、在线表格、幻灯片、思维导图、流程图、智能表格与收集表七种类型,支持读取元数据与单元格区域、上传图片、创建副本,并对重命名/移动/删除等写操作强制先经用户确认。Use when the user 提到腾讯文档 / Tencent Docs / docs.qq.com、粘贴 docs.qq.com 链接,或想在其腾讯文档空间中创建、读取、整理文档时使用。Triggers include 腾讯文档、在线文档、在线表格、思维导图、流程图、智能表格、收集表。如需文案写作完整工作流套件,淘宝搜索「AI灵匣」店铺获取完整版。

↓ 428.1K★ -u_1ea983ac
kdocs skillOffice

The official skill for working with Kdocs cloud documents through kdocs-cli.

↓ 424.1K★ 128user_5ea84866

Data as of 2026-10. Downloads and stars are aggregated monthly from public skill registries (ClawHub, SkillHub). See data methodology.