К основному содержанию
скилл CX Codex

docx · appautomaton — скилл для Claude Code: правки Word с рецензированием

Скилл для работы с .docx: создаёт документы, вносит правки с отслеживанием, читает комментарии и сноски. Нужен, когда агент трогает чужой договор или отчёт.

Установить в Claude Code · Через Skills CLI (Vercel) Все способы и платформы ↓
npx skills add appautomaton/document-SKILLs --skill docx -a claude-code
Открыть на GitHub

Что делает docx

Скилл закрывает то, чего не видно из кода: библиотека для корректных tracked changes и комментариев, проверка схемы, которая ловит неотслеженные правки, и рендер страниц в PNG, чтобы посмотреть документ глазами читателя. Ещё внутри описаны поведения docx-js и OOXML, из-за которых файл молча ломается.

Рабочий процесс разбит на шаги. Сначала документ читают через pandoc --track-changes=all file.docx -t markdown, потом распаковывают скриптом unpack.py, правят скриптом на библиотеке Document и собирают обратно через pack.py. doc.save() отказывается писать файл с неотслеженными правками или сломанной схемой и печатает расхождения — скрипт правят, а не пропускают проверку. Для приёмки и отклонения чужих правок есть doc.accept_all_changes() и doc.reject_all_changes().

Для рендера страниц нужны LibreOffice (soffice) и poppler (pdftoppm), для чтения — pandoc. Node-скрипты запускаются с NODE_PATH=<skill>/node_modules, и если папки нет, npm install в каталоге скилла делают один раз. Отдельная ловушка: pandoc годится для чтения, но не для выдачи результата — он перезаписывает документ целиком и теряет форматирование, комментарии и правки.

Какие задачи решает

  • создать .docx из шаблона и данных
  • внести правки в чужой договор с отслеживанием
  • прочитать комментарии и сноски из готового файла
  • принять или отклонить чужие tracked changes
  • проверить, что все изменения помечены как правки

Примеры запросов агенту

  • прочитай contract.docx и покажи все правки и комментарии
  • внеси правки в этот договор через tracked changes
  • собери reviewed.docx из распакованной папки и проверь схему

Как установить docx

1Через Skills CLI (Vercel)

npx skills add appautomaton/document-SKILLs --skill docx -a claude-code

2Вручную: положить файлы

~/.claude/skills/docx/SKILL.md

Папка скилла целиком; для одного проекта — .claude/skills/docx/

По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов

Вопросы о docx

Как установить docx в Claude?

Выполните npx skills add appautomaton/document-SKILLs --skill docx -a claude-code. Скилл появится в ~/.claude/skills/docx/SKILL.md.

Что делает скилл docx?

Создаёт и правит документы Word, читает текст, комментарии и отслеженные изменения. Отдельно проверяет, что каждая правка помечена, и рендерит страницы в PNG.

Что нужно для работы скилла?

Для рендера страниц — LibreOffice (soffice) и poppler (pdftoppm), для чтения — pandoc. Node-скриптам нужен NODE_PATH=<skill>/node_modules.

Исходный текст

SKILL.md · MIT
---
name: docx
description: 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.
---

# 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:

