AI Agent Hub
Back to skills
Government Official Document Writing and Formatting Assistant icon

Government Official Document Writing and Formatting Assistant

Office Efficiency Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please refer to the official installation guide at https://skillhub.cn/install/skillhub.md to install @laoxi/tizhineigongwenxiezuopaiban.

About this skill

Specific Problems

Government official document writing often faces challenges such as complex formatting, non-standard content, and noticeable AI-generated traces. Documents must comply with the national standard GB/T 9704-2012, involving elements like red headers, document numbers, editions, and confidentiality levels, which are time-consuming and error-prone to format manually. Additionally, AI-assisted writing may introduce vague expressions (e.g., "possibly", "some"), generic endings, or loose structures, reducing document professionalism and credibility. The core pain points include: lack of writing methodology leading to poor content structure, non-standard formatting tools causing layout chaos, and AI traces affecting formality.

Core Capabilities and Workflow

This skill provides an end-to-end solution by integrating writing methodologies and formatting scripts. The workflow involves seven key steps:

  • Document Type Determination and Scenario Analysis: First, identify the type of official document (e.g., request, report, notification) and adjust content based on the line of communication (upward/downward/parallel) and audience level. Confusable types (e.g., "request vs report") are detailed in references/official-writing.md.
  • Fact Collection and Compliant Writing: Use templates/input-brief.md to gather facts, prohibit data fabrication, and mark missing items with 〔待补充〕 placeholders. Apply methodologies like the Pyramid Principle, MECE, and document structure formulas to ensure clarity—for example, work summaries follow "task completion + issues + next steps".
  • Anti-AI Style and Optimization: Remove AI traces through rules for fact density, judgment strength matching, and abstract word control. For instance, hard-delete chat-style openings, ensure conclusion-based headings (e.g., "Significant Progress in Rural Revitalization Work"), and avoid vague titles like "About the Situation of...".
  • Markdown Output and Formatting Generation: Write content as standard Markdown, using heading levels (e.g., ## 1. xxx) for script recognition. Call the built-in script scripts/gongwen_format.py, input Markdown files, and output .docx documents compliant with national standards. The script supports parameters like --redhead (red header) and --doc-number (document number), automatically handling indentation, page numbers, and fonts.

Key capabilities include: built-in document templates (e.g., work plan structures in references/writing-method.md), mandatory expansion rules (splitting multi-point sections into independent subsections), and a quality checklist (pre-delivery verification for no fabricated facts, chart captions, etc.).

Applicable Boundaries and Considerations

  • Dependency Environment: The script relies on python-docx, which must be pre-installed (pip install python-docx); otherwise, Word document generation fails. Input supports .md/.txt/.docx, output defaults to .docx; for PDF, LibreOffice installation is required with --format pdf.
  • Document Type Limitations: The skill covers common official documents (e.g., notifications, requests), but extremely complex or non-standard types (e.g., special confidential formats) may need manual adjustments. Document type decisions are guided in references/official-writing.md's "Document-Type Decision".
  • Content Accuracy: The AI does not fabricate laws, conferences, or numbers, but users must verify business facts. Expanded content is annotated for differentiation.
  • Style Boundaries: Retains official document tone, avoiding personal or humorous injections, but allows rigorous People's Daily-style expressions. Anti-AI rules are strict—for example, abstract terms like "high-quality development" must be followed by specific objects and methods.

Use Cases

  • When required to draft a request for project progress to superiors, use the skill to organize content with methodology and generate a Word document with red header.
  • When a leader provides scattered work points needing a structured report, apply Pyramid Principle and MECE methods to structure content for logical clarity.
  • For existing drafts with non-standard formatting, use the script to convert to a standardized document compliant with national standards, including document numbers and editions.
  • AI-generated drafts need to remove obvious traces; optimize expressions with anti-AI rules to match formal official document style.

Best For

  • Grassroots civil servants who regularly write work summaries and reports, seeking clear structure and compliance with national standards.
  • Administrative personnel drafting various official documents like notifications, needing quick generation of standard Word documents with red headers and editions.
  • Document handlers using AI-assisted writing concerned about traces, seeking optimization for natural and professional official expressions.