Word Formatting: Automatically Standardize Word Reports per Bowei Standards

Preface

Before delivering consulting or planning projects, Word reports often need to satisfy a full set of writing standards simultaneously, including page margins, heading hierarchy, headers and page numbers, three-line tables, and Chinese punctuation. Manually checking these item by item in Word is time-consuming, and issues in AI-generated text—such as “half-width commas, straight quotes, or English hyphens masquerading as dashes”—are difficult to spot with the naked eye. The following introduces word-typesetting (coordinate @org-vc3t81nj/moways-docx) on SkillHub: it encodes Moways Management Consulting’s typesetting rules into an Agent Skill, working with scripts to perform automatic typesetting, auditing, or creating documents from scratch.

What is this

word-typesetting is published by Moways Management Consulting, categorized under office-efficiency. The current SkillHub version is 2.7.0, and the source is an enterprise skill. It executes formatting standards based on the Moways Consulting Word Report Writing and Typesetting Standards V2.6. Starting from v2.7, the skill description also mandates the enforcement of the national standard GB/T 15834—2011 for Chinese punctuation rules, used to identify and fix common “half-width masquerading as full-width” issues.

Unlike general capabilities for “reading docx, modifying paragraphs,” this skill targets Moways’ internal writing standards and offers three modes: Auto-formatting, Formatting Audit, and Create New Report. The tag indicates requires_api_key=false, meaning no additional API Key is needed. The SKILL.md inside the package indicates compatibility with WorkBuddy. After installation via SkillHub, it can also be placed in the skills directory of clients like Cursor or Claude Code for Agent loading.

Core Functions

The following capabilities are derived from the official skill description and internal script design, available for selection as needed.

Three Working Modes

  1. Auto-formatting: Given a user-provided .docx, it standardizes pages, fonts, headings, line spacing, headers/page numbers, TOC, table captions, and chart titles according to standards. It operates on a copy by default, leaving the original file unchanged.
  2. Formatting Audit: Runs an audit script to generate a list of issues (can output JSON), explaining locations and modification suggestions to the user based on severity. Punctuation items are categorized into ERROR / WARNING / INFO.
  3. Create New Report: Uses python-docx to create documents from scratch, applying full-width punctuation according to national standards during the writing phase, then setting formats and auditing against a quick reference table.

Rule Coverage

The typesetting standard quick reference table in the skill description covers examples such as:

  • Page: A4 portrait, margins such as 37mm top and 28mm inner margin (type area requirements).
  • Fonts and Sizes: Cover, body text in FangSong Small Four (仿宋小四), headings at various levels using combinations of HeiTi (黑体)/KaiTi (楷体)/FangSong, with separate rules for TOC and header page numbers.
  • Heading Hierarchy: Seven-level numbering rules such as “一、”, “(一)”, “1.”, “(1)” (Level 3 uses a dot at the bottom rather than an enumeration comma).
  • Line and Paragraph Spacing: Body text at 1.5x line spacing, first-line indent of 2 characters (space placeholders forbidden).
  • Page Numbers and Headers: e.g., — X — (one-em dash) page numbering style, different odd/even pages; header splits report name and creating unit on left/right.
  • TOC, Covers, Appendices, Signatures/Dates, Three-line Tables, Figure/Table Captions all have corresponding entries. Starting from v2.7.x, there are strict rules regarding level-1 headings starting on a new page, non-empty TOC entries, and appendices starting on a new page.

Punctuation and “De-AI-ifying”

v2.7 lists punctuation compliance as the first mandatory check before delivery: format_word.py enables fix_chinese_punctuation by default; audit_word.py provides punctuation detection items such as P1–P20. Ambiguous scenarios (like a single EM dash or half-width periods in version numbers) are usually flagged in the audit report for manual judgment.

Internal Scripts

The skill depends on python-docx and lxml. The main scripts are located in scripts/ under the installation directory:

Script Function
format_word.py One-click typesetting, supports parameters for cover, TOC, header, page number style, punctuation correction, etc.
audit_word.py Strict audit of pages, headings, body text, tables, pagination boundaries, and punctuation.

The reference document references/punctuation_GB_T_15834-2011.md should be read before executing typesetting tasks to correctly interpret audit results.

Installation and Activation

Install via SkillHub CLI

First, check if skillhub is installed on your machine (see SkillHub Installation Docs for installation methods). When installing this skill, you must use --dir to point to the current Agent’s skills directory; otherwise, it defaults to ./skills/ and may not be recognized by the client.

