Skip to content

duyunzhoudyz/dyz-gongwen-skills / skills/gongwen-format

gongwen-format

Verified

按 GB/T 9704-2012 把公文正文排成 Word,有红头、信函、纪要、命令(令)、白头、材料、简报七种版式,支持联合行文版头、附件另面、预印红头纸套打;检查、修复 docx 的页边距、字体、行距、页码;把核稿意见写成 Word 批注;无 Python 时给手动设置清单。用户说“排版”“套红头”“转成 Word”“按国标调格式”“格式乱了帮我改”“页码怎么设”时使用。只管格式不改内容:起草转对应起草 skill,压缩改写转 gongwen-polish,去 AI 味转 gongwen-humanize,去免责对冲转 gongwen-direct,核稿转 gongwen-review。

FileKindSize
README.mdmarkdown10.0 KB
SKILL.mdskill md21.1 KB
assets/gbt9704_params.jsonconfig20.0 KB
evals/evals.jsonconfig18.7 KB
evals/files/交接卡-平安建设总结-正文.txtmarkdown965 B
evals/files/信函-正文.txtmarkdown611 B
evals/files/信函-版式信息.jsonconfig166 B
evals/files/医院-单位画像.mdmarkdown805 B
evals/files/医院-院内通知-正文.txtmarkdown700 B
evals/files/卫健简报-两篇稿件.txtmarkdown1016 B
evals/files/国企-单位画像.mdmarkdown624 B
evals/files/国企-通知-正文.txtmarkdown646 B
evals/files/学校-监考安排-正文.txtmarkdown688 B
evals/files/学校-通知-正文.txtmarkdown585 B
evals/files/年终总结-正文.txtmarkdown1.2 KB
evals/files/核稿意见.jsonconfig1.4 KB
evals/files/格式混乱的情况报告.docxbinary36.3 KB
evals/files/涉密材料-正文.txtmarkdown221 B
evals/files/白头请示-正文.txtmarkdown701 B
evals/files/社区-情况报告-正文.txtmarkdown577 B
evals/files/简报-正文.txtmarkdown1.0 KB
evals/files/简报-版式信息.jsonconfig364 B
evals/files/红头通知-正文.txtmarkdown1.5 KB
evals/files/红头通知-版式信息.jsonconfig284 B
evals/files/纪要-正文.txtmarkdown910 B
evals/files/纪要-版式信息.jsonconfig119 B
evals/files/请示-缺落款-正文.txtmarkdown339 B
evals/files/高校-单位画像.mdmarkdown509 B
evals/files/高校-请示-正文.txtmarkdown603 B
evals/trigger.jsonconfig1.9 KB
manifest.jsonconfig976 B
references/_shared/README.mdmarkdown110 B
references/_shared/guardrails.mdmarkdown12.6 KB
references/_shared/profiles/roles.mdmarkdown16.1 KB
references/_shared/profiles/units/dangzheng.mdmarkdown7.9 KB
references/_shared/profiles/units/gaoxiao.mdmarkdown11.2 KB
references/_shared/profiles/units/guoqi.mdmarkdown12.7 KB
references/_shared/profiles/units/jiceng.mdmarkdown9.3 KB
references/_shared/profiles/units/shequ.mdmarkdown8.8 KB
references/_shared/profiles/units/yiyuan.mdmarkdown13.2 KB
references/_shared/profiles/units/zhongxiaoxue.mdmarkdown10.6 KB
references/_shared/rules/doc-types.mdmarkdown28.1 KB
references/_shared/rules/gbt15834.mdmarkdown13.3 KB
references/_shared/rules/gbt15835.mdmarkdown10.6 KB
references/_shared/rules/gbt9704.mdmarkdown17.2 KB
references/_shared/rules/jianfu.mdmarkdown12.5 KB
references/_shared/rules/tiaoli.mdmarkdown15.3 KB
references/_shared/style/ai-tone.mdmarkdown10.2 KB
references/_shared/style/defensive.mdmarkdown8.1 KB
references/_shared/style/output-format.mdmarkdown9.0 KB
references/check-items.mdmarkdown16.1 KB
references/layouts.mdmarkdown20.8 KB
references/manual-setup.mdmarkdown13.9 KB
references/meta-fields.mdmarkdown11.6 KB
scripts/annotate_docx.pyscript9.7 KB
scripts/build_docx.pyscript76.1 KB
scripts/check_docx.pyscript74.7 KB
scripts/extract_docx.pyscript16.2 KB
scripts/fix_docx.pyscript28.3 KB
scripts/gw_docx.pyscript50.0 KB
scripts/gw_fonts.pyscript24.2 KB
scripts/gw_format.pyscript15.9 KB
scripts/gw_layout.pyscript56.6 KB
scripts/gw_verify.pyscript6.1 KB
scripts/preview_docx.pyscript11.1 KB
scripts/secret_check.pyscript8.9 KB

