Government Writing logo

Government Writing

OrganizationPopular
Pinvou
government-writing

撰写规范的党政机关公文。当用户要"写/起草/拟一份 通知 / 意见 / 公文"时使用。当前内置文种:通知、意见,印发型主件支持办法/规定(法规体例;请示/报告/函可扩展,在 templates/ 增模板)。按《党政机关公文格式》GB/T 9704-2012 套发文字号、主送机关、层级序号、落款与固定话术,结构化内容经 gongwen MCP 渲染为合规 .docx。

Overview

PublisherPinvou
Repositorypinvou-agent
Skill namegovernment-writing
Stars
2K
Forks
281
Bundled files
3
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 3 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by Pinvou on GitHub. Read the source before you install it.

Installation

Install the Government Writing AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/Pinvou/pinvou-agent.git /tmp/pinvou-agent
mkdir -p .claude/skills
cp -r /tmp/pinvou-agent/pinvou3-app/src-tauri/resources/common/skill-marketplace/government-writing .claude/skills/government-writing
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Government Writing in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Government Writing on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Government Writing is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

党政机关公文写作

撰写规范的党政机关公文。当前内置文种:通知、意见;印发型通知的主件若是办法/规定(法规体例),另读 templates/办法.md

总流程

  1. 判文种 —— 据用户意图定文种(见分派表),读对应 templates/<文种>.md
  2. 采要素 —— 补齐七要素槽位,缺什么一次性问全(别挤牙膏)。
  3. 填正文 —— 按模板骨架 + 层级序号体系撰写。
  4. 套话术 —— 主送/承启/结尾/落款/公开方式用固定话术库。
  5. 自检 —— 过"立账核账"清单逐项打勾。
  6. 出件 —— 按公文字段契约(见下方)调 mcp_gongwen_make_gongwen 渲染合规 .docx → 拿到 path 必须再 present_artifact(path, title) 上产物卡。
    • 依赖检查:本技能靠『公文写作』MCP 出件。若 mcp_gongwen_make_gongwen 不存在/不可用,别硬拼纯文本冒充成品——提示用户去插件中心·连接器页安装『公文写作』引擎,装好再出件。
    • make_gongwen 出件前自带立账核账:若返回 ok:falseblocked_by_validate,说明有 error 级硬伤(正文为空 / 缺主送 / 缺成文日期等),issues 补全字段后重调,绝不跳过、绝不拿空壳去 present。
    • .docx 是二进制成品:要改内容就改字段重调 make_gongwen绝不用 read_file/edit_file 去读写 .docx(读不出文本是正常的)。
    • 不要自己拼 markdown 当公文成品——内容你写进字段,套版交给渲染器。
    • 正文是纯文本、不是 JSONbody / attachment_body 直接写多行纯文本(一段一行),每个字段都是独立的字符串参数——别再自己拼 JSON、JSON.stringify、或写临时文件验证
    • 路径以返回值为准make_gongwen 返回里就有 path直接拿它调 present_artifact,绝不自己 ls/find/read_file 满磁盘找 .docx

文种分派

用户要写文种读模板典型
印发办法/规划/方案/措施、批转下级文件通知(印发型)templates/通知.md,主件办法/规定读 templates/办法.md关于印发《XX办法》的通知
延长有效期/废止/聘任/事项告知通知(事务型)templates/通知.md关于…失效的通知
提出工作举措/实施安排意见templates/意见.md关于加强…的实施意见

区分关键:印发《…意见/办法》的通知 文种是通知(外壳),不是意见;正文主件才是意见/办法。

起草纪律(不臆造真实信息)

公文是法律文件,起草阶段拿不到的真实信息绝不编造——标注待编/待核,交付时一并提示:

  • 发文字号:序号由发文机关登记后赋予,起草无法预知。写成 {简称}〔{年}〕X号(序号留 X 占位),绝不编一个具体数字冒充真实文号(编出来像真的,最坑用户);交付话术提示"文号待发文机关登记后填入"。
  • 成文日期:用户未指定则填拟稿当日,不留 XX 占位;提示"以实际签发日为准"。
  • 发文机关 / 主送机关:缺则一次问全,不臆造机关名。
  • 金额 / 期限 / 法条 / 引用文件:拿不准就标 〔待核:参照…〕不要编看似精确的数值——编出来比留空更危险,用户会当真。

