Back to search
gongwen-draft
SkillGitHub
中文公文与政务材料写作 Agent skill
Safety scan
A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.
Checked today
Badge for your README
Markdown
[](/listings/rimagination--gongwen-draft)HTML
<a href="/listings/rimagination--gongwen-draft"><img src="/api/listings/rimagination--gongwen-draft/badge.svg" alt="findsafeskills safety rating" /></a>Install
i
What was scanned
The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.
SKILL.md · Manifest · 106 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- ---
- name: gongwen-draft
- description: Draft, revise, polish, review, lint, and export Chinese党政机关公文 and政务材料 with authority-first guardrails, policy-research/citation checking, material dossier/fact-ledger intake, language polishing, controlled Markdown/JSON specs, offline prompt-pack generation, strict official-document font checks, and optional Word .docx generation with generic red-head draft headers when authorized values are supplied. Use when the user asks for gongwen-draft, 公文, 公文写作, 公文起草, 机关文稿, 政务写作, 政策检索, 政策依据, 引用核验, 领导讲话, 会议精神, 素材收集, 素材整理, 事实台账, 语言润色, 通知, 请示, 报告, 函, 纪要, 通报, 批复, 意见, 决定, 公告, 通告, 工作总结, 工作方案, 调研报告, 汇报材料, 简报, 情况专报, 讲话稿, 回复函, 材料改写, 公文润色, 格式审核, Word公文导出, 离线提示词, JSON公文规格, 红头版头, 发文机关标志, 发文字号, 签发人, or to turn notes into formal official-style Chinese documents.
- ---
- # Gongwen Draft
- Use this skill to produce practical,规范、准确、克制的中文公文和机关材料. The stable skill/repository name is `gongwen-draft`.
- Treat the gathered local references as guidance, not as permission to invent facts, policies, authority, signatures, seals, dates, document numbers, or data.
- ## Quick Workflow
- 1. Identify the task: `draft`, `revise`, `review`, `format`, `template`, `extract`, `export`, or `training`.
- 2. Apply four-position routing: 文种 -> 行文方向 -> 格式/交付 -> 语言口径.
- 3. For policy-sensitive tasks, run policy research first: official source search -> citation ledger -> citation check -> draft.
- 4. For messy materials, build a dossier with `scripts/prepare_dossier.py` or maintain a fact ledger: `已确认事实`, `用户判断`, `待核实`, `建议措辞`.
- 5. Check five anchors: purpose, audience, facts, structure, tone.
- 6. If key facts are missing, either ask 1-3 focused questions or produce a fillable skeleton with bracketed placeholders.
- 7. Draft with this order: define purpose -> choose文种 -> verify sources -> structure content -> write concise body -> self-review -> lint/export if requested.
- 8. For source-sensitive claims, cite or ask for the specific policy/source. Do not fabricate policy basis, statistics,领导讲话,会议精神, or official decisions.
- ## Load References As Needed
- - For workflow routing, export behavior, and lessons absorbed from GitHub projects, read `references/engineering-workflow.md`.
- - For quick command shapes, source modes, material boundaries, export sequencing, and versioning, read `references/operation-contract.md`.
- - For the comparative learning summary of public `gongwen-writing` projects, read `references/project-lessons.md`.
- - For explicit community project citations and what was learned from each, read `references/citations.md`.
- - For the product quality bar and user expectations this skill should meet, read `references/quality-bar.md`.
- - For legal/制度底线 and official document types, read `references/core-rules.md`.
- - For messy source materials, source hierarchy, and auditable fact ledgers, read `references/material-workflow.md`.
- - For current policy, laws, official releases,领导讲话, meeting communiques, and citation ledgers, read `references/policy-research.md`.
- - For concrete templates and section structures, read `references/document-types.md`.
- - For writing method, style, revision strategy, and avoiding空心公文, read `references/writing-method.md`.
- - For language polishing modes, empty wording, overclaiming, and official tone repair, read `references/language-polishing.md`.
- - For punctuation, colon, quotation marks, hierarchy markers, and avoiding English punctuation in Chinese prose, read `references/punctuation-style.md`.
- - For reviewing an existing draft, read `references/review-checklist.md`.
- - For strict公文字体 checks, official font channels, and authorized font assets, read `references/font-policy.md`.
- - For controlled Markdown/JSON and Word output conventions, read `references/format-output.md`.
- - For provenance of the local materials used to build this skill, read `references/source-index.md`.
- ## Drafting Standards
- - Write from the institution's position, not the author's personality.
- - Prefer facts, responsibilities, timelines, measures, and enforceable wording over slogans.
- - Keep language accurate, plain, and actionable. Avoid empty排比, over-grand claims, vague adjectives, and unsupported成果.
- - Use Chinese full-width punctuation in Chinese prose; follow `一、` -> `(一)` -> `1.` -> `(1)`, use `:` not `:`, and use `“”` / `‘’` not straight English quotes.
- - Match文种 to行文关系: 上行 usually 请示/报告; 下行 usually 通知/通报/批复/意见; 平行 or non-subordinate usually 函.
- - Keep one main matter per request when drafting请示. Do not mix report and request functions.
- - Use placeholders like `[发文机关]`, `[日期]`, `[依据文件名称]` when facts are unknown.
- - For current policy or领导讲话 claims, use official-source citation ledgers. Authoritative media can be background or discovery leads, not a replacement for official policy originals.
- - Preserve confidentiality: if user content appears涉密 or sensitive, warn and draft only with sanitized placeholders.
- - Separate content drafting from formal issuance: do not add red headers, document numbers, signatories, seals, or approval language unless the user supplied authorized values or placeholders and the task is only preparing a draft.
- - Prefer the user's current unit template over generic GB/T-style defaults when the user provides a template.
- ## Lint And Export
- - Before exporting, form a clean Markdown draft. Avoid Markdown tables, bold markers, block quotes, and decorative bullets unless the user requested an informal reading draft.
- - If using JSON spec, run `scripts/render_spec.py <spec.json> -o <draft.md>` before lint/export.
- - For offline assistants or web chat tools that cannot install skills, run `scripts/build_prompt_pack.py --doc-type <doc-type> --task <task> -o <prompt.md>` and paste the generated prompt pack into the target tool.
- - For multiple raw material files, run `scripts/prepare_dossier.py <materials...> --task <task> -o <materials.md>` before drafting, then draft from the dossier.
- - For policy-sensitive topics, run `scripts/policy_research.py --topic <topic> -o <policy-ledger.md>`, fill the ledger from official sources, then run `scripts/check_citations.py <policy-ledger.md> --require-citations`.
- - Run `scripts/check_sections.py <doc-type> <draft.md>` when reviewing or before file export.
- - Run `scripts/check_citations.py <draft.md>` when the draft includes policy依据,法律法规,领导讲话,会议精神, official data, or standards.
- - Run `scripts/check_language.py <draft.md>` when polishing, removing AI-like wording, or reviewing high-stakes drafts.
- - Run `scripts/check_fonts.py --verify-assets` after changing bundled fonts, then run `scripts/check_fonts.py --draft <draft.md>` before Word export. If authorized font files are in `assets/fonts`, use `--install-assets`.
- - Run `scripts/generate_docx.py <draft.md> -o <output.docx> --doc-type <doc-type> --install-font-assets` when the user asks for Word output. The script creates `-vNN` files instead of overwriting unless `--overwrite` is explicit.
- - Run `scripts/check_type_consistency.py` after changing document types, templates, README coverage language, or lint document-type lists.
- - Run `scripts/self_test.py` after modifying any script to verify basic correctness of all helper modules.
- - For generic红头版头 output, use controlled front matter such as `issuer_mark`, `doc_number`, and `issue_person`; never invent real机关名称、发文字号、签发人、印章 or approval status.
- - Do not silently replace required公文字体 with generic fonts. If fonts are missing, stop and use official/authorized channels.
- - If Python lacks `python-docx`, install or use the bundled workspace Python/libraries when available.
- - Keep generated files outside the skill folder unless the user explicitly asks otherwise.
- - If the user asks for a deliverable but not the format, ask whether they want Markdown or Word `.docx`.
- - Community projects inspired this workflow; cite them when explaining the design or publishing derivative project documentation.
- ## Output Patterns
- When drafting from scratch, provide:
- 1. A finished draft in formal Chinese.
- 2. A short note listing assumptions/placeholders.
- 3. Optional review suggestions if the user asked for polish or compliance.
- When reviewing or revising, provide:
- 1. Main issues by severity.
- 2. Revised draft or targeted edits.
- 3. A checklist of remaining facts the user must confirm.
- When exporting, provide:
- 1. The generated file path.
- 2. Lint findings or a short "no high-risk issue found" note.
- 3. Placeholders or facts that still require human confirmation.
- ## Do Not
- - Do not impersonate a real office, signatory, seal, or official approval.
- - Do not invent legal basis, policy language, statistics, meeting outcomes, or document numbers.
- - Do not quote long passages from reference articles. Summarize methods and cite source names where useful.
- - Do not treat training articles or转载文章 as normative documents. Use official regulations and standards first.
- - Do not copy another public project's long rules verbatim into outputs. Use inspected projects as engineering reference only.
- - Do not confuse near-synonyms common in公文: `制定/制订`, `截至/截止`, `权利/权力`, `受权/授权`, `决定/决议`, `公告/通告`, `批复/复函`. When in doubt, check `review-checklist.md` Section F or the governing regulation.
- - Do not use abbreviated or informal names for行政区域, institutions, or official positions without the full formal name being established first in the same document.
- - Do not remove community citations merely because a rule has been rewritten locally; provenance should remain visible.
README.md · README · 154 lines
View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)
- 
- # gongwen-draft
- gongwen-draft 是一个中文公文与政务材料写作 Agent skill,用于起草、改写、审核、政策核验和 Word 草稿导出。
- 本项目的目标是在事实、文种、权限、格式、字体、标点、政策引用和输出流程上尽量减少常见风险。核心工作方式是:**先查、先核、再写**。
- ## 支持范围
- gongwen-draft 支持 23 种公文与政务材料写作样式:15 种法定公文文种,另含调研报告等 8 类常见机关材料。
- **法定公文(15 种,完整支持)**
- 覆盖《党政机关公文处理工作条例》规定的全部法定文种:决议、决定、命令(令)、公报、公告、通告、意见、通知、通报、报告、请示、批复、议案、函、纪要。
- **扩展政务材料(8 类常见机关材料)**
- 支持工作总结、工作方案、调研报告、讲话稿、汇报材料、简报、情况专报、回复函。
- ## 推荐搭配的 Agent 工具
- <img src="assets/agent-logos/qoder.png" alt="Qoder" width="20" height="20" align="absmiddle"> [QoderWork CN / Qoder CN](https://www.aliyun.com/product/lingma):适合中文办公、材料整理和写作工作流。
- <img src="assets/agent-logos/zcode-official.png" alt="ZCode" width="20" height="20" align="absmiddle"> [ZCode](https://zcode.z.ai/):适合技能维护、长任务和深度调整。
- <img src="assets/agent-logos/workbuddy.svg" alt="WorkBuddy" width="20" height="20" align="absmiddle"> [WorkBuddy](https://www.codebuddy.cn/work/):适合办公场景、多任务执行和交付型工作。
- ## 快速使用
- 请帮我安装这个 skill:https://github.com/Rimagination/gongwen-draft
- 安装后在对话中说”使用 gongwen-draft”即可。以下是四种典型用法:
- **示例 1:起草通知**
- ```text
- 请帮我把下面的会议要点整理成一份通知初稿。
- 会议主题:部署夏季防汛工作
- 会议决定:各街道6月30日前完成排水管网排查;水利局7月10日前修订防汛预案;应急管理局落实24小时值班
- 发文机关:XX区人民政府办公室
- 主送机关:各街道办事处、区直有关部门
- ```
- **示例 2:审核请示**
- ```text
- 请帮我审核这份请示的文种、标点、行文关系和政策引用有没有问题,再给一版改写稿。
- [粘贴草稿]
- ```
- **示例 3:撰写工作方案并导出 Word**
- ```text
- 请帮我根据下面的工作要求,写一份社区网格化管理工作方案,完成后导出为 Word 文件,按公文格式排版。
- 工作目标:年底前实现全区社区网格化管理全覆盖
- 主要任务:划分基础网格、配备网格员、建立信息采集和事件流转机制、接入区级指挥平台
- 责任分工:民政局牵头,各街道具体落实,财政局保障经费
- [粘贴详细素材]
- ```
- **示例 4:指定生成红头样式 Word 草稿**
- 默认导出 Word 草稿时不会生成红头版头。需要红头样式时,请明确说明,并提供发文机关标志、发文字号等授权信息或占位符;签发人通常只在上行文等确需标注时填写。
- ```text
- 请使用 gongwen-draft,起草《关于做好夏季防汛准备工作的通知》,并导出带红头样式的 Word 草稿。发文机关标志用“XX区人民政府办公室文件”,发文字号先写“〔由用户单位填写〕”,本通知不填写签发人。主送机关为各街道办事处、区直有关部门;主要事项包括排查排水管网、修订防汛预案、落实24小时值班。请不要生成印章,不要编造真实发文字号、签发人或审批状态。
- ```
- ## 能做什么
- - 起草和改写:把会议记录、工作要点、调研材料整理成规范初稿。
- - 政策研究:优先检索中国政府网、国务院部门官网、国家法律法规数据库、地方政府官网等权威来源。
- - 引用核验:区分政策原文、官方解读、领导讲话、会议通稿、权威媒体背景材料和普通转载材料。
- - 审核纠错:检查文种、行文关系、权限边界、事实、结构、标点、层级序号、附件说明和涉密风险。
- - 语言润色:压缩空泛表达,降低夸大口吻,保留原有事实和单位口径。
- - Word 导出:默认按普通公文草稿排版;仅在明确指定红头版头并提供授权字段或占位符时生成红头样式,导出前检查字体,不静默替换。
- ## 相比同类项目的优势
- 很多同类项目已经覆盖文种、模板、格式规范或 Word 导出。gongwen-draft 的重点是把这些能力连成一条完整工作流,让用户从素材进入到草稿交付都有明确步骤和校验点。
- | 能力 | gongwen-draft 的做法 |
- | --- | --- |
- | 完整流程 | 按“政策核验、素材台账、文种判断、起草润色、风险审核、Word 导出”的顺序推进,适合真实办公场景。 |
- | 先核后写 | 涉及政策依据、领导讲话、会议精神和统计数据时,通过 policy-research 和 citation checker 先形成引用台账,再进入正文写作。 |
- | 材料可追溯 | 多份素材先拆成来源、事实、判断、待核实事项和起草风险,避免把未经确认的内容写成结论。 |
- | 审核可执行 | 审核范围覆盖文种、权限、事实、标点、层级序号、格式、字体和涉密风险,输出具体修改点。 |
- | 交付可落地 | 支持按公文习惯导出 Word 草稿,并在导出前检查字体;缺少关键字体时停止导出。 |
- | 发布可验证 | 内置脚本和 CI 检查文种覆盖、语言风险、政策引用、字体资产和导出流程,方便持续维护。 |
- ## 政策引用规则
- 正文政策依据优先来自 [中国政府网](https://www.gov.cn/)、[国家法律法规数据库](https://flk.npc.gov.cn/)、国务院部门官网、地方政府官网和其他官方公开发布平台。
- 人民日报、新华社、央视、半月谈等权威媒体可以作为背景材料或线索;写入正式依据前,应尽量回到官方原文核验。
- 找不到官方来源的政策、领导讲话、会议精神、统计数据和强制性要求,应标为“待核实”,不能写成确定依据。
- ## Word 与字体配置
- 默认字体配置:
- | 用途 | 默认字体 |
- | --- | --- |
- | 发文机关标志、标题 | 方正小标宋简体 |
- | 正文、三级和四级标题 | 仿宋\_GB2312 |
- | 一级标题 | 黑体 |
- | 二级标题、签发人姓名 | 楷体\_GB2312 |
- | 页码 | 宋体 |
- 导出前会检查本机字体。缺少字体时,gongwen-draft 会停止导出并提示补齐;如果项目随附字体资产且用户具备使用授权,可按项目规则安装到当前 Windows 用户环境。
- Word 文件通常只记录字体名称,不一定嵌入字体文件。跨设备使用时,对方电脑也需要安装相同字体。
- ## 使用红线
- - 不伪造、冒用或模拟真实机关的正式发文,包括机关名称、发文字号、签发人、印章和审批意见。
- - 不编造政策依据、统计数据、会议结论、领导讲话或审批状态。
- - 不把转载文章、培训材料、社区项目或搜索摘要当作制度依据。
- - 涉密、个人敏感、处分、人事、财政资金、行政处罚等材料应先脱敏,并按单位流程审核。
- - 生成内容只是草稿,正式发文前仍需完成审核、会签、签发和保密审查。
- ## 参考来源
- 本项目优先参考 GB/T 9704-2012《党政机关公文格式》、GB/T 15834-2011《标点符号用法》、《党政机关公文处理工作条例》以及用户提供的单位模板和现行制度文件。
- 社区项目仅作为工程设计和使用体验参考;当其内容与官方标准、当前政策或用户单位模板不一致时,应以后者为准。
- ### 参考的社区项目
- | 参考项目 | 借鉴重点 |
- | --- | --- |
- | [zhaohui-yang/official-document-drafting](https://github.com/zhaohui-yang/official-document-drafting) | 工程化纪律、文种路由、来源材料工作流、样例、测试、Word 导出和输出约定。 |
- | [wzbwan/gongwen-format-skill](https://github.com/wzbwan/gongwen-format-skill) | 确定性排版思路,强调受控输入到 Word 文件生成。 |
- | [KaguraNanaga/official-document-writing-skill](https://github.com/KaguraNanaga/official-document-writing-skill) | 模板、质量清单和实用审稿流程。 |
- | [Aether-liusiqi/wenshu](https://github.com/Aether-liusiqi/wenshu) | 文种覆盖、结构检查、语言禁忌和常见事务文书组织方式。 |
- | [luan-78-zao/official-document-writer-skill](https://github.com/luan-78-zao/official-document-writer-skill) | 起草请示、报告前进行政策来源检索的思路;同时提醒标准年份必须核验。 |
- | [HenryLau7/gongwen-writing](https://github.com/HenryLau7/gongwen-writing) | 从文本、Word、PDF 等输入中识别文种并进入起草或导出的流程。 |
- | [sunnydayplease668/gongwen-writing](https://github.com/sunnydayplease668/gongwen-writing) | 目的、对象、事实、结构、语气五个写作锚点。 |
- | [farmer-data/gongwen-writing](https://github.com/farmer-data/gongwen-writing) | 文种、行文方向、格式、语言口径的四步定位法。 |
- | [wocessade/gongwen-writing-skill](https://github.com/wocessade/gongwen-writing-skill) | 文种确认、规划、起草、审查、修订的分阶段流程。 |
- | [Right-068/gongwen-writing-suite](https://github.com/Right-068/gongwen-writing-suite) | 事实台账、边界确认、多轮复核和敏感材料处理意识。 |
- | [Likenttt/gongwen-writing-formatting](https://github.com/Likenttt/gongwen-writing-formatting) | 先明确交付物,再用结构化规格生成正式文件的流程。 |
- | [gzfutureai/mcp-server-moke-gongwen](https://github.com/gzfutureai/mcp-server-moke-gongwen) | 模板、合规校验、上下文需求分析和风格优化的 MCP 化思路。 |
- | [liaoxuyean/official-document-writer](https://github.com/liaoxuyean/official-document-writer) | 简洁命令式体验、文种速查、格式要素和常见错误提示。 |
- | [hehecat/gongwen](https://github.com/hehecat/gongwen) | A4 预览、分页、解析和 DOCX 导出的用户体验预期。 |
- | [linhut/document-ai-assistant](https://github.com/linhut/document-ai-assistant) | 模板管理、格式检测、字体校验、预览下载和本地优先处理。 |
- | [kairiclabs/gejian](https://github.com/kairiclabs/gejian) | 将格式检查作为独立产品能力,先做高信号规则再逐步扩展。 |
- | [cycleuser/Skills official-document-writer](https://github.com/cycleuser/Skills/tree/main/skills/official-document-writer) | 轻量注册表 skill 的包装方式、快速命令和低门槛触发体验。 |
Ratings and comments
Sign in to rate this skill.
Sign inFree to use. If it’s helped, pass it on.