references/_shared/rules/gbt15835.md

View on GitHub
# GB/T 15835-2011《出版物上数字用法》公文相关要点

> - 来源:GB/T 15835-2011《出版物上数字用法》,国家质量监督检验检疫总局、国家标准化管理委员会 2011-07-29 发布,2011-11-01 实施,代替 GB/T 15835-1995。核对所用为公开转载的正式文本,北京大学发布的报批稿作对照。
> - 版本:现行,推荐性国家标准。第 1 章写明政府和企事业单位公文可参照执行;GB/T 9704-2012 第 9 章要求公文数字用法符合本标准。
> - 核验日期:2026-10-16
> - 本文件为要点整理,不替代原文。括号内为条款号;正误示例多为本项目自拟。

## 目录

一、优先级:与 GB/T 9704 的关系
二、数字形式的选用(第 4 章)
三、阿拉伯数字的写法(5.1)
四、汉字数字的写法(5.2)
五、两种数字同时使用(5.3)
六、公文场景速查
七、可机检规则

## 一、优先级:与 GB/T 9704 的关系

1. 公文的数字用法先看 GB/T 9704-2012 的专门规定,再看本标准。二者不一致时以 GB/T 9704 为准。
2. 已知的差异:

| 事项 | 本标准 | GB/T 9704-2012 | 公文执行 |
|---|---|---|---|
| 月、日为一位数 | 可在数字前补“0”(5.1.4,用于“2008-08-08”这类扩展格式) | 成文日期、印发日期月日不编虚位(7.3.5.4、7.4.3) | 2026年1月5日,不写 2026年01月05日 |
| 发文字号顺序号 | 未规定 | 不编虚位,不加“第”(7.2.5) | 某发〔2026〕5号 |
| 成文日期数字形式 | 年月日阿拉伯数字、汉字数字均可(4.3) | 用阿拉伯数字(7.3.5.4) | 2026年10月16日 |

3. 本标准不再强调优先使用阿拉伯数字(前言),按“得体”和“同类别同形式”选择。

## 二、数字形式的选用(第 4 章)

| 编号 | 情形 | 选用 | 条款 | 公文示例 |
|---|---|---|---|---|
| N-01 | 计量:加减乘除运算的数、带计量单位的数、百分数、比例 | 阿拉伯数字 | 4.1.1 | 增长13.8%;面积415平方米 |
| N-02 | 编号:电话、门牌、文号、章节号、型号等 | 阿拉伯数字 | 4.1.2 | 某发〔2026〕5号;第3号楼 |
| N-03 | 已定型的含阿拉伯数字的词语 | 阿拉伯数字 | 4.1.3 | 5G基站;“3·15”消费者权益日 |
| N-04 | 干支纪年、农历月日、历史纪年等非公历纪年 | 汉字数字 | 4.2.1 | 正月初五;腊月二十三 |
| N-05 | 数字连用的概数、含“几”的概数 | 汉字数字 | 4.2.2 | 三四个月;十几个;几千人 |
| N-06 | 已定型的含汉字数字的词语、缩略语 | 汉字数字 | 4.2.3 | 一律;一方面;五四运动 |
| N-07 | 数字不多、两种写法无明显差异 | 均可,全文统一 | 4.3 | 3倍/三倍;约700人/约七百人;第5个工作日 |
| N-08 | 突出简洁醒目 | 阿拉伯数字 | 4.3 | 北京时间2026年10月16日9时 |
| N-09 | 突出庄重典雅 | 汉字数字 | 4.3 | 第五届职工代表大会第三次会议(不写“第5届职代会第3次会议”) |
| N-10 | 同一场合同类别、同层级的数字 | 形式一致 | 4.3 | 第一章、第二章……第十二章(不写“第12章”) |
| N-11 | 相邻两个阿拉伯数字可能产生歧义 | 改写避免 | 4.3 | 高三3个班;高三(2)班(不写“高33个班”“高32班”) |
| N-12 | 有法律效力的文件、财务文件 | 可同时用汉字和阿拉伯数字 | 4.3 | 合同金额35.5万元(叁拾伍万伍仟元) |

## 三、阿拉伯数字的写法(5.1)

