Command Palette

Search for a command to run...

Назад к скиллам
скилл № 28965

word-zotero-track-changes

Use when editing an existing Word (.docx) manuscript so the edits appear as tracked changes, especially one with live Zotero citation fields or co-authors'…

БесплатноБез исполняемых скриптов
mronkkoот mronkko★ 34 звезды на GitHub

Установить word-zotero-track-changes в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Об этом скилле

Word + Zotero track changes

Edit a co-authored Word manuscript so that every change shows up in Word as an ordinary tracked change by one named author, Zotero citations stay live fields, and co-authors' pending changes survive untouched.

Word stores a .docx as zipped XML (OOXML). The tooling here edits word/document.xml directly with w:ins / w:del tracked-change markup. Generic "edit the XML" approaches break on run merging, on nested insertions and on Zotero fields; the pitfalls below each caused a real failure.

Companion skills

  • grounded-citations — every citation you insert follows its rules: consult the source first; it must support the claim in context.
  • zotero-operations / the Zotero MCP tools — item keys, and the item's Zotero JSON (format="json") for items not yet cited in the document.
  • critic-loop — after an editing round, run the critics on the accepted-text preview check_docx.py --preview writes. Their fixes come back through this skill.
  • Anthropic docx skill (optional) — check_docx.py runs its validate.py when installed under ~/.claude, verifying every change is tracked under the author. Without it that check is skipped with a warning. Use that skill for new documents, comments and PDF rendering.

Tools and requirements

Steps 2, 3 and 5 are tools of the plugin's MCP server: track_changes_unpack, track_changes_inspect, track_changes_check. In Claude Code their full names start mcp__plugin_academic-research_academic-research__. Their paths are project-relative and must stay inside the project. Use a work directory such as .claude/redline/round1 (WORK below).

  • Terminal equivalent. Use these commands only when the tools are unavailable, or when the manuscript lives outside the project. $R is ${CLAUDE_PLUGIN_ROOT}/scripts/track_changes:
    • uv run $R/unpack_docx.py manuscript.docx WORK
    • uv run $R/inspect_docx.py WORK/unpacked/word/document.xml [FROM [TO]] [--fields] [--authors]
    • uv run $R/check_docx.py WORK/unpacked WORK/out.docx --original WORK/00_original.docx --author "…" --preview WORK/preview.md
  • Step 4 has no tool: it runs your own Python through uv run $R/run_edits.py.
  • Needs uv. pandoc is needed for the preview.

Workflow

  1. Pre-flight.

    • Confirm the author name to record. Use exactly the form already in the document's tracked changes (e.g. Surname, Given); track_changes_inspect with authors lists them after step 2.
    • In a synced folder (OneDrive, Dropbox), check that no ~$ lock file exists and no co-author has the file open.
  2. Snapshot and unpack. track_changes_unpack (docx, workdir) writes WORK/00_original.docx and WORK/unpacked/. Do not run run-merging scripts afterwards (see Pitfalls).

  3. Inspect. track_changes_inspect (document_xml = WORK/unpacked/word/document.xml) lists the paragraphs in its log file (log_path); read the part you need. Each line is [index] (style) text, with 0-based indices and {+inserted+}, {-deleted-} and [ZFIELD] marks. fields reports field balance, Zotero field types and the cited library: zotero.org/groups/<id> gives the library_id and library_type for Citer. authors reports tracked-change authors.

  4. Edit. Write an edit script (edits.py) in WORK. Run it from there with uv run $R/run_edits.py edits.py, which makes the library importable. Paths in the script resolve against the current directory:

    from redline import Doc
    from zotero_fields import Citer
    d = Doc('unpacked/word/document.xml', author='Surname, Given')
    citer = Citer(open(d.path, encoding='utf8').read(),
                  library_id='<group or user id>', library_type='groups')
    p = d.find_para('unique visible text')
    d.replace_text(p, 'old wording', [
        'new wording ',
        citer.cite('(Author, 2020, p. 5)', citer.item('ITEMKEY', locator='5')),
        '.'])
    d.save()
    
    Method Notes
    find_para(text) Matches visible (accepted) text.
    replace_text(p, old, pieces) old must not cross a field boundary; [] deletes.
    insert_text_after(p, after, pieces) Skips past a field the anchor lands in.
    insert_paragraph_after(anchor, pieces) Paragraph mark is tracked too.
    delete_paragraph(p) Tracked deletion of content and mark.
    move_paragraph(src, after) Delete + insert; renews copied citationIDs.
    delete_field(p, result_text) Removes a whole citation field.
    • Anchors (find_para, old, after) match the visible text, citation results like (Smith, 2020) included. find_para raises on several matches — lengthen the text or pass occurrence=k (1-based); the text methods take occurrence= too.
    • Pieces are 'text', ('i', 'italic'), or a citer.cite(...) result.
    • The first argument of cite i
Полный SKILL.md на GitHub

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

  • references/zotero-fields.md

FAQ

Что делает скилл word-zotero-track-changes?

Use when editing an existing Word (.docx) manuscript so the edits appear as tracked changes, especially one with live Zotero citation fields or co-authors' pending changes. Trigger phrases "edit the manuscript with track changes", "redline the docx", "insert citations into the Word file". Do NOT use for a new Word document — use `docx`. Do NOT use for Quarto/Markdown manuscripts — use `manuscript-revision`. Do NOT use for choosing what to cite — use `grounded-citations`.

Как установить скилл word-zotero-track-changes?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл word-zotero-track-changes запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

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

Сравнить word-zotero-track-changes с