Work on an EXISTING Word document with the WordCraft engine in one command: convert docx/doc/odt/rtf/html/md to PDF, Markdown, HTML, text or page images; print a PDF or PNG WITH tracked changes and comments shown (print markup); get word and page counts; see the document structure; render a page to PNG for a visual check; find-and-replace across a document saved as tracked changes by a named author. Use for: this Word file to PDF, show the tracked changes, extract the text of a .doc/.docx/.rtf/.odt, preview a page, replace a term everywhere with change tracking. For writing a NEW letter or report use docx-writer. Triggers: docx to pdf, tracked changes, redline, comments, convert word file, page preview, .doc .rtf .odt.
Say it in your own words; the assistant finds this recipe by itself. Examples:
Work on an EXISTING Word document with the WordCraft engine in one command: convert docx/doc/odt/rtf/html/md to PDF, Markdown, HTML, text or page images; print a PDF or PNG WITH tracked changes and comments shown (print markup); get word and page counts; see the document structure; render a page to PNG for a visual check; find-and-replace across a document saved as tracked changes by a named author. Use for: this Word file to PDF, show the tracked changes, extract the text of a .doc/.docx/.rtf/.odt, preview a page, replace a term everywhere with change tracking. For writing a NEW letter or report use docx-writer. Triggers: docx to pdf, tracked changes, redline, comments, convert word file, page preview, .doc .rtf .odt.
python3 /skills/word-craft/scripts/word.py <verb> … wraps wordcraft-cli, a native engine that
reads and writes real .docx (and reads .doc, .rtf, .odt) without Word or LibreOffice. Every verb
prints one OK … or one ERROR … line. Inputs are in /work/in; write results to /work/out.
| Need | Command |
|---|---|
| docx/doc/odt/rtf → PDF | word.py convert /work/in/report.docx /work/out/report.pdf |
| PDF showing tracked changes and comments | word.py convert /work/in/contract.docx /work/out/contract-redline.pdf --markup |
| Text or Markdown out of any Word-family file | word.py convert /work/in/old.doc /work/out/old.md (or .txt, .html) |
| Page count, words, properties | word.py info /work/in/report.docx |
| Preview page 3 as an image | word.py render /work/in/report.docx /work/out/page-3.png --page 3 |
| Replace everywhere, as tracked changes | word.py replace /work/in/contract.docx /work/out/contract.docx --find "Acme" --with "Percerno" --author "Review bot" |
| Structure (headings, tables, sections) as JSON | word.py inspect /work/in/report.docx |
Other edits: wordcraft-cli commands lists every editing command; word.py edit IN OUT --script
edit.json --author NAME runs a list of {"command", "params"} the same way deck.py edit does.
Render the result or convert it to PDF afterwards to check it, and give the person the links.
SKILL.mdscripts/word.pyWritten by Percerno, MIT licence.