| 编号 | 要点 | 条款 | 正 | 误 |
|---|---|---|---|---|
| N-13 | 四位以上的数可用千分撇“,”或千分空分节;四位以内可不分节 | 5.1.1 | 12,345 或 12 345;3600 | |
| N-14 | 纯小数写出小数点前的“0”,小数点用实心点“.” | 5.1.2 | 0.46 | .46;0。46 |
| N-15 | 数值范围用浪纹线“~”或一字线“—” | 5.1.3 | 100~150千克;400—429页 | 100-150千克 |
| N-16 | 范围前后单位相同、不引起歧义时,可省略前一个数值的计量单位 | 5.1.3 | 100~150kg | |
| N-17 | 带“万”“亿”的范围,两端都写全 | 5.1.3 | 9亿~16亿;13万元~17万元 | 9~16亿;13~17万元 |
| N-18 | 百分数范围,两端都写“%” | 5.1.3 | 15%~30% | 15~30% |
| N-19 | 科学记数法范围,两端都写全 | 5.1.3 | 4.3×10⁶~5.7×10⁶ | 4.3~5.7×10⁶ |
| N-20 | 年月日按自然顺序写 | 5.1.4 | 2026年10月16日 | |
| N-21 | 年月日可用“-”替代,年月日不完整时不能替代 | 5.1.4 | 2026-10-16;10月16日 | 10-16;2026-10 |
| N-22 | 四位年份不简写为两位 | 5.1.4 | 2026年 | 26年 |
| N-23 | 时分秒按自然顺序,可用 12 或 24 小时制,“时”“分”可用“:”替代 | 5.1.5 | 15时40分;15:40 | |
| N-24 | 含月日的专名用阿拉伯数字时,月日间用间隔号,前后加引号 | 5.1.6 | “6·26”国际禁毒日 | 6·26国际禁毒日;“6.26”国际禁毒日 |
| N-25 | 阿拉伯数字一般用半角(二分字身) | 5.1.7.1 | 2026 | 2026 |
| N-26 | 一个数值写在同一行内,不断开 | 5.1.7.2 | | |

## 四、汉字数字的写法(5.2)

| 编号 | 要点 | 条款 | 正 | 误 |
|---|---|---|---|---|
| N-27 | 两个数字连用表示概数,中间不用顿号 | 5.2.1 | 三五天;一两个小时;四十五六岁 | 三、五天 |
| N-28 | 汉字年份简写后可能被理解为概数的,一般不简写 | 5.2.2 | 一九七八年 | 七八年 |
| N-29 | 汉字表示的含月日专名,一月、十一月、十二月用间隔号,其他月份不用 | 5.2.3 | “一·二八”事变;“一二·九”运动;五一国际劳动节 | “五·一” |
| N-30 | 法律文书和财务票据用大写数字:零壹贰叁肆伍陆柒捌玖拾佰仟万亿 | 5.2.4 | 叁仟伍佰零肆元 | |
| N-31 | “0”用作计量写“零”,用作编号(含年份)写“○” | 5.2.5 | 三千零五十二;二○二六年 | 三千○五十二;二零二六年 |

说明:标准印刷形式为“○”(U+25CB)。计算机录入时常用“〇”(U+3007),本项目机检把二者都视为正确,只报“零”、字母“O”和数字“0”。这是工具处理约定,不是标准原文。

## 五、两种数字同时使用(5.3)

| 编号 | 要点 | 条款 | 正 | 误 |
|---|---|---|---|---|
| N-32 | 数值很大时,“万”“亿”可用汉字,其余用阿拉伯数字 | 5.3 | 4.7亿元;10亿零817万5288人 | |
| N-33 | 除上述情况外,一个数值不能混用两种数字 | 5.3 | 四千;4000;一百零八 | 4千;1百零8;一百08 |

## 六、公文场景速查

| 场景 | 推荐写法 | 依据 |
|---|---|---|
| 成文日期、印发日期 | 2026年10月16日 | GB/T 9704 7.3.5.4、7.4.3 |
| 发文字号 | 某发〔2026〕5号 | GB/T 9704 7.2.5 |
| 层次序数 | 一、(一)1.(1) | GB/T 9704 7.3.3 |
| 统计数据、金额、百分比 | 阿拉伯数字:完成投资4.3亿元,同比增长9.3% | 4.1.1、5.3 |
| 百分数、万亿范围 | 15%~30%;9亿~16亿 | 5.1.3 |
| 概数 | 三四家;十几个;一百多人;近千人 | 4.2.2、5.2.1 |
| 约数加“多”“余”“左右” | 100多件/一百多件;20余次;700人左右 | 4.3 |
| 会议届次、庄重表述 | 第五届职工代表大会第三次会议 | 4.3 |
| 年度区间 | 2026—2028年;2026年至2028年 | 5.1.3;GB/T 15834 4.13.3.2 |
| 年份 | 2026年,不写26年 | 5.1.4 |
| 星期、成语、惯用语 | 星期五;一律;一方面 | 4.2.3 |
| 汉字年份 | 二○二六年(或二〇二六年) | 5.2.5 |