公文七要素骨架(所有文种通用)

  1. 发文字号 {机关简称}〔{年}〕{序号}号 —— 三类后缀须区分:
    • …办规〔…〕N号 = 规范性文件(有有效期、须登记)
    • …办函〔…〕N号 = 函式行文
    • …办〔…〕N号 = 普通公文 (示例:广州市府办公厅简称"穗府办";按实际机关替换。)
  2. 标题 {发文机关}关于{事由}的{文种} —— 事由用"关于…",力求一行内、无标点(书名号除外)。
  3. 主送机关 标准式 各区人民政府,市政府各部门、各直属机构:(按受文范围调整;应急类加"…市应急委成员单位")。
  4. 正文 缘由 → 承启 → 事项 →(结尾要求)。
  5. 落款 {发文机关} + 成文日期(阿拉伯数字 2026年5月28日,印章压日期)。
  6. 公开方式 公开方式:主动公开(规范性文件几乎都主动公开)。
  7. 印发记录 {发文机关}秘书处 {年月日}印发

层级序号体系(强制,不跳级/不混用)

一、(一)1.(1)

  • 意见/办法类每个分条末尾可挂分工:(牵头单位:…;配合单位:…)

固定话术库(取自真实公文,括号内为命中频次)

  • 承启句:经市人民政府同意,现…(43);重大事项 经市委、市政府同意,现…(3)
  • 印发型收束:《…》已经市人民政府同意,现印发给你们,请认真组织实施。(14) 变体:请遵照执行/请认真贯彻执行/请结合实际认真组织实施
  • 事务型告知:现将《…》({原字号}){有效期延长至…/重新发布/废止}。
  • 结尾求反馈:执行中遇到问题,请径向{主管部门}反映。
  • 意见引出:为{目的},{依据},经市人民政府同意,现提出如下意见。

公文字段契约(直接传给 mcp_gongwen_make_gongwen

每个字段都是独立的字符串参数,直接填——不要拼成一个 JSON、不要序列化成一整串、不要写临时文件。bodyattachment_body多行纯文本(一段一行),渲染器据此套 GB/T 9704 格式(字体字号/页边距/红头你都不用碰):

字段说明
doc_type文种,如 通知
issuer发文机关,如 广州市人民政府办公厅
doc_number发文字号,序号留 X,如 穗府办规〔2026〕X号——所有文种(含意见)都要填,意见用 穗府〔2026〕X号
title标题(除书名号外无标点),如 广州市人民政府办公厅关于印发《广州市XX办法》的通知
recipient主送机关,如 各区人民政府,市政府各部门、各直属机构
body正文,多行纯文本一段一行(见下)
date成文日期,如 2026年5月28日
signer / disclosure / print_note落款机关 / 公开方式 / 印发说明,可空走缺省
attachment_title印发型主件标题(不带书名号),无主件留空
attachment_body印发型主件正文(法规体例多行纯文本),无主件留空

body 怎么写(一段一行,行首序号前缀决定字体,你只管写前缀、不用标级别):

《广州市XX办法》已经市人民政府同意,现印发给你们,请认真组织实施。

印发型壳话术常就一句;意见类三段式逐段写——一、总体要求(一)指导思想(二)发展原则(三)发展目标同级序号顺序递增、绝不重号)→ 二、主要举措三、保障措施;无序号前缀的顶格段=正文。

attachment_body 怎么写(法规体例,一段一行):

