docx-repair
БесплатноЗапускает вложенные скриптыНе проверенUse to REPAIR a .docx damaged by a Google Docs or Word Online round-trip — the package/XML wiring, the footnote markup, leftover content controls, and heading…
от edwinhu★ 28 звёзд на GitHubОб этом скилле
DOCX Repair (Google Docs / Word Online damage)
What this skill carries — grep references/ for any subject the names below miss:
!d=${CLAUDE_SKILL_DIR}; command -v skill-toc >/dev/null 2>&1 && exec skill-toc "$d"; s=$HOME/.claude/skills/plugin-utils/bin/skill-toc; [ -x "$s" ] && exec "$s" "$d"; echo "(skill-toc unavailable: references and scripts are NOT listed here — install the plugin-utils plugin, or start a new session so its bin/ reaches PATH)"
Cloud editors damage a .docx in independent ways. This skill is the front door for all of them; run only the track(s) you need.
| Damage class | Symptom | Fix |
|---|---|---|
| A. Package / OOXML wiring | Word pops "recover unreadable content?" or refuses to open; LibreOffice won't load; phantom blank page | ${CLAUDE_PLUGIN_ROOT}/scripts/docx_repair.py (plugin root) — references/package-repair.md |
| B. Footnote & cross-reference markup | Bios show 1,2,3 not *,†,‡; numbering starts wrong; "supra note N" points to the wrong footnote; missing separator line |
the footnote scripts — references/footnote-procedure.md |
| B1. Cross-references aimed at the wrong source | Lin, supra note 130 where note 130 is a different work; Expert Report, supra note 22 where 22 defines the deposition; a short form surviving a renumber that moved its target |
check_crossrefs.py <file.docx> — read-only, exit 1 on any problem |
| C. Document content (boxes + headings + cruft) | Visible boxes around freshly-edited text; heading-looking lines not styled as headings; same-style headings rendering differently; blank heading lines; bloated XML full of all-zero rsids, no-op shading, explicit b=0/i=0/u=none, redundant black color & default fonts |
fix_footnotes.py's document.xml passes — references/content-cleanup.md |
| D. Presentation hygiene | A footnote renders blue/underlined in the PDF but looks normal in Word; a URL prints one address and navigates to another; heading gaps uneven page to page; tracking params (?utm_source=…) behind a clean-looking link |
docx_links.py, docx_spacers.py — references/presentation-hygiene.md |
They are decoupled: package repair fixes the part wiring (never touches content); footnote repair fixes the footnote markup; content cleanup strips Google-Docs leftover content controls and normalizes headings. A file can need any, all, or none. If you don't know which, run the package check first (it's a no-op on a clean package), then the footnote pass (it carries the content cleanup).
Heads-up:
docx-render's Word path already composesdocx_repair.pyas a preflight, so a Google export "just renders" without a manual Track A. Run Track A manually when you need the repaired file itself (to hand back, edit, or footnote-fix), not just a PDF.
Reference index — read the file for the track you are running
All procedural detail lives in references/. Read only what the job needs.
references/package-repair.md — Track A. The two concrete Google Docs export defects (case-mismatched
customXML/customXmlOPC part references; leftover<w:evenAndOddHeaders/>), and the CLI + Python API for${CLAUDE_PLUGIN_ROOT}/scripts/docx_repair.py. Read when Word calls the file corrupt, refuses to open it, or shows a phantom blank page — or before handing back a repaired file rather than a PDF.references/footnote-procedure.md — Track B, the canonical procedure. The exact four-step order for a Google Docs round-trip (accept changes →
fix_footnotes.py→create_crossrefs.py --baseline→ render with Word), what to verify in the render, the incident-grounded procedure facts (why step 3 must follow step 2, why--baselineis not optional, why LibreOffice lies), the list of symptoms footnote repair applies to, and the quick-start "which script do I want?" routing. Read when running any footnote repair — start here.references/footnote-scripts.md — Track B, script detail. Per-script behaviour and every flag for
fix_footnotes.py,create_crossrefs.py(including how--baselineremaps stale numbers) andrefresh_noteref_caches.py(why the naive approaches fail, its requirements and intentional scope), plus the footnote numbering-offset fix (numRestart). Read when you need a specific flag, or the exact semantics of one of the three scripts.[references/footnotes-reference.md](${CLAUDE_PLUGIN_ROOT}/skill
Установить docx-repair в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл docx-repair?
Use to REPAIR a .docx damaged by a Google Docs or Word Online round-trip — the package/XML wiring, the footnote markup, leftover content controls, and heading styling. Triggers: 'Word won't open the docx / says it's corrupt', 'Google Docs export broken', 'fix the customXML error', 'recover unreadable content', 'phantom blank page', 'repair this docx'; AND 'footnotes broken after Google Docs', 'supra notes wrong after coauthor edits', 'cross-references point to the wrong footnote', 'bio footnotes show numbers instead of symbols (*, †, ‡)', 'author note shows 1 2 3 not star dagger', 'footnote numbering starts at the wrong number', 'separator line missing', 'doubled footnote marks (**, ††)'; AND 'boxes around text after Google Docs', 'content controls / doubled boxes around paragraphs', 'remove the boxes Word draws around headings', 'heading text isn't styled as a heading', 'headings look different / inconsistent heading formatting', 'blank/empty heading lines'; AND 'clean up Google Docs XML cruft', 'strip redundant run formatting', 'de-bloat docx after Google Docs', 'remove rsid bloat / no-op shading / explicit black' — or converting hardcoded 'supra note N' cross-references to auto-updating NOTEREF fields. Any OOXML-level repair on a .docx edited in a cloud editor, even if the user never says 'OOXML'. NOT for building a docx from markdown (law-review-docx) or exporting to PDF (docx-render).
Как установить скилл docx-repair?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл docx-repair запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic