← ClaudeAtlas

docxlisted

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Use when extracting or reorganizing content from .docx files, inserting or replacing images, performing find-and-replace, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', or 'template' as a .docx file, use this skill.
Everfern-AI/Everfern · ★ 15 · Data & Documents · score 80
Install: claude install-skill Everfern-AI/Everfern
# DOCX Creation, Editing, and Analysis in EverFern ## Overview A .docx file is a ZIP archive containing XML files. In EverFern, you use native Windows tools and Python libraries directly to interact with them. You MUST use Windows paths (e.g., `C:\path\to\file.docx`). ## Quick Reference | Task | Approach | |------|----------| | Read/analyze content | `pandoc` or `python-docx` | | Create new document | Use `python-docx` | | Edit existing document | Use `python-docx` | ### Reading Content ```powershell # Text extraction pandoc "C:\path\to\document.docx" -o "C:\path\to\output.md" ``` --- ## Python `python-docx` (Preferred Method) The primary and safest way to manipulate Word documents in Python is the `python-docx` library. Install it if necessary: `pip install python-docx` ### Creating a New Document ```python from docx import Document from docx.shared import Inches, Pt, RGBColor from docx.enum.text import WD_ALIGN_PARAGRAPH doc = Document() # Add Title title = doc.add_heading('Document Title', 0) title.alignment = WD_ALIGN_PARAGRAPH.CENTER # Add Paragraph p = doc.add_paragraph('This is a paragraph with ') p.add_run('bold').bold = True p.add_run(' and ') p.add_run('italic').italic = True p.add_run(' text.') # Add a styled heading heading = doc.add_heading('Section 1', level=1) run = heading.runs[0] run.font.color.rgb = RGBColor(0x42, 0x24, 0xE9) # Add List doc.add_paragraph('First item in bulleted list', style='List Bullet') doc.add_paragraph('First item in numb