paper-formatting: Automatic formatting of Word graduation thesis according to the collection specification

Introduction

Undergraduate thesis formatting in Word often requires meticulous manual adjustments to page margins, line spacing, cover font sizes, and hierarchy levels for abstracts and headings, all based on school guidelines or collection manuscript specifications. Manually clicking through the style panel is slow and prone to omissions, while relying solely on an AI model’s “verbal advice” fails to apply changes directly to the .docx file. Here, we introduce paper-formatting from SkillHub (Coordinate @user_1f949bb0/paper-formatting): an Agent Skill that allows you to trigger document checks or batch modifications in Word via natural language conversation. It follows the formatting requirements of the Collection of Excellent Undergraduate Theses (Designs) and includes a bundled script for local command-line execution.

What is this?

paper-formatting is a community-sourced Agent Skill categorized under office-efficiency. Current version: 1.0.0. Published by SkillHub user user_1f949bb0; the author listed in the SKILL.md is WorkBuddy. It is tagged with requires_api_key=false and does not rely on additional API keys.

In short: This skill triggers when users mention requirements for thesis format modification, checking, typesetting, or formatting graduation theses. It automatically adjusts Word (.docx) document formatting based on the specification requirements mentioned above.

Core Functions

The following capabilities are derived from the skill package’s SKILL.md and accompanying scripts. They can be used in conjunction with Agent orchestration or command-line execution.

Formatting Specification Scope

  1. Page: A4; top, bottom, left, and right margins set to 25mm; fixed line spacing of 20pt; page numbers not set for now.
  2. Cover: Title in Heiti (SimHei), size 3, centered; Subtitle in Heiti (SimHei), size 4, centered; Professional/Major information in Kaiti (SimKai), size Small 4, centered.
  3. Abstract: Labels “Abstract” and “Keywords” in Heiti (SimHei), size Small 4; Abstract and Keywords text in Kaiti (SimKai), size 5; 3–6 keywords separated by semicolons.
  4. Body Text: Songti (SimSun), size 5 (English: Times New Roman 12); Tables formatted as three-line tables.
  5. Heading Hierarchy: Default Liberal Arts/Business/Law (Level 1: 一、, Level 2: (一), Level 3: 1., etc., five levels total); Optional Science & Engineering (1, 1.1, 1.1.1).
  6. References: “References” heading in Heiti (SimHei), size 4, centered; Entries like [1], [2] in Songti (SimSun), size 5.
  7. English Abstract (if applicable): Title, Abstract, Key Words handled according to the document’s specified English font sizes and bolding rules.

Working Modes

  1. Format Check: Parses the structure (cover, abstract, body, references), compares against specifications item by item, and outputs a Markdown Check Report (including a score and a list of issues).
  2. Format Modification: Applies the specifications while preserving the original content, outputting a file named original_filename_formatted.docx and a Modification Report.
  3. Batch Processing: The skill instructions support processing multiple documents sequentially (via the Agent calling scripts in a workflow).

The skill instructions explicitly state that backups of original files will be created; however, three-line tables, formulas, and complex tables may still require manual review.

Installation and Activation

1. Install SkillHub CLI (if not installed)

First, check if the CLI is already on your system:

command -v skillhub && skillhub --version

If not installed, follow the official SkillHub installation documentation for a full installation (including CLI and default Skills):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

To install only the CLI:

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only

For instructions and path conventions, see: SkillHub Installation and Priority Source Configuration.

2. Install paper-formatting to the current Agent’s skills directory

During installation, you must use --dir to point to the skills directory recognized by your current client; otherwise, it defaults to ./skills/, which might not be loaded automatically.

skillhub install paper-formatting --namespace user_1f949bb0 --dir <your skills directory>

Common directories (from official installation documentation):

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

Alternatively, in clients that support SkillHub, ask the AI to install it using the official prompt:

Please install `@user_1f949bb0/paper-formatting` according to https://skillhub.cn/install/skillhub.md.

After installation, restart or refresh the skill index as required by your specific client (refer to your client’s documentation).

3. Python Dependencies

The skill scripts depend on Python 3.7+ and python-docx 0.8.11+. Install them in the environment where scripts/main.py will be run:

pip install python-docx

Typical Usage

Triggering in Agent Conversation

The skill’s trigger scenarios include: modifying/adjusting/checking thesis format, formatting graduation thesis, thesis typesetting, and expressions like “format specification” or “typesetting requirements.” You should provide the Word document path in the conversation and specify whether only checking is needed or if it belongs to the Science & Engineering category (Liberal Arts is default).

Example expressions (consistent with the skill package README; adjust paths and filenames as needed):

Please help me modify the format of this thesis according to the requirements: 论文.docx
Please help me modify the format of this Science & Engineering thesis: 算法论文.docx
Please check if the format of this thesis meets the requirements: 论文.docx

Following the steps above, the Agent will confirm the document path, discipline category, and output location based on SKILL.md, and call the bundled script to execute the check or formatting.

Direct Command-Line Call

Navigate to the scripts folder within the installed skill directory (the path depends on where you installed it with --dir, e.g., ~/.cursor/skills/@user_1f949bb0/paper-formatting/scripts).

Check Format (Liberal Arts is default liberal, use tech for Science & Engineering):

python main.py check 论文.docx
python main.py check 论文.docx --discipline tech

Apply Format and Write New File:

python main.py format 论文.docx
python main.py format 论文.docx --discipline tech -o 格式化后的论文.docx

Check Only, Do Not Write Back to Document (using format subcommand):

python main.py format 论文.docx --check-only

Output Conventions (from skill instructions): Formatted result is *_formatted.docx; Check report is *_check_report.md; Modification report is the corresponding *_report.md.

Use Cases and Notes

Who is it for?

  • Undergraduates or teaching assistants who need to submit thesis work according to the Collection of Excellent Undergraduate Theses (Designs) format.
  • Users of SkillHub skills in environments like Cursor, Claude Code, or Codex who prefer conversation-driven Word typesetting over purely manual style adjustments.

Limitations and Notes

  1. The document must possess a recognizable structure (cover, abstract, body, references, etc.); recognition and application may be inaccurate if the structure is chaotic.
  2. Heading rules for Science & Engineering differ from Liberal Arts; this must be explicitly stated in the conversation or via --discipline tech.
  3. Page numbers, complex tables, and formulas are marked in the skill instructions as “not set for now” or “requires manual checking.”
  4. SkillHub page statistics (based on pre-fetched data): Rating 100000, Downloads ~2100, Installs ~81; these numbers may change over time on the website, please refer to SkillHub for the latest data.

Conclusion

paper-formatting encodes the font sizes, line spacing, and heading hierarchies from the collection manuscripts into an executable checking and formatting workflow. It is suitable for processing .docx files with a single command in an Agent, or for reproducing the same standards locally using main.py. Official Skill page and API entry:

  • SkillHub: https://www.skillhub.cn/skills/user_1f949bb0/paper-formatting
  • https://api.skillhub.cn/user_1f949bb0/paper-formatting
羽毛球分组比赛记分
小程序二维码

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

Xiaoye