$npx -y skills add axoviq-ai/synthadoc --skill docxExtract text from Microsoft Word documents
| 1 | # DOCX Skill |
| 2 | |
| 3 | Extracts paragraph text from `.docx` files using `python-docx`. |
| 4 | |
| 5 | ## Setup |
| 6 | |
| 7 | ```bash |
| 8 | pip install python-docx |
| 9 | ``` |
| 10 | |
| 11 | ## Standalone usage |
| 12 | |
| 13 | ```python |
| 14 | import asyncio |
| 15 | from synthadoc.skills.docx.scripts.main import DocxSkill |
| 16 | |
| 17 | skill = DocxSkill() |
| 18 | |
| 19 | async def main(): |
| 20 | result = await skill.extract("/path/to/document.docx") |
| 21 | print(result.text) # all paragraphs joined as plain text |
| 22 | |
| 23 | asyncio.run(main()) |
| 24 | ``` |
| 25 | |
| 26 | ## When this skill is used |
| 27 | |
| 28 | - Source path ends with `.docx` |
| 29 | - User intent contains: `word document`, `docx` |