Introduction¶
In environments like Cursor and Claude Code, when you ask the model to “write a Word document,” the common result is scattered scripts: Chinese fonts not properly configured, table styles defined inconsistently, and cover pages and body structure not unified. Repeating layout requirements in every conversation is costly and difficult to turn into a reusable practice.
Below is the community Skill @user_5748365b/python-docx (version 1.0.0) on SkillHub. It turns the steps of python-docx — initialization, fonts, heading hierarchy, lists, tables, images, and cover pages — into standard templates. An Agent follows the same set of conventions to generate .docx files, which is more suitable for documents requiring fixed formatting such as proposals and architecture specifications.
What is This¶
python-docx is a community Skill under the SkillHub category office-efficiency, with the coordinate @user_5748365b/python-docx. It is published by user_5748365b and sourced from the community. The page is marked requires_api_key=false, meaning no additional API key is required after installation.
The Skill itself is a SKILL.md file: it describes applicable scenarios, the Python modules it depends on (python-docx as well as docx.shared, docx.enum, and docx.oxml.ns), and provides ready-to-use function templates and complete examples. Official entry points:
- API Coordinate: https://api.skillhub.cn/user_5748365b/python-docx
- SkillHub Page: https://www.skillhub.cn/skills/user_5748365b/python-docx
According to SkillHub’s crawled data, this Skill has a rating of 100000 and approximately 8740 downloads (the Tencent Cloud SkillHub mirror page shows about 8.7K downloads, consistent with the above number).
Core Features¶
The following content comes all come from the Skill’s SKILL.md, listing only the capabilities explicitly written there.
- Document Initialization: Create a
Document, and set a default font for theNormalstyle (the example uses Microsoft YaHei and handles East Asian fonts viaqn('w:eastAsia')). - Font Utility:
set_font(run)uniformly sets Western and East Asian fonts for eachrun, avoiding Chinese characters displaying as squares. - Headings:
add_heading_customsupports level 1–3 headings, with predefined font sizes, colors, and bold settings. - Paragraphs:
add_para_customsupports first-line indentation, bold, and colors. - Lists: Bullet lists (
List Bullet) and numbered lists (List Number), with indentation levels. - Tables:
create_tablegenerates a table from headers and 2D data; the example uses theLight Grid Accent 1style. - Images:
insert_imageinserts images centered, with an optional caption. - Page Breaks & Cover Pages:
add_page_break;create_coversupports cover information such as main/subtitle, client, date, and version.
The end of the document includes a “Frequently Asked Questions” section (Chinese square boxes, table styles, image paths, formatting errors) and a link to the python-docx official documentation.
Installation & Activation¶
The installation method given on the official page is: let the AI handle the installation according to the SkillHub installation instructions, using the coordinate @user_5748365b/python-docx.
Please follow https://skillhub.cn/install/skillhub.md to install `@user_5748365b/python-docx`.
If your machine already has the SkillHub CLI, you can first check the version, then install it into the current Agent’s skills directory (the --dir flag must be used; otherwise it defaults to ./skills/, which may not be loaded by the Agent).
command -v skillhub && skillhub --version
If the CLI is not installed, you can follow the SkillHub documentation to perform the full installation or install only the CLI:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
# CLI only:
# curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
Install this Skill (namespace and slug should follow the resolution result of skillhub search python-docx):
skillhub install python-docx --namespace user_5748365b --dir <your Agent skills directory>
Common skills directories (from the SkillHub installation documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
After installation, restart or refresh the Agent according to your client’s requirements so the new Skill takes effect. Before running the example code in the Skill, the python-docx library (import name docx) must be installed in your Python environment; the specific installation command depends on your project environment. The Skill body does not separately list a pip command.
Typical Usage¶
The flow suggested by the Skill is: first create_document(), then assemble the cover page, page breaks, headings, body text, lists, and tables as needed, and finally save.
Below is an excerpt of the call sequence from the official complete example, for easy comparison and reproduction with SKILL.md (function definitions are in each section of the Skill).
doc = create_document()
create_cover(doc,
title='安全服务方案',
subtitle='Security Service Proposal',
customer='某某公司',
date='2026-03-23',
version='V1.0'
)
doc.add_page_break()
add_heading_custom(doc, '一、 服务概述', level=1)
add_heading_custom(doc, '1.1 服务背景', level=2)
add_para_custom(doc, '这是正文内容,首行缩进两字符。', indent=0.5)
add_bullet_custom(doc, '项目符号内容')
add_numbered_custom(doc, '编号列表内容')
headers = ['列1', '列2', '列3']
data = [['A', 'B', 'C'], ['D', 'E', 'F']]
create_table(doc, headers, data)
doc.save('output.docx')
When using this in a conversation, you can directly state that the deliverable is a .docx file, reference this Skill, and let the Agent generate a script using the above function names and font settings, rather than piecing together API calls on the fly.
Applicable Scenarios & Notes¶
Who It’s For
- Those who need to repeatedly produce Word documents with similar formatting: security service proposals, technical architecture design documents, etc. (the scenarios described in the Skill overview).
- Those who want the Agent to include Chinese font and table style conventions by default when generating Python scripts.
Limitations & Notes
- The Skill focuses on “generation” and formatting templates, and does not include advanced Word capabilities such as document reading, revision, or annotations; complex requirements may need to be combined with other document-related Skills or extended yourself.
- Cover pages, colors, and font sizes follow the Skill examples; if your organization has strict official document standards, you should supplement your company’s template in the conversation or replace parameters in
create_cover/add_heading_custom. - Ensure the path is valid when inserting images; the Skill suggests using absolute paths when necessary.
- Every text
runshould go throughset_font(), otherwise Chinese characters may appear as squares (explained in the Skill FAQ).
Conclusion¶
@user_5748365b/python-docx turns python-docx into a set of standard templates that an Agent can follow, reducing the cost of “re-explaining formatting in every conversation.” If you mainly do office automation in environments like Cursor, you can access it from the SkillHub page or via the above installation commands, and then let the Agent use the functions and examples in the Skill to save the result as a .docx file.
Official page: https://www.skillhub.cn/skills/user_5748365b/python-docx# Introduction
In environments like Cursor and Claude Code, when you ask the model to “write a Word document,” the common result is scattered scripts: Chinese fonts not properly configured, table styles defined inconsistently, and cover pages and body structure not unified. Repeating layout requirements in every conversation is costly and difficult to turn into a reusable practice.
Below is the community Skill @user_5748365b/python-docx (version 1.0.0) on SkillHub. It turns the steps of python-docx — initialization, fonts, heading hierarchy, lists, tables, images, and cover pages — into standard templates. An Agent follows the same set of conventions to generate .docx files, which is more suitable for documents requiring fixed formatting such as proposals and architecture specifications.
What is This¶
python-docx is a community Skill under the SkillHub category office-efficiency, with the coordinate @user_5748365b/python-docx. It is published by user_5748365b and sourced from the community. The page is marked requires_api_key=false, meaning no additional API key is required after installation.
The Skill itself is a SKILL.md file: it describes applicable scenarios, the Python modules it depends on (python-docx as well as docx.shared, docx.enum, and docx.oxml.ns), and provides ready-to-use function templates and complete examples. Official entry points:
- API Coordinate: https://api.skillhub.cn/user_5748365b/python-docx
- SkillHub Page: https://www.skillhub.cn/skills/user_5748365b/python-docx
According to SkillHub’s crawled data, this Skill has a rating of 100000 and approximately 8740 downloads (the Tencent Cloud SkillHub mirror page shows about 8.7K downloads, consistent with the above number).
Core Features¶
The following content comes all come from the Skill’s SKILL.md, listing only the capabilities explicitly written there.
- Document Initialization: Create a
Document, and set a default font for theNormalstyle (the example uses Microsoft YaHei and handles East Asian fonts viaqn('w:eastAsia')). - Font Utility:
set_font(run)uniformly sets Western and East Asian fonts for eachrun, avoiding Chinese characters displaying as squares. - Headings:
add_heading_customsupports level 1–3 headings, with predefined font sizes, colors, and bold settings. - Paragraphs:
add_para_customsupports first-line indentation, bold, and colors. - Lists: Bullet lists (
List Bullet) and numbered lists (List Number), with indentation levels. - Tables:
create_tablegenerates a table from headers and 2D data; the example uses theLight Grid Accent 1style. - Images:
insert_imageinserts images centered, with an optional caption. - Page Breaks & Cover Pages:
add_page_break;create_coversupports cover information such as main/subtitle, client, date, and version.
The end of the document includes a “Frequently Asked Questions” section (Chinese square boxes, table styles, image paths, formatting errors) and a link to the python-docx official documentation.
Installation & Activation¶
The installation method given on the official page is: let the AI handle the installation according to the SkillHub installation instructions, using the coordinate @user_5748365b/python-docx.
Please follow https://skillhub.cn/install/skillhub.md to install `@user_5748365b/python-docx`.
If your machine already has the SkillHub CLI, you can first check the version, then install it into the current Agent’s skills directory (the --dir flag must be used; otherwise it defaults to ./skills/, which may not be loaded by the Agent).
command -v skillhub && skillhub --version
If the CLI is not installed, you can follow the SkillHub documentation to perform the full installation or install only the CLI:
curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash
# CLI only:
# curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash -s -- --cli-only
Install this Skill (namespace and slug should follow the resolution result of skillhub search python-docx):
skillhub install python-docx --namespace user_5748365b --dir <your Agent skills directory>
Common skills directories (from the SkillHub installation documentation):
- Cursor:
~/.cursor/skills/ - Claude Code:
~/.claude/skills/ - Codex:
~/.codex/skills/or.agents/skills/under the project
After installation, restart or refresh the Agent according to your client’s requirements so the new Skill takes effect. Before running the example code in the Skill, the python-docx library (import name docx) must be installed in your Python environment; the specific installation command depends on your project environment. The Skill body does not separately list a pip command.
Typical Usage¶
The flow suggested by the Skill is: first create_document(), then assemble the cover page, page breaks, headings, body text, lists, and tables as needed, and finally save.
Below is an excerpt of the call sequence from the official complete example, for easy comparison and reproduction with SKILL.md (function definitions are in each section of the Skill).
doc = create_document()
create_cover(doc,
title='安全服务方案',
subtitle='Security Service Proposal',
customer='某某公司',
date='2026-03-23',
version='V1.0'
)
doc.add_page_break()
add_heading_custom(doc, '一、 服务概述', level=1)
add_heading_custom(doc, '1.1 服务背景', level=2)
add_para_custom(doc, '这是正文内容,首行缩进两字符。', indent=0.5)
add_bullet_custom(doc, '项目符号内容')
add_numbered_custom(doc, '编号列表内容')
headers = ['列1', '列2', '列3']
data = [['A', 'B', 'C'], ['D', 'E', 'F']]
create_table(doc, headers, data)
doc.save('output.docx')
When using this in a conversation, you can directly state that the deliverable is a .docx file, reference this Skill, and let the Agent generate a script using the above function names and font settings, rather than piecing together API calls on the fly.
Applicable Scenarios & Notes¶
Who It’s For
- Those who need to repeatedly produce Word documents with similar formatting: security service proposals, technical architecture design documents, etc. (the scenarios described in the Skill overview).
- Those who want the Agent to include Chinese font and table style conventions by default when generating Python scripts.
Limitations & Notes
- The Skill focuses on “generation” and formatting templates, and does not include advanced Word capabilities such as document reading, revision, or annotations; complex requirements may need to be combined with other document-related Skills or extended yourself.
- Cover pages, colors, and font sizes follow the Skill examples; if your organization has strict official document standards, you should supplement your company’s template in the conversation or replace parameters in
create_cover/add_heading_custom. - Ensure the path is valid when inserting images; the Skill suggests using absolute paths when necessary.
- Every text
runshould go throughset_font(), otherwise Chinese characters may appear as squares (explained in the Skill FAQ).
Conclusion¶
@user_5748365b/python-docx turns python-docx into a set of standard templates that an Agent can follow, reducing the cost of “re-explaining formatting in every conversation.” If you mainly do office automation in environments like Cursor, you can access it from the SkillHub page or via the above installation commands, and then let the Agent use the functions and examples in the Skill to save the result as a .docx file.
Official page: https://www.skillhub.cn/skills/user_5748365b/python-docx