Skip to content
Back to skills

Office Docx

ASecurity

- 使用python-docx库生成,Document()创建空文档 - 中文正文字体:宋体/仿宋,标题:微软雅黑/黑体,英文:Times New Roman - 正文字号:小四(12pt),标题逐级递增(二号→小三→四号) - 首行缩进:paragraph_format.first_line_indent = Cm(0.74)(两个中文字符) - 行距:1.5倍行距,paragraph_format.line_spacing = 1.5 - 页边距:上下2.54cm,左右3.17cm(Word默认值) - 表格:Table(rows, cols),首行深色背景+白色加粗文字,内容行交替底色 - 页眉页脚:section.header.paragraphs[0] 设置文字,页码用WD_ALIGN_PARAGRAPH.CENTER - 标题层级:add_heading(text, level=1/2/3),自动生成目录结构 - 图片插入:add_picture(path, width=Cm(14)) 居中显示 - 保存前不要忘记 document.save(filename)

  • 687 stars
  • 0 votes
  • 0 copies
  • 19 views
  • Added June 5, 2026
devopspython

Security analysis

A100/100

Scanned June 5, 2026

npx -y skills add val1813/kwcode --skill office_docx --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Office Docx?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Office Docx
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/val1813-office-docx/badge)](https://www.skillsdirectory.com/skills/val1813-office-docx)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: OfficeDocxExpert
version: 1.0.0
trigger_keywords: [word, docx, word文档, 技术方案, 报告]
trigger_min_confidence: 0.7
pipeline: [office]
lifecycle: mature
---

## 领域知识

- 使用python-docx库生成,Document()创建空文档
- 中文正文字体:宋体/仿宋,标题:微软雅黑/黑体,英文:Times New Roman
- 正文字号:小四(12pt),标题逐级递增(二号→小三→四号)
- 首行缩进:paragraph_format.first_line_indent = Cm(0.74)(两个中文字符)
- 行距:1.5倍行距,paragraph_format.line_spacing = 1.5
- 页边距:上下2.54cm,左右3.17cm(Word默认值)
- 表格:Table(rows, cols),首行深色背景+白色加粗文字,内容行交替底色
- 页眉页脚:section.header.paragraphs[0] 设置文字,页码用WD_ALIGN_PARAGRAPH.CENTER
- 标题层级:add_heading(text, level=1/2/3),自动生成目录结构
- 图片插入:add_picture(path, width=Cm(14)) 居中显示
- 保存前不要忘记 document.save(filename)

## 经验规则(自动生成)

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.