docx
Skill25 starsChanged 5 months agoMITView on GitHub
Create, read, and edit Microsoft Word (.docx) files. Use whenever the user wants to produce a Word document, extract text from a .docx, perform find-and-replace in a Word file, work with headings, tables, page numbers, or letterheads, insert/replace images, or convert content into a polished Word document. Do NOT use for PDFs, spreadsheets, or Google Docs.
- Installs packages
We split this skill into the rules it gives an agent
9 rules. 0 are common, 8 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 189 edited versions we read keep these.
8
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Do NOT trigger when:
- Distinctive: line 42
Existing template?: If yes, load it and modify — don't start from scratch
- Distinctive: line 123
Use the hierarchy — Word's ToC and accessibility tools depend on it.
- Distinctive: line 128
Check that headings show in the navigation pane
- Distinctive: line 129
Check that page numbers appear if added
- Distinctive: line 130
Check that images aren't oversized or distorted
- Very specific: line 142
Don't overwrite source files by default: Write to a new path (e.g., input.edited.docx).
- Distinctive: line 145
Fonts: Use system fonts (Calibri, Arial, Helvetica, Times New Roman).
- Distinctive: line 146
Sensitive data: If the doc contains contracts, PII, or confidential terms, don't print contents to logs.
“Common” is measured: kept by at least 6 in 10 of the 189 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Word Document Skill
Your Role
You are a document operator who produces polished Word documents that procurement teams, legal counsel, and executives accept without complaint. You use Python's python-docx library to create and edit .docx files. You respect Word conventions — proper headings, styles, tables, and page numbers — rather than generating a wall of plain text and calling it a Word doc.
When to use this skill
Trigger when:
- The user references a
.docxfile by name or path - The user wants to create a Word document (report, memo, letter, template, proposal)
- The user wants to read or extract content from a
.docx - The user wants find-and-replace in a Word file
- The user wants to insert or replace images, add tables, or work with headers/footers
- The user mentions "Word doc," "Word document," "letterhead," "memo," "template"
Do NOT trigger when:
- The deliverable is a PDF, spreadsheet, Google Doc, or HTML page
- The user wants tracked changes/comments and the situation requires full Microsoft Word feature parity (python-docx has limits here)
Required libraries
- python-docx — read/write
.docx, styles, headings, tables, images, headers/footers - docx2txt (optional) — quick text extraction
- Pillow — if inserting images
Install if missing: pip install python-docx Pillow.
Process
Step 1: Understand the Target
Get from the user:
- What document type? Memo, letter, report, proposal, template
- Length? 1 page, 10 pages, longer
- Sections? Headings, ToC, page numbers, footers
- Branding? Logo on first page, header on each page, font family, color
- Existing template? If yes, load it and modify — don't start from scratch
Step 2: Set Up Document Structure
Common pattern:
from docx import Document
from docx.shared import Inches, Pt, RGBColor
from docx.enum.text import WD_ALIGN_PARAGRAPH
doc = Document() # or Document("template.docx") to load a template
# Set default font
style = doc.styles["Normal"]
style.font.name = "Calibri"
style.font.size = Pt(11)
# Add a heading
doc.add_heading("Document Title", level=0)
# Add a paragraph
p = doc.add_paragraph("Body text here.")
# Add a table
table = doc.add_table(rows=3, cols=2)
table.style = "Light Grid Accent 1"
table.rows[0].cells[0].text = "Header A"
table.rows[0].cells[1].text = "Header B"
# Add an image
doc.add_picture("logo.png", width=Inches(2))
# Save
doc.save("output.docx")Step 3: Common Patterns
Find-and-replace across the document:
def replace_in_paragraphs(doc, search, replace):
for para in doc.paragraphs:
if search in para.text:
for run in para.runs:
if search in run.text:
run.text = run.text.replace(search, replace)
for table in doc.tables:
for row in table.rows:
for cell in row.cells:
for para in cell.paragraphs:
if search in para.text:
for run in para.runs:
run.text = run.text.replace(search, replace)Page numbers in footer:
from docx.oxml.ns import qn
from docx.oxml import OxmlElement
section = doc.sections[0]
footer = section.footer
p = footer.paragraphs[0]
p.alignment = WD_ALIGN_PARAGRAPH.CENTER
# Insert page number field
run = p.add_run()
fldChar1 = OxmlElement("w:fldChar")
fldChar1.set(qn("w:fldCharType"), "begin")
instrText = OxmlElement("w:instrText")
instrText.text = "PAGE"
fldChar2 = OxmlElement("w:fldChar")
fldChar2.set(qn("w:fldCharType"), "end")
run._r.extend([fldChar1, instrText, fldChar2])Headings with proper hierarchy:
doc.add_heading("...", level=0)— titlelevel=1— H1 / chapterlevel=2— H2 / sectionlevel=3— H3 / subsection
Use the hierarchy — Word's ToC and accessibility tools depend on it.
Step 4: Verify
Before declaring done:
- Open the output in Word or Pages and confirm it renders correctly
- Check that headings show in the navigation pane
- Check that page numbers appear if added
- Check that images aren't oversized or distorted
Step 5: Hand Back
Tell the user:
- The output path
- A summary of what's in the doc (pages, sections, tables, images)
- Anything python-docx couldn't render that the user may want to add manually in Word (e.g., complex page layouts, tracked changes, comments)
Guardrails
- Use heading styles, not bold-large-font fakes. Heading hierarchy enables ToC, navigation, and accessibility.
- Use table styles, not manual cell coloring. Built-in styles (
Light Grid Accent 1etc.) survive style updates. - Don't overwrite source files by default. Write to a new path (e.g.,
input.edited.docx). - python-docx has limits: It can't do tracked changes, comments, or complex page layouts. For those, hand back the doc and tell the user to finish manually.
- Letterheads with first-page-different headers: Set
section.different_first_page_header_footer = True. - Fonts: Use system fonts (Calibri, Arial, Helvetica, Times New Roman). Custom fonts may not render on the user's machine.
- Sensitive data: If the doc contains contracts, PII, or confidential terms, don't print contents to logs.
Other versions194 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 194
- anthropics/skills★ 186ksame name
- spinabot/brigade★ 11ksame name
- netease-youdao/LobsterAI★ 6.2ksame name
- OpenBMB/PilotDeck★ 4.5ksame name
- nextlevelbuilder/goclaw★ 3.7ksame name
- jjyaoao/HelloAgents★ 3.2ksame name
- anthropics/claude-agent-sdk-demos★ 2.8ksame name
- K-Dense-AI/claude-scientific-writer★ 2.4ksame name
- OpenCoworkAI/open-cowork★ 2.2ksame name
- ChenglinPoly/infiAgent★ 1.2ksame name
184 more not listed
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.
Used alongsideProjects with it also use gift-evaluator, Podcast Generate and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
dav-niu474Skillgift-evaluator
The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.
Also in 5 projects that use this
dav-niu474SkillPodcast Generate
Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).
Also in 5 projects that use this
huang-x-hSkillVideo Generation
Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.
Also in 6 projects that use this
huang-x-hSkillVLM
Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions.
Also in 6 projects that use this
SeifBenayedSkillfile-reading
Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.
Also in 5 projects that use this
SeifBenayedSkillpdf-reading
Use this skill when you need to read, inspect, or extract content from PDF files — especially when file content is NOT in your context and you need to read it from disk. Covers content inventory, text extraction, page rasterization for visual inspection, embedded image/attachment/table/form-field extraction, and choosing the right reading strategy for different document types (text-heavy, scanned, slide-decks, forms, data-heavy). Do NOT use this skill for PDF creation, form filling, merging, splitting, watermarking, or encryption — use the pdf skill instead.
Also in 6 projects that use this
- +1 more from huang-x-h
- +5 more from dav-niu474
In this repository65 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- abmSkill
- agent-orchestrationSkill
- battlecardSkill
- board-updateSkill
- bookkeeping-helperSkill
- brainstormSkill
- campaignSkill
- cash-flow-forecastSkill
- changelogSkill
- churn-early-warningSkill
- cold-emailSkill
- competitive-intelSkill
- competitor-alternativesSkill
- contract-reviewSkill
- crmSkill
- customer-support-triageSkill
- deal-strategySkill
- decision-logSkill
- design-systemSkill
- focus-timeSkill
- forecast-narrativeSkill
- hiring-briefSkill
- hiring-kitSkill
- inbox-triageSkill
- inbox-zeroSkill
- invoice-generatorSkill
- kitSkill
- launchSkill
- local-marketingSkill
- marketing-psychologySkill
- meeting-prepSkill
- messagingSkill
- micrositeSkill
- objection-handlerSkill
- one-pagerSkill
- owner-dashboardSkill
- pdfSkill
- pipeline-healthSkill
- pmmSkill
- post-call-summarySkill
- pptxSkill
- pricing-servicesSkill
- pricing-strategySkill
- programmatic-seoSkill
- proposalSkill
- prospect-researchSkill
- qbr-builderSkill
- referralSkill
- repurposeSkill
- review-responseSkill
- roadmapSkill
- roi-calculatorSkill
- seo-auditSkill
- sequenceSkill
- sop-writerSkill
- standupSkill
- tax-prep-helperSkill
- territory-analyzerSkill
- The first 60 shown.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

