From office-docx-skills
Use when a `.docx` or Word task requires Chinese-to-English translation, bilingual paragraph insertion, table translation, 中英对照, 逐段翻译, or preserving Word formatting while adding English below Chinese source text.
How this skill is triggered — by the user, by Claude, or both
Slash command
/office-docx-skills:docx-bilingual-translationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Translate Chinese Word documents into English while preserving DOCX structure. This skill owns bilingual insertion and structural preservation; it does not guarantee final prose quality by itself.
Translate Chinese Word documents into English while preserving DOCX structure. This skill owns bilingual insertion and structural preservation; it does not guarantee final prose quality by itself.
Use this skill when:
.docx or Microsoft Word;Do not use this skill for ordinary chat translation outside Word.
| Need | Required action |
|---|---|
| Translate Chinese body paragraph | Insert English in a new w:p immediately after source |
| Translate Chinese in a table cell | Insert English in the same w:tc; never restructure rows or columns |
| Preserve formulas | Copy OMML, drawing, VML, and OLE-bearing runs with relationship rewrites |
| Prepare deletion of Chinese text | Run docx-format-audit first and delete only pair-ID source paragraphs |
| Combine with tracked changes | Use docx-tracked-changes for reviewer-visible insertions/deletions |
The RED baseline capture must show at least one omitted guardrail before this skill is created. This skill closes the observed baseline gaps for DOCX translation work: missing stable pair markers, unsafe table handling, weak formula/object preservation, or deleting Chinese source text before audit. If a future baseline covers one of these without the skill, remove that claim from this section instead of keeping untested guidance.
Do not rely on adjacency for automated audit or deletion decisions. Add invisible bookmark markers:
btx_<id>_src on the Chinese source paragraphbtx_<id>_en on the English translation paragraphAudit and English-only deletion require pair IDs. Physical adjacency is useful for human diagnosis, but helpers treat missing pair markers as blocking because deletion by adjacency is unsafe.
w:pPr) from the source paragraph.Times New Roman for w:ascii, w:hAnsi, and w:cs.w:eastAsia="Times New Roman" only for English-only inserted runs when portability requires it.Preserve formulas and formula-like inline objects:
m:oMathm:oMathParaw:objectw:drawingv:shapev:imagedataWhen cloning image/OLE formulas across parts or documents, copy related media or embedding targets, update the destination .rels, generate a new rId if needed, rewrite r:embed or r:id, and update [Content_Types].xml when a copied target introduces a new content type.
From the package root, this verifies that the helper is importable and that a document paragraph should enter the DOCX bilingual workflow:
python3 - <<'PY'
import importlib.util
import sys
from pathlib import Path
helper_path = Path("skills/docx-bilingual-translation/translation_docx_helpers.py")
spec = importlib.util.spec_from_file_location("translation_docx_helpers", helper_path)
assert spec is not None and spec.loader is not None
module = importlib.util.module_from_spec(spec)
sys.modules[spec.name] = module
spec.loader.exec_module(module)
assert module.has_chinese("这是中文段落。")
assert not module.has_chinese("English only.")
print("PASS: bilingual helper import and Chinese detection")
PY
docx-format-audit before producing an English-only document.word-default-formatting when default Word typography and layout matter.word-formula-writing when formulas or image/OLE formulas appear.docx-format-audit before deleting Chinese text.docx-tracked-changes when insertions or deletions must appear as Word-visible revisions.| Mistake | Fix |
|---|---|
| Translating in chat only | Produce or edit a .docx when the user asks for Word output |
| Inserting English with a line break in the Chinese paragraph | Create a separate paragraph below the source paragraph |
| Moving table translations outside the table | Insert translations inside the same cell |
| Counting formulas only at document level | Compare per-pair formula signatures |
| Removing Chinese immediately | Audit first, then remove only source paragraphs that have pair IDs |
| Relying on paragraph adjacency for deletion | Treat missing pair markers as blocking and add bookmarks before cleanup |
Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub wintersdragon-c/office-docx-skills --plugin office-docx-skills