一键导入
docx
Read and edit Microsoft Word documents (.docx). Use for document editing and content extraction.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Read and edit Microsoft Word documents (.docx). Use for document editing and content extraction.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Navigate large codebases and make surgical edits while following project conventions. Use for refactors, feature work, and bug fixes spanning multiple files.
Inspect, filter, and summarize JSON, CSV, and log data using jq, awk, and pandas.
Branch, commit, rebase, and resolve conflicts. Use for PR prep, conventional commit messages, and history cleanup.
Author and edit README, CHANGELOG, and other markdown documentation, following the project's existing style.
Extract text, merge, split, and search PDF documents. Use whenever the user mentions a PDF file.
Read, write, and transform CSV and XLSX files. Use for Excel, tabular data, bulk row edits, and column transforms.
| name | docx |
| description | Read and edit Microsoft Word documents (.docx). Use for document editing and content extraction. |
.docx file.docx content to plain text.doc file — see pitfalls belowpython-docx is available. If not, install: pip install --user python-docxrun_code with python-docx to read, inspect, or modify the file.Extract all text:
import docx
doc = docx.Document("/path/to/file.docx")
for para in doc.paragraphs:
if para.text.strip():
print(para.text)
List headings:
import docx
doc = docx.Document("/path/to/file.docx")
for para in doc.paragraphs:
if para.style.name.startswith("Heading"):
print(f"[{para.style.name}] {para.text}")
Extract tables:
import docx
doc = docx.Document("/path/to/file.docx")
for i, table in enumerate(doc.tables):
print(f"Table {i+1}:")
for row in table.rows:
print([cell.text for cell in row.cells])
Replace text (preserving styles — run level):
import docx
doc = docx.Document("/path/to/file.docx")
old_text = "FooBar Inc."
new_text = "Acme Corp."
for para in doc.paragraphs:
for run in para.runs:
if old_text in run.text:
run.text = run.text.replace(old_text, new_text)
doc.save("/path/to/output.docx")
Add a paragraph:
import docx
doc = docx.Document("/path/to/file.docx")
doc.add_paragraph("New paragraph text here.")
doc.save("/path/to/output.docx")
Convert old .doc to .docx via LibreOffice:
libreoffice --headless --convert-to docx /path/to/file.doc --outdir /tmp/
.doc files cannot be read by python-docx. Convert to .docx first using LibreOffice.para.text = ...) strips all formatting. Always edit at the run level.scripts/docx_text.py to inspect.python-docx is a third-party package — install via execute_shell before run_code.scripts/docx_text.py — extract full document text with run/paragraph structurescripts/docx_replace.py — safe run-level text replacement