一键导入
docx
Use this skill to read or create Word documents (.docx files). Supports text extraction and document creation with headings and lists.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use this skill to read or create Word documents (.docx files). Supports text extraction and document creation with headings and lists.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use this skill whenever the user wants to do anything with PDF files — reading, extracting, creating professional documents, filling forms.
Use this skill for spreadsheet tasks — reading, creating, or analyzing .xlsx, .xls, .csv, or .tsv files.
Create beautiful visual art in .png and .pdf documents using design philosophy. Use when the user asks to create a poster, piece of art, design, or other static visual piece.
Use this skill whenever the user wants to do anything with PowerPoint presentations — reading, extracting text, creating professional slide decks.
Use this skill when the user wants to interact with Feishu/Lark — manage calendars, send messages, create/edit documents, manage tasks, upload/download files, query contacts, or any Feishu workspace operations via the official lark-cli tool.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems.
| name | docx |
| description | Use this skill to read or create Word documents (.docx files). Supports text extraction and document creation with headings and lists. |
| metadata | {"yiyi":{"emoji":"📝","requires":{}}} |
Drive everything through Python python-docx via run_python_script.
If the package isn't present, call pip_install(["python-docx"]).
# read_docx.py
import sys
from docx import Document
doc = Document(sys.argv[1])
for p in doc.paragraphs:
if p.text.strip():
print(p.text)
For richer extraction (headings, lists, tables), inspect p.style.name
and iterate doc.tables.
# create_docx.py
from docx import Document
doc = Document()
doc.add_heading("Report Title", 0)
doc.add_heading("Introduction", level=1)
doc.add_paragraph("This is the first paragraph.")
doc.add_paragraph("Item one", style="List Bullet")
doc.add_paragraph("Item two", style="List Bullet")
doc.add_heading("Conclusion", level=1)
doc.add_paragraph("Final remarks.")
doc.save("/path/to/output.docx")
pdf skill to extract text via pypdf.create_docx.py to write that text into a new Word document.xlsx skill to read + aggregate the data.create_docx.py to write a formatted report.Remove tracked changes by accepting them all:
python3 scripts/accept_changes.py input.docx output.docx
Add comments or replies to a DOCX document:
# First unpack the DOCX
python3 -c "from scripts.office.unpack import unpack; unpack('doc.docx', 'unpacked/')"
# Add a comment (id=0)
python3 scripts/comment.py unpacked/ 0 "Comment text"
# Add a reply to comment 0
python3 scripts/comment.py unpacked/ 1 "Reply text" --parent 0
# Repack
python3 -c "from scripts.office.pack import pack; pack('unpacked/', 'output.docx')"
For complex documents with tables, images, page numbers, or tracked changes:
from docx import Document
doc = Document()
doc.add_heading("Report Title", 0)
doc.add_paragraph("Content paragraph...")
table = doc.add_table(rows=2, cols=3)
doc.save("output.docx")
Check: python3 -c "import docx; print('OK')"
pandoc input.md -o output.docx # Markdown → DOCX
pandoc input.docx -o output.md # DOCX → Markdown
pandoc input.docx -o output.pdf # DOCX → PDF
| Task | Approach |
|---|---|
| Read / extract text | Python python-docx (pip_install(["python-docx"]) if missing) |
| Create with headings/lists | Python python-docx |
| Accept tracked changes | scripts/accept_changes.py (requires LibreOffice) |
| Add comments | scripts/comment.py (requires unpack/repack) |
| Complex formatting | Python python-docx |
| Format conversion | pandoc CLI |