gongwen-writing-paiban

A one-stop toolkit for official document writing and typesetting covering the full process "write correctly → typeset accurately → deliver (produce a standard Word file)". It embeds the Dunbin "official document writing algorithm" technique matrix and validates the "Regulations on Official Document Handling for Party and Government Organs", with typesetting that follows the GB/T 9704-2012 national standard and one-click generation of compliant .docx files. Supports four formats—standard, letter, command, and minutes—and includes elements such as official header, edition note, copies, document number, annotations, confidentiality level, and urgency. Intended for writing, typesetting, and producing standard Word official documents.

Installation

Review the source and dependencies with a prompt. A package is available to download.

Install with an AI assistant

Copy the prompt so your assistant can review the pinned revision and dependencies first.

View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "gongwen-writing-paiban" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a9d555882b91cc893be6f7b76d2490b85db3708ad4609281d465b681fbc8ad44. Verify the upstream source and version against https://skillhub.cn/skills/user_4a9c071f/gongwen-writing-paiban before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.

Source and setup

skillhub.cn

Setup guidance pending

See the original source for supported tools, dependencies, and permissions.

Installation test pending

A one-stop toolkit for official document writing and typesetting covering the full process "write correctly → typeset accurately → deliver (produce a standard Word file)". It embeds the Dunbin "official document writing algorithm" technique matrix and validates the "Regulations on Official Document Handling for Party and Government Organs", with typesetting that follows the GB/T 9704-2012 national standard and one-click generation of compliant .docx files. Supports four formats—standard, letter, command, and minutes—and includes elements such as official header, edition note, copies, document number, annotations, confidentiality level, and urgency. Intended for writing, typesetting, and producing standard Word official documents.

0 Downloads

Introduction source: third_party · user_4a9c071f · 1.0.0 Reference

SkillPi interpretation

Tasks
Translation pending; see source documentation.
Limits and differences
Translation pending; see source documentation.
Testing
Not tested

Browse files

Browse files at the source ↗

Original SKILL.md

Open original ↗
Frontmatter
name: gongwen-toolkit
description: "公文写作与排版一站式工具包:覆盖『写得对 → 排得准 → 交得出(直接出标准Word)』全流程。内嵌顿彬《公文写作算法》技法矩阵(V+N基因、按拿推首段、四大金刚、工作剧情、六大逻辑、地空对接/产品化/概念封装)与《党政机关公文处理工作条例》校验;排版严格遵循 GB/T 9704-2012 国标(A4、页边距、仿宋三号、黑体一级标题、红色分隔线、页码—N—),一键生成合规 .docx,支持 standard(标准/通用)、letter(信函)、command(命令/令)、minutes(纪要) 四种版式,含红头、版记、抄送、发文字号、附注、密级、紧急程度。当用户提到以下关键词时使用:写公文、写报告、工作总结、领导讲话、通知、请示、函、纪要、公文排版、标准格式、生成docx、红头文件、公文格式、转Word、GB/T 9704、按拿推、V+N、六大逻辑、公文模板、材料排版。"

公文写作技能包(gongwen-toolkit)

把《公文写作算法》技法 + 《党政机关公文处理工作条例》 + GB/T 9704-2012 国标排版,"蒸馏"成一套可复用的公文写作与排版技能。 覆盖:写得对 → 排得准 → 交得出(直接出标准 Word)。

本包由两个互补子技能组成,分工明确:

子技能 目录 职责 典型触发
gongwen-writing gongwen-writing/ 内容写作、技法运用、按《条例》校验文种/格式/行文规则 写公文、写报告、工作总结、通知、请示、润色、按拿推、V+N
gongwenformat-pro gongwenformat-pro/ 把写好的文本排成符合国标的 Word(红头/版记/信函/命令/纪要) 排版、生成 docx、红头文件、公文格式、转 Word

使用约定:先用 gongwen-writing 出合规内容 → 再交 gongwenformat-pro 排成 Word。 执行具体任务时,可读取 gongwen-writing/SKILL.md 与 gongwenformat-pro/SKILL.md 获取完整技法模板与脚本参数说明。


一、它能做什么

  1. 写得对(技法层 · gongwen-writing)

    • 内嵌《公文写作算法》技法矩阵:V+N 基因、首段「按—拿—推」、四大金刚、六大逻辑、工作剧情、地空对接/产品化/概念封装。
    • 文种模板库:工作总结、工作报告、领导讲话、工作计划、调研报告 + 15 种法定公文速查。
    • 《条例》对照层:18 项格式要素、文种适用、行文规则、出稿自检清单。
  2. 排得准(排版层 · gongwenformat-pro)

    • 内置 GB/T 9704-2012 规范:A4、页边距上37/下35/左28/右26mm、正文仿宋三号、标题二号小标宋、一级黑体/二级楷体、红色分隔线、页码"—N—"单右双左。
  3. 交得出(出 Word 层 · gongwenformat-pro)

    • 一键生成合规 .docx,支持四种版式:standard(默认)、letter(信函)、command(命令/令)、minutes(纪要);红头、版记、抄送、发文字号、附注、密级、紧急程度齐全。

