Gongwen Draft logo

Gongwen Draft

Community
Rimagination
gongwen-draft

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.

Overview

PublisherRimagination
Repositorygongwen-draft
Skill namegongwen-draft
Stars
80
Forks
5
Bundled files
40
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.

  • 40 bundled files

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

  • Open source

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

Installation

Install the Gongwen Draft 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.
    https://github.com/Rimagination/gongwen-draft/tree/main
  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/Rimagination/gongwen-draft.git \
  .claude/skills/gongwen-draft
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Gongwen Draft 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 Gongwen Draft 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 Gongwen Draft 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.

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.

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 Gongwen Draft AI skill do?

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, 公文, 公文写作, 公文起草, 机关文稿, 政务写作, 政策检索, 政策依据, 引用核验, 领导讲话, 会议精神, 素材收集, 素材整理, 事实台账, 语言润色, 通知, 请示, 报告, 函, 纪要, 通报, 批复, 意见, 决定, 公告, 通告, 工作总结, 工作方案, 调研报告, 汇报材料, 简...

Why use Gongwen Draft on TypingMind?

Because you install it once and use it with any model. Gongwen Draft 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 Gongwen Draft in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/Rimagination/gongwen-draft/tree/main. 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 Gongwen Draft?

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 Gongwen Draft?

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

Is the Gongwen Draft AI skill free?

It is published on GitHub by Rimagination. Check the repository for licensing terms. 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 👇