第一章 总  则
第一条 为了规范……,根据《……》,结合本市实际,制定本办法。
第二条 本市行政区域内……,适用本办法。
第二章 ……
第N章 附  则
第X条 本办法由{主管部门}负责解释。
第X条 本办法自2026年X月X日起施行,有效期5年。
  • ⚠️ 条文必须用「第一条/第二条」,不能用「一、二、」——「一、」会被渲染成黑体一级标题、不是条文;章用「第一章」(自动居中)。
  • ⚠️ 附则必带:解释机关(「本办法由…负责解释」)+ 施行日期与有效期;修订/重发时另加废止衔接。
  • 印发型通知:壳话术一句写进 body,办法/规划主件写进 attachment_title + attachment_body(自动换页 + 居中标题)。⚠️ 你在对话里列的每一章每一条都必须逐条写进 attachment_body 参数——内容在工具参数里、不在聊天回复里,否则出来是红头+标题+落款、正文一片空白的空壳(server 端会拦,但别依赖它兜底)。
  • 意见:无主件,三段式全写进 bodyattachment_* 留空。
  • 必填:doc_type / title / recipient / body / datedoc_number 一律填写(序号未知留 X);signer / disclosure / print_note / attachment_* 可空走缺省。

自检清单(出件前逐项核对,缺一不可)

  • 文种与标题结尾一致(…的通知/…的意见)
  • 标题 = 发文机关 + 关于 + 事由 + 文种,且无多余标点
  • 发文字号后缀(办/办规/办函)与文件性质匹配
  • 主送机关顶格、末尾冒号
  • 层级序号 一、→(一)→1.→(1) 不跳级、括号样式不混用
  • 落款机关与标题发文机关一致;成文日期为阿拉伯数字
  • 含"公开方式"与"印发记录"两行
  • 规范性文件(办规)正文含制定依据与(如适用)有效期

自检是"对账"不是"评论":逐条打勾、不合规就改,不要泛泛点评。

常见错误(反例对照,⛔→✅)

  • ⛔ 标题加标点 …加强、推进…的通知 → ✅ 标题除书名号外不用任何标点
  • ⛔ 印发办法写成"…的意见/办法" → ✅ 印发型文种是通知,办法是其主件(写进 attachment_title/attachment_body
  • ⛔ 办法条文用"一、二、三、" → ✅ 法规体例条文用"第一条/第二条"、章用"第一章"("一、"会被渲染成黑体一级、不是条文)
  • ⛔ 意见漏发文字号 / 同级序号重号(两个"(二)")→ ✅ 各文种都填 doc_number;同级序号顺序递增不重复
  • ⛔ 规范性文件用 穗府办〔…〕号 → ✅ 有有效期/须登记的用 穗府办规,函式用 穗府办函
  • ⛔ 凭空编 穗府办规〔2026〕3号 → ✅ 序号留 X 占位、提示待编(见"起草纪律")
  • ⛔ 意见承启句"经…同意,现提出如下意见"未获真实同意也硬套 → ✅ 该引出句必须以真实审批/同意为前提:确经同意的自制意见可用;未获批复时改用"现将…提出如下意见"类中性引出
  • ⛔ 主送机关不顶格 / 漏末尾冒号 → ✅ 顶格 + 冒号(渲染器自动补冒号,但范围别写错)
  • ⛔ 成文日期 2026年X月X日 占位 → ✅ 阿拉伯数字实际日期
  • ⛔ 办法只写到原则、没附则 → ✅ 办法必带附则:施行日期+有效期、废止衔接、解释机关(见 templates/办法.md

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Government Writing AI skill do?

撰写规范的党政机关公文。当用户要"写/起草/拟一份 通知 / 意见 / 公文"时使用。当前内置文种:通知、意见,印发型主件支持办法/规定(法规体例;请示/报告/函可扩展,在 templates/ 增模板)。按《党政机关公文格式》GB/T 9704-2012 套发文字号、主送机关、层级序号、落款与固定话术,结构化内容经 gongwen MCP 渲染为合规 .docx。

Why use Government Writing on TypingMind?

Because you install it once and use it with any model. Government Writing is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Government Writing in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Pinvou/pinvou-agent/tree/main/pinvou3-app/src-tauri/resources/common/skill-marketplace/government-writing. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Government Writing?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Government Writing?

As many as you like. As long as a model supports skills, you can use Government Writing with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Government Writing AI skill free?

Yes. It is published on GitHub by Pinvou under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