document-format-skills

Diagnose and fix formatting issues in Chinese Word docx documents.

1|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/qfwc258/trae-skills --skill document-format-skills-qfwc258
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: document-format-skills
Source: https://github.com/qfwc258/trae-skills/tree/main/document-format-skills
Command: npx skills add https://github.com/qfwc258/trae-skills --skill document-format-skills-qfwc258

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires python-docx, pywin32, and includes scripts (resource) components.

What problem does it solve? Chinese Word documents often suffer from mixed Chinese/English punctuation, inconsistent fonts, missing first-line indents, and non-standard layouts. Manually fixing these issues against standards like GB/T 9704-2012 is tedious and error-prone. ## Core Features & Use Cases - Format Diagnosis: Analyze a docx file and generate a report of punctuation, numbering, paragraph, and font issues. - Punctuation Repair: Intelligently convert mixed Chinese/English punctuation (quotes, brackets, ellipses, dashes) based on surrounding context, including text inside tables. - Style Standardization: Apply preset formats for official government documents (GB/T 9704-2012), academic papers, and legal documents, covering margins, fonts, headings, line spacing, tables, and page numbers. - Use Case: A government office worker receives a messy draft notice; they run the analyzer to find issues, fix punctuation, then apply the official preset to produce a compliant GB/T 9704-2012 document. ## Quick Start Ask the assistant to diagnose and fix the formatting of your attached docx file using the official document preset.

Frequently Asked Questions about document-format-skills

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I fix mixed Chinese and English punctuation in a Word document?

Run the punctuation script with python-docx on your docx file. It detects the surrounding context and converts brackets, quotes, colons, commas, ellipses, and dashes to the correct Chinese or English form, including text inside tables.

How to format a Chinese official document to GB/T 9704-2012 standard?

Apply the official preset with the formatter script. It sets A4 margins (top 37mm, bottom 35mm, left 28mm, right 26mm), FangSong_GB2312 body text at 16pt, 28pt fixed line spacing, and structured headings.

Does this tool support legacy .doc files?

No, only .docx files are supported by the analyzer, punctuation, and formatter scripts. A separate converter script can convert .doc or .wps files to .docx on Windows using WPS or Microsoft Word via COM automation.

What formatting issues can the docx analyzer detect?

The analyzer reports English punctuation in Chinese text, inconsistent numbering styles, missing first-line indentation, mixed line spacing values, and excessive font or size variety. It outputs a structured report or JSON.

Why do formatted documents display wrong fonts after processing?

The output docx references fonts like FangSong_GB2312 or 方正小标宋简体 that must be installed on the viewing system. If the fonts are missing, Word substitutes them and the layout may look incorrect.