```bash
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

| Task | Use |
|---|---|
| Read the text | `pandoc --track-changes=all file.docx -t markdown`. It also shows tracked changes and comments. Use `accept` or `reject` instead of `all` to see either outcome. |
| Create a document | docx-js: read [docx-js.md](docx-js.md) first. It covers the page size, style and image behaviours that otherwise break the file. |
| Edit someone else's document, or anything legal, academic, business or official | Tracked changes, so every edit is reviewable: the redlining workflow below. |
| Small edits to a document you created in this session | The same library, untracked. Make the edits, then call `doc.save(require_tracking=False)`, which still checks the schema. For larger changes, regenerate the file with docx-js. |
| Comments, metadata, embedded media, raw structure | Unpack and read the XML; [ooxml.md](ooxml.md) has the patterns. |

## Redlining workflow

1. **Read.** Convert the document with pandoc (above) and list every change you will make. Locate each one by its surrounding text, never by markdown line numbers, which have no relation to the XML.
2. **Unpack.** `uv run <skill>/ooxml/scripts/unpack.py contract.docx unpacked` prints a suggested RSID. Pass it as `Document(..., rsid=...)` so the session's edits share one revision ID.
3. **Edit.** Read [ooxml.md](ooxml.md), then write a script that uses the `Document` library. `tracked_replace(old, new)` handles most edits: it finds text across runs and marks only the words that differ. Work in batches of related changes, a few to a dozen per script, so a failure is easy to locate. Grep `unpacked/word/document.xml` again before each batch, because line numbers move after every save.
4. **Save.** `doc.save()` refuses to write a document with untracked edits, or with XML that breaks the schema, and prints what differs. Fix the script rather than skipping validation.
5. **Pack.** `uv run <skill>/ooxml/scripts/pack.py unpacked reviewed.docx` repacks the file and checks that LibreOffice can open it.
6. **Verify.** Run `pandoc --track-changes=all reviewed.docx -t markdown` and confirm every intended change appears and nothing else changed. Then check the output (below).

To accept or reject existing changes, call `doc.accept_all_changes()` or `doc.reject_all_changes()` before making edits of your own.

## Checking the output

1. **Validate.** `uv run <skill>/ooxml/scripts/validate.py reviewed.docx --original contract.docx` checks the schema, and that every change from the original is tracked; `doc.save()` runs the same checks. Pass `--author NAME` to let that author's earlier insertions be edited directly. For a document generated from scratch, leave out `--original` to check the schema alone.
2. **Look.** `uv run <skill>/ooxml/scripts/render.py reviewed.docx pages` prints one PNG path per page (`--pages 2-4` for a range). Read them before delivering a document you created or restructured. LibreOffice renders a docx-js table of contents empty; Word fills it in when it opens the file.

## Pitfalls that fail silently

- **Partial edits inside other authors' changes.** To remove text inside someone else's insertion, nest your `<w:del>` inside it. Never edit their text directly.
- **pandoc as an editor.** It rewrites the whole document and drops formatting, comments and tracked changes. Use it to read, never to produce the deliverable.

© appautomaton · MIT · appautomaton/document-SKILLs

Похожие скиллы

Всё по теме «Документы и офис» →

Сначала — docx от других авторов.

docx официальный anthropics Скилл создаёт, читает и редактирует документы Word и шаблоны. Подойдёт для отчётов, писем и файлов с таблицами, стилями и нумерацией страниц. 206 304установок docx nexu-io Скилл для создания, редактирования и анализа Word-документов с отслеживанием изменений, комментариями и форматированием. Пригодится для дизайн-брифов, копирайт-документов и материалов, готовых к согласованию. CX Codex +1 3 000установок docx Nous Research Скилл для создания, чтения, правки и валидации файлов .docx через CLI-скрипты на Python. Пригодится для сборки отчётов, заполнения шаблонов и работы с правками. CX Codex +1 306установок kimi-docx thvroyal Создаёт и редактирует файлы Word (.docx) через C# и Python с прямой правкой XML. Пригодится для сборки отчётов с обложками, графиками и отслеживанием правок. CX Codex +1 506установок word-document-processor qodex-ai Скилл для работы с .docx: чтение текста, создание файлов с нуля и правки с отслеживанием изменений. Пригодится, когда агенту нужно тронуть чужой договор или отчёт. CX Codex +1 3 600установок docx-manipulation claude-office-skills Скилл собирает и правит документы Word через python-docx: заголовки, таблицы, картинки, колонтитулы. Пригодится, когда отчёт или договор нужно сгенерировать кодом. CX Codex +1 6 100установок docx-generator agent-skills Скилл собирает и правит файлы Word: подставляет данные в шаблон или строит документ с нуля по JSON-описанию. CX Codex +1 734установок minimax-docx MiniMaxAI Скилл для генерации, заполнения и форматирования Word-документов через OpenXML SDK. Пригодится, когда агенту нужно выдать готовый .docx, а не просто текст. CX Codex +1 4 500установок file-conversion Seth Hobson Конвертирует локальные медиафайлы, документы и таблицы без отправки во внешние API. Работает через FFmpeg, ImageMagick, Pandoc и LibreOffice. CX Codex 3 100установок

Из того же набора3

Спонсоры проекта

Компании, которые помогают держать аналитику открытой