文档办公

docx

appautomaton/do…t-skills

Create, edit, review, and read Word documents (.docx), including tracked changes (redlines), comments, footnotes, tables, images, headers and page setup. Use when a task produces or modifies a .docx, reviews or redlines one, or needs its text, comments or tracked changes read.

  • 1290 次安装
  • 177 星标
  • 收录于

安装命令

npx skills add https://github.com/appautomaton/document-skills --skill docx

SKILL.md

Word documents

You already know Word's features. This skill adds what you can't see from the code: a library that makes tracked changes and comments correctly, validation that catches untracked edits, a way to see pages as a reader will, and the docx-js and OOXML behaviours that silently produce broken files.

Running scripts

<skill> is the directory containing this file. Run bundled scripts by absolute path from the user's working directory, so relative paths to their files keep working:

uv run <skill>/ooxml/scripts/unpack.py contract.docx unpacked

Run Python you write with its dependencies declared, either uv run --with defusedxml script.py or a PEP 723 header. Run Node scripts as NODE_PATH=<skill>/node_modules node build.js; if <skill>/node_modules is missing, run npm install in <skill> once. Rendering pages needs LibreOffice (soffice) and poppler (pdftoppm); reading needs pandoc.

Choosing a workflow