command -v skillhub && skillhub --version

skillhub install @org-vc3t81nj/moways-docx --dir <your skills directory>

Common skills directory examples (subject to official installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

The SkillHub page also provides installation prompts for AI: instruct the Agent to install @org-vc3t81nj/moways-docx based on https://skillhub.cn/install/skillhub.md.

Python Dependencies

Before the Agent executes scripts according to the skill, the following must be installed on the local machine:

pip install python-docx lxml

Triggering Method

The skill description lists natural language trigger words, such as “Word typesetting,” “Format,” “Official document formatting,” “Punctuation is wrong,” “GB/T 15834,” etc. The skill should also be loaded when the user uploads a .docx and requests formatting or checking against Moways standards. If this overlaps with a general docx skill, the description stipulates that this skill takes precedence.

Typical Usage

Mode 1: Auto-formatting

After installing the skill and dependencies as described above, the Agent will generally confirm the file path, presence of cover/TOC, header text (left/right), and the reporting audience (strictness may differ between SOE/government vs. private enterprises) before calling the script. Example command (paths need to be replaced with actual files):

python scripts/format_word.py input.docx output.docx \
  --cover --toc --page-num-style dash \
  --header-left "Report Name" --header-right "Moways Management Consulting"

After formatting, a strict mode check is commonly used to review, focusing on punctuation items:

python scripts/audit_word.py output.docx --strict

If the client requires retaining half-width punctuation, automatic correction can be turned off:

python scripts/format_word.py input.docx --no-fix-punctuation

Mode 2: Formatting Audit

For checking only without modification:

python scripts/audit_word.py input.docx --strict -o report.json

To view punctuation only:

python scripts/audit_word.py input.docx --only-punctuation

The Agent organizes the results into an issue list; ERROR level punctuation issues must be cleared before delivery.

Mode 3: Create New Report

The Agent uses python-docx to create the document, adhering to GB/T 15834 and the skill’s “Typesetting Standard Quick Reference Table” during the writing phase, and finally runs audit_word.py to verify.

Summary of Common format_word Parameters

python scripts/format_word.py input.docx output.docx \
  --mode full \
  --cover \
  --toc \
  --page-num-style dash \
  --header-left "XX Company 15th Five-Year Development Strategy Plan" \
  --header-right "Moways Management Consulting"
  • --mode full|light: Full typesetting or only fonts/sizes/line spacing.
  • --landscape-wide-tables: Enable only when the user explicitly requests landscape pages for wide tables; defaults to portrait with adaptive width.

Applicable Scenarios and Notes

Who is it for

  • Teams producing reports according to Moways Management Consulting’s Word writing standards, or scenarios requiring unified formatting and punctuation in consulting/planning reports.
  • Cases where users want the Agent to drive “script typesetting + audit checklists” rather than purely verbal descriptions of format requirements.

Limitations and Notes

  1. Standard Binding: The core of the specification is Moways V2.6 and extended rules in the enterprise skill description. If the client has different formats, the client’s format prevails, and script constants may need modification if necessary.
  2. Font Environment: Fonts such as FangSong, KaiTi, HeiTi, and FZXiaoBiaoSong-B05S must be installed on the system; otherwise, they will be replaced by default fonts in Word.
  3. Script Boundaries: Whether the last line of a page is a heading, repeating table headers across pages, precise TOC page numbers, image positioning, etc., are explicitly stated in the description to require manual handling or “Update Field” in Word.
  4. Security Boundary: The skill declares that it only processes user-provided .docx files, performs typesetting on a copy, does not modify the original file, and does not send document content externally.
  5. SOE/Government Official Documents: If alignment with the Format for Official Documents of Party and Government Organs (GB/T 9704—2012) is required, the description mentions that stricter parameters (e.g., Size 3 FangSong, 22 lines, 28 characters) are needed, likely requiring additional constant adjustments.

SkillHub Public Data (based on page and API scraping): Rating 100000, Downloads 2279; specific numbers are subject to backend updates.

Conclusion

word-typesetting encapsulates Moways’ Word writing standards, national standard punctuation, and a reproducible format_word.py / audit_word.py workflow into an Agent Skill. It is suitable for the repetitive labor of “unifying formatting + scanning punctuation before submission.” See SkillHub for installation and details:

  • Skill Page: https://www.skillhub.cn/skills/org-vc3t81nj/moways-docx
  • Coordinate Installation: @org-vc3t81nj/moways-docx
  • Installation Guide: https://skillhub.cn/install/skillhub.md
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye