docx-word-processor
shalomb/agent-skills/skills/docx-word-processor/SKILL.md
Use this skill whenever you need to create, read, edit, or manipulate Word documents (.docx files). Trigger this on any mention of 'Word doc', 'word document', '.docx', or requests to produce formatted deliverables like reports, memos, or letters. Use this for extracting text, inserting images, tracking changes, or converting content to Word format. Do NOT use for PDFs or spreadsheets.
- Installs packages
What's in it
- DOCX creation, editing, and analysis
- Overview
- Task Quick Start
- Reference Materials
- Critical Rules
- For docx-js (Creating)
- For XML Editing (Modifying)
- Dependencies
--- name: docx-word-processor description: "Use this skill whenever you need to create, read, edit, or manipulate Word documents (.docx files). Trigger this on any mention of 'Word doc', 'word document', '.docx', or requests to produce formatted deliverables like reports, memos, or letters. Use this for extracting text, inserting images, tracking changes, or converting content to Word format. Do NOT use for PDFs or spreadsheets." license: Proprietary. LICENSE.txt has complete terms --- # DOCX creation, editing, and analysis ## Overview A .docx file is a ZIP archive containing XML files. ## Task Quick Start | Task | Approach | |------|----------| | **Analyze content** | `pandoc document.docx -o output.md` | | **Convert .doc** | `python scripts/office/soffice.py --convert-to docx document.doc` | | **Create new doc** | Use `docx-js`. See [references/creating.md](references/creating.md) | | **Edit existing doc** | Unpack → edit XML → repack. See [references/editing.md](references/editing.md) | | **Clean changes** | `python scripts/accept_changes.py input.docx output.docx` | | **Convert to PDF** | `python scripts/office/soffice.py --convert-to pdf document.docx` | ## Reference Materials To ensure high-quality document manipulation, refer to these detailed guides: - **Creating Documents**: [references/creating.md](references/creating.md) - Full guide for `docx-js` (JavaScript). - **Editing Documents**: [references/editing.md](references/editing.md) - Detailed workflow for unpacking and editing XML directly. - **XML Reference**: [references/editing.md#xml-reference](references/editing.md#xml-reference) - Patterns for tracked changes, comments, and images. ## Critical Rules ### For docx-js (Creating) - **Set page size explicitly** - Defaults to A4; use US Letter (12240 x 15840 DXA) for US documents. - **Tables need dual widths** - `columnWidths` array AND cell `width`, both must match in DXA. - **Never use `\n` or unicode bullets** - Use separate Paragraphs and `LevelFormat.BULLET`. ### For XML Editing (Modifying) - **Author Identity**: Use "Claude" for tracked changes and comments. - **Minimal edits** - Only mark what actually changes in the XML. - **Comment Markers**: Siblings of `<w:r>`, never inside. ## Dependencies - **pandoc**: Text extraction - **docx**: `npm install -g docx` (new documents) - **LibreOffice**: PDF conversion (`scripts/office/soffice.py`) - **Poppler**: `pdftoppm` for images
More agent context in shalomb/agent-skills
86 other files this repository gives its agents, the first 60 shown.
AGENTS.md
Skill
- adrskills/adr/SKILL.md
- adzic-bddskills/adzic-bdd/SKILL.md
- agent-md-refactorskills/agent-md-refactor/SKILL.md
- agent-muxskills/agent-mux/SKILL.md
- agent-role-impersonatorskills/agent-role-impersonator/SKILL.md
- agilquest-reservationsskills/agilquest-reservations/SKILL.md
- ai-text-humanizerskills/ai-text-humanizer/SKILL.md
- architecture-decision-recordsskills/architecture-decision-records/SKILL.md
- ast-grepskills/ast-grep/SKILL.md
- atacskills/atac/SKILL.md
- aws-cliskills/aws-cli/SKILL.md
- bart-adversarial-reviewerskills/bart-adversarial-reviewer/SKILL.md
- bddskills/bdd/SKILL.md
- branch-doctorskills/branch-doctor/SKILL.md
- c4-architectureskills/c4-architecture/SKILL.md
- c4skills/c4/SKILL.md
- claude-sub-agentskills/claude-sub-agent/SKILL.md
- codemap-config-setupskills/codemap-config-setup/SKILL.md
- codemap-exploreskills/codemap-explore/SKILL.md
- codemap-handoffskills/codemap-handoff/SKILL.md
- codemap-hub-safetyskills/codemap-hub-safety/SKILL.md
- codemapskills/codemap/SKILL.md
- commitskills/commit/SKILL.md
- copilot-sub-agentskills/copilot-sub-agent/SKILL.md
- daily-standupskills/daily-standup/SKILL.md
- daily-statusskills/daily-status/SKILL.md
- debugskills/debug/SKILL.md
- design-thinkingskills/design-thinking/SKILL.md
- doctorskills/doctor/SKILL.md
- farley-tddskills/farley-tdd/SKILL.md
- forensicsskills/forensics/SKILL.md
- gemini-sub-agentskills/gemini-sub-agent/SKILL.md
- git-commit-formatterskills/git-commit-formatter/SKILL.md
- git-forensicsskills/git-forensics/SKILL.md
- github-actions-permissionsskills/github-actions-permissions/SKILL.md
- github-cliskills/github-cli/SKILL.md
- git-repo-discoveryskills/git-repo-discovery/SKILL.md
- git-safety-guardrailsskills/git-safety-guardrails/SKILL.md
- harness-idpskills/harness-idp/SKILL.md
- humanizeskills/humanize/SKILL.md
- iteration-plannerskills/iteration-planner/SKILL.md
- jira-issue-managerskills/jira-issue-manager/SKILL.md
- justfile-assistantskills/justfile-assistant/SKILL.md
- kiro-sub-agentskills/kiro-sub-agent/SKILL.md
- lessons-learnedskills/lessons-learned/SKILL.md
- lessonsskills/lessons/SKILL.md
- lisa-planning-agentskills/lisa-planning-agent/SKILL.md
- lovejoy-release-agentskills/lovejoy-release-agent/SKILL.md
- lsp-code-analysisskills/lsp-code-analysis/SKILL.md
- macro-to-microskills/macro-to-micro/SKILL.md
- marge-product-agentskills/marge-product-agent/SKILL.md
- meeting-notesskills/meeting-notes/SKILL.md
- mermaid-diagram-generatorskills/mermaid-diagram-generator/SKILL.md
- modern-cli-overridesskills/modern-cli-overrides/SKILL.md
- native-web-searchskills/native-web-search/SKILL.md
- obsidian-notetakerskills/obsidian-notetaker/SKILL.md
- outlook-headlessskills/outlook-headless/SKILL.md
- pdf-document-processorskills/pdf-document-processor/SKILL.md
- pi-sub-agentskills/pi-sub-agent/SKILL.md
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

