Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Convert Word documents to structured markdown for LLM-assisted editing, then convert back to Word with preserved formatting. Make sure to use this whenever the user wants to work on, revise, draft, fill in, or collaboratively edit a .docx and then produce a final .docx again. Prefer this over markitdown or docx-to-markdown whenever round-trip editing fidelity matters.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 205% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 75% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 87% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 21% | 0% |
| case-13 | ✗→✓ | ▲ Improved | 197% | 0% |
Convert Microsoft Word documents (.docx) to structured markdown for easy editing with LLM assistance, then convert back to Word format with all formatting preserved.
Use this skill when:
Converts a .docx file into a structured markdown file with special markers that preserve the exact structure of the original document.
You (Claude Code) can now edit the structured markdown file. The structure markers ensure the content maps back perfectly to the Word template.
Converts the edited structured markdown back to a .docx file, using the original as a template to preserve all formatting.
When user says:
Steps:
bash python3 ./scripts/docx_draft_converter.py --to-structured <input.docx> [output.md]
Example:
bashpython3 ./scripts/docx_draft_converter.py --to-structured ~/pdr/PDR_Form_Jan2026.docx
Output: ~/pdr/PDR_Form_Jan2026_DRAFT.md
When user says:
Steps:
_DRAFT.md)bash python3 ./scripts/docx_draft_converter.py --to-docx <draft.md> [output.docx]
_FINAL.docx fileExample:
bashpython3 ./scripts/docx_draft_converter.py --to-docx ~/pdr/PDR_Form_Jan2026_DRAFT.md
Output: ~/pdr/PDR_Form_Jan2026_FINAL.docx
The structured markdown uses special markers that you MUST preserve:
markdown--- DOCX_DRAFT_FORMAT: v1.0 ORIGINAL_DOCX: filename.docx ORIGINAL_PATH: /full/path/to/filename.docx ORIGINAL_HASH: abc123... CONVERSION_DATE: 2026-01-19T12:00:00 ---
DO NOT MODIFY the metadata block. The conversion process depends on it.
markdown[PARA:0] This is the content of a paragraph. [/PARA:0]
Editing rules:
[PARA:N] and [/PARA:N]markdown[TABLE:5:rows=4:cols=3] [ROW:0] [CELL:0,0] Header 1 [/CELL:0,0] [CELL:0,1] Header 2 [/CELL:0,1] [CELL:0,2] Header 3 [/CELL:0,2] [/ROW:0] [ROW:1] [CELL:1,0] Data in row 1, column 1 [/CELL:1,0] [CELL:1,1] Data in row 1, column 2 [/CELL:1,1] [CELL:1,2] Data in row 1, column 3 [/CELL:1,2] [/ROW:1] [/TABLE:5]
Editing rules:
[TABLE:N], [ROW:N], [CELL:r,c], closing tags[CELL:r,c] and [/CELL:r,c]When editing a structured markdown file:
[PARA] or [TABLE] blocks[PARA:N] needs its [/PARA:N]If the original .docx is not found during back-conversion:
Error: Original file not found at /path/to/original.docxResponse:
ORIGINAL_PATH in metadataIf the hash doesn't match:
Error: Original file has been modified (hash mismatch)Response: Warn the user that the original template was changed. Ask if they want to:
Initial request: > User: "I need to work on Quarterly_Review_Form_Jan2026.docx"
Your response:
I'll convert Quarterly_Review_Form_Jan2026.docx to a structured draft format so we can work on it together.
[Run conversion command]
✓ Created Quarterly_Review_Form_Jan2026_DRAFT.md
⚠️ Important: Keep the original Quarterly_Review_Form_Jan2026.docx file in its current location.
You'll need it to convert back to Word format when you're done.
You can now tell me what sections you'd like to work on, and I'll help you draft the content.During editing: > User: "Fill in the Part 1 section with my achievements"
Your response:
I'll edit the Part 1 section in the structured draft. I'll make sure to keep all the structure
markers intact while updating the content.
[Edit content between appropriate markers]
Done! The Part 1 section now includes your achievements. Would you like to work on another section?Finalization: > User: "I'm happy with the draft. Convert it back to Word."
Your response:
I'll convert your draft back to Word format now.
[Run back-conversion command]
✓ Created Quarterly_Review_Form_Jan2026_FINAL.docx
Your final Word document is ready! All formatting from the original template has been preserved../scripts/docx_draft_converter.pypython-docx library1. Read the draft file to locate the section
2. Find the relevant [PARA] or [TABLE] markers
3. Edit content within markers
4. Confirm changes with user1. User provides content for section A → Edit [PARA:X]
2. User provides content for section B → Edit [PARA:Y]
3. User reviews → Make adjustments
4. User approves → Convert back to Word1. Identify table by [TABLE:N] marker
2. Locate specific cells by [CELL:row,col]
3. Fill in cell content
4. Maintain all cell markersThis skill enables efficient collaborative document drafting while maintaining perfect fidelity to the original Word document format.
Other measured skills in the registry, with their headline benchmark lift.