docx-processing
Skill1 starsChanged 5 months agoMITView on GitHub
Create, read, and modify Microsoft Word (.docx) documents. Use when the user needs to generate reports, extract text, edit Word files, or convert documents to/from .docx format.
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- BrightGold70/skillstheir own version, first seen Nov 8, 2026
- peakdong68/my-skillstheir own version, first seen Aug 29, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- BrightGold70/skills★ 1same name
- peakdong68/my-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository15 other files it gives its agents.
- ci-preflightSkill
- code-reviewSkill
- debugSkill
- github-publishSkill
- implementSkill
- pdf-processingSkill
- permission-modesSkill
- planSkill
- pptx-processingSkill
- refactorSkill
- security-testingSkill
- specSkill
- testSkill
- web-developmentSkill
- xlsx-processingSkill
The file
Files
DOCX 文档处理 Skill
在 Termux Android 上使用纯 Python 工具处理 .docx 文件。
可用工具
优先方案: python-docx(推荐)
# 安装 (如果尚未安装)
pip install python-docx备用方案: 解压 + XML 操作
.docx 本质是一个 ZIP 包(XML 内容),可以手动解压处理:
unzip -o file.docx -d docx_unpacked/
# 编辑 docx_unpacked/word/document.xml 等
cd docx_unpacked && zip -r ../modified.docx *常见操作
1. 创建新的 DOCX 文件
from docx import Document
from docx.shared import Pt, Inches, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
doc = Document()
doc.add_heading('标题', level=1)
doc.add_paragraph('正文内容')
doc.save('output.docx')2. 读取并提取内容
from docx import Document
doc = Document('input.docx')
for para in doc.paragraphs:
print(para.text)
for table in doc.tables:
for row in table.rows:
for cell in row.cells:
print(cell.text)3. 替换占位符(模板替换)
from docx import Document
doc = Document('template.docx')
for para in doc.paragraphs:
if '{{NAME}}' in para.text:
para.text = para.text.replace('{{NAME}}', '张三')
doc.save('filled.docx')4. 添加表格 / 图片
table = doc.add_table(rows=3, cols=3)
table.cell(0, 0).text = '表头1'
doc.add_picture('chart.png', width=Inches(4))注意事项
- 📏 用
python-docx时注意段落/样式 API 的版本差异 - 📐 表格操作需显式设置列宽
- 🔄 中文内容确保使用 UTF-8 编码
- ⚠️ 大文件(>10MB)建议用流式方式处理
- 💾 处理前先备份原文件
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