二、安装(首次)

需要 Python 3.10+ 与 python-docx:

python -m venv venv
source venv/bin/activate        # Windows: venv\Scripts\activate
pip install python-docx         # 或 pip install -r requirements.txt

写作技能 gongwen-writing 为纯提示词/文档,直接交给任意 AI 工具或客户端加载 gongwen-writing/SKILL.md 即可,无需安装环境。


三、使用流水线(写 → 排 → 出 Word)

第 1 步 · 写内容 用 gongwen-writing(或把 gongwen-writing/SKILL.md 交给你的 AI 工具),下指令如:

"写一份 XX 单位 2026 年度工作总结,按《公文写作算法》技法 + 《条例》规范。"

得到 Markdown / 纯文本成稿,保存为 body.md。

第 2 步 · 排成 Word

python gongwenformat-pro/scripts/gongwen_format.py \
  --title "关于申请增拨专项经费的请示" \
  --input body.md \
  --output out.docx \
  --redhead "XX市人民政府" \
  --doc-number "X政发〔2026〕12号" \
  --recipient "各区、县人民政府,市政府各部门:" \
  --author "XX市人民政府" \
  --date "2026-07-22" \
  --cc "市委办公室" \
  --print-author "XX市人民政府办公室" \
  --print-date "2026-07-23"

常用参数

参数 说明 示例
--title 公文标题(必填) "关于……的请示"
--input 正文 markdown 路径(必填) body.md
--output 输出 docx 路径(必填) out.docx
--redhead 红头机关名(加此即红头版式) "XX市人民政府"
--doc-number 发文字号 "X政发〔2026〕12号"
--recipient 主送机关 "XX市局:"
--author / --date 署名 / 成文日期 "XX市人民政府" / "2026-07-22"
--signer 签发人(上行文) "张三"
--notes 附注(可多次) "此件公开发布"
--cc 抄送机关 "市委办公室"
--print-author / --print-date 版记印发机关 / 日期 "XX市人民政府办公室" / "2026-07-23"
--layout 版式:standard(默认)/letter/command/minutes --layout letter
--seal-note 命令(令)签名章占位提示 (无值)
--minutes-no 纪要编号 "第5号"
--present / --absent / --attendees 纪要出席/请假/列席 "张三、李四"

四、注意事项

  • 印章:纯文本排不出,需自行提供红色印章 PNG,在成文日期处加盖;脚本已在无印章时留"此处盖章"规范位置。
  • 特殊版式:信函/命令/纪要用 --layout 切换;标准红头用 --redhead。
  • 正式公文:请以本单位规范和最新《条例》为准,本技能包为学习辅助工具。
  • 国标速查:gongwenformat-pro/references/gb9704-2012.md 含完整排版参数。
  • 子技能完整文档:gongwen-writing/SKILL.md、gongwenformat-pro/SKILL.md。

本技能包为《公文写作算法》(顿彬)技法与《党政机关公文处理工作条例》的二次梳理整合,仅供学习辅助使用。

Current listing version

1.0.0

Verify the source revision ↗

Safety and assessment details

Quality assessment

Out of 100 · Assessment report from SkillPi LAB.

Scenario Value95/100

Highlights

  • 提供公文写作与排版一站式解决方案,覆盖从内容生成到标准 Word 输出的完整流程
  • 内嵌《公文写作算法》技法矩阵并严格遵循 GB/T 9704-2012 国标,具备专业性与合规性
  • 支持四种公文版式(标准、信函、命令、纪要),满足政府及企事业单位高频刚需
Trigger Precision95/100

Highlights

  • 触发关键词列表全面且精准,涵盖写作、排版、格式、模板等核心场景
  • 边界清晰,能有效避免与其他文本处理工具混淆
Structure and Standards85/100

Areas to improve

  • 缺少 When to Use 显式章节 Reported severity: Minor

    文档实质包含使用场景说明,但未设置显式 'When to Use' 章节标题

    Recommendation: 建议在文档开头增加 'When to Use' 显式章节,提升结构规范性

Highlights

  • 文档结构清晰,分模块说明功能、安装、使用流程及参数
  • 提供端到端使用示例,便于用户快速上手
Execution Reliability90/100

Highlights

  • 依赖环境明确(Python 3.10+、python-docx),降低执行门槛
  • 参数说明详尽,覆盖红头、版记、抄送等关键要素
  • 对印章等无法自动化处理的部分提供明确提示,增强可靠性
Evidence Verifiability (mean of the first four)91/100

The arithmetic mean of the first four original scores, rounded to a whole number.

Static text checks

100 / 100 · skillpi-20261123-no-r3-v1

No current rules matched the text.

This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.

Permissions and checks before use

Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.

  • Install or fetch external dependencies

    Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.

    Mentioned in main document · lines 45

These notices grant no permissions. Your host tool must still confirm file changes, secrets, external transfers or costs as needed.

Security rating and access scope

safe · Static evidence review; not a runtime safety guarantee.

Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.