说明:“约700人左右”“大约近百人”属于语义重复,不是本标准条款,机检可作为文风问题给 P2 提示。

## 七、可机检规则

编号只在本文件内使用,`lint_rules.json` 的 ID 由脚本作者另定。级别为建议值。

1. **NU-01 年份不简写**(5.1.4,P1)
   - 正:`2026年` 反:`26年`、`’26年`
   - 思路:`(?<![\d〇○零一二三四五六七八九])[’']?\d{2}年(?!\d)`;排除“26年来”“近20年”等表示时长的情况(前面是“近”“约”“多”“这”或后面是“来”“间”“内”的不报)。
2. **NU-02 万、亿范围两端写全**(5.1.3,P1)
   - 正:`9亿~16亿` 反:`9~16亿`、`13-17万元`
   - 思路:`\d+(\.\d+)?\s*[~~—\--]\s*\d+(\.\d+)?\s*[万亿]`
3. **NU-03 百分数范围两端都写%**(5.1.3,P1)
   - 正:`15%~30%` 反:`15~30%`
   - 思路:`\d+(\.\d+)?\s*[~~—\--]\s*\d+(\.\d+)?\s*[%%]`,且前一个数后没有“%”。
4. **NU-04 概数不加顿号**(5.2.1,P1)
   - 正:`三五天` 反:`三、五天`
   - 思路:与 `references/_shared/rules/gbt15834.md` PU-05 合并实现。
5. **NU-05 阿拉伯数字与汉字数字混写**(5.3,P1)
   - 正:`四千`、`4000`、`4.7亿` 反:`4千`、`1百零8`、`3百万`
   - 思路:`\d+\s*[十百千](?![米克瓦伏帕焦赫])`;后接“万”“亿”的合法写法(`\d+万`、`\d+亿`)不报;“千米”“千克”等单位排除。
6. **NU-06 纯小数补零**(5.1.2,P1)
   - 正:`0.46` 反:`.46`
   - 思路:`(?<![\d.])\.\d+`;网址、文件扩展名上下文排除。
7. **NU-07 全角数字**(5.1.7.1,P1)
   - 正:`2026` 反:`2026`
   - 思路:`[0-9]`
8. **NU-08 日期不用不完整的短横线格式**(5.1.4,P1)
   - 正:`10月16日` 反:`10-16`(表示日期时)
   - 思路:`(?<![\d-])(1[0-2]|0?[1-9])-(3[01]|[12]\d|0?[1-9])(?![\d-])`,结合上下文“于”“在”“截至”等提示词,误报多,建议 P2。
9. **NU-09 汉字年份中的“零”**(5.2.5,P1)
   - 正:`二○二六年`、`二〇二六年` 反:`二零二六年`、`二O二六年`
   - 思路:先匹配 `[一二][〇○零O0一二三四五六七八九]{3}年`,片段中含“零”“O”“0”的报。
10. **NU-10 庄重表述中的阿拉伯数字**(4.3,P2)
    - 正:`第五届职工代表大会第三次会议` 反:`第5届职代会第3次会议`
    - 思路:`第\d+届[^,。]{0,20}第\d+次(会议|全体会议|大会)`
11. **NU-11 月日虚位**(GB/T 9704 7.3.5.4,P0/P1)
    - 与 `references/_shared/rules/gbt9704.md` G9-05 合并实现。
12. **NU-12 同一文件日期写法不统一**(4.3,P2,函数实现)
    - 反:正文中既有“2026年10月16日”又有“2026-10-16”“2026.10.16”。
    - 思路:统计三种日期格式出现次数,多于一种时提示;“2026.10.16”这种点号分隔不在标准列举中,单独给 P2。
13. **NU-13 “约”与“左右”“上下”重复**(文风,P2)
    - 反:`约700人左右`
    - 思路:`(约|大约|大概)[^,。;]{0,10}(左右|上下)`
canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.Stars: 198kUpdated Claude CodeCodexVerifiedInstall