Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Chinese Word document formatting toolkit for .docx/.doc/.wps workflows. Use when Codex needs to diagnose document formatting, fix mixed Chinese/English punctuation and spacing, apply official/academic/legal/custom presets, normalize tables and page numbers, preserve or output Word revision marks, convert plain text or Markdown into formatted DOCX, or batch/script document cleanup for Chinese official documents.
.claude/skills/kagurananaga-document-format-skills/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-13 | ✗→✓ | ▲ Improved | -41% | 0% |
| case-01 | ✗→✓ | ▲ Improved | -62% | 0% |
| case-06 | ✗→✓ | ▲ Improved | -25% | 0% |
| case-02 | ✗→✓ | ▲ Improved | -44% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 55% | 0% |
Use these scripts to clean and format Chinese Word documents from the command line. Prefer scripts/process.py for normal work because it mirrors the desktop app's core pipeline without the GUI.
Run one smart pass when the user wants the document cleaned end to end:
bashuv run --with python-docx python scripts/process.py smart input.docx output.docx --preset official
Run diagnostics only:
bashuv run --with python-docx python scripts/process.py analyze input.docx uv run --with python-docx python scripts/process.py analyze input.docx --json
Run only punctuation/spacing cleanup:
bashuv run --with python-docx python scripts/process.py punctuation input.docx output.docx --space-mode keep_en_boundary
Run only formatting:
bashuv run --with python-docx python scripts/process.py format input.docx output.docx --preset official
On Windows, .doc and .wps input/output are supported through WPS or Microsoft Word COM automation:
bashuv run --with python-docx --with pywin32 python scripts/process.py smart input.wps output.wps
| Script | Use | | --- | --- | | scripts/process.py | One-shot CLI for smart, analyze, punctuation, and format; handles .doc/.wps conversion on Windows. | | scripts/formatter.py | Apply formatting presets, custom JSON settings, page numbers, table cleanup, revision marks, macOS font fallback. | | scripts/punctuation.py | Fix punctuation while preserving run formatting; supports spacing strategies. | | scripts/from_text.py | Create a DOCX from .txt or Markdown, then optionally run smart formatting. | | scripts/analyzer.py | Lower-level diagnostic script. | | scripts/converter.py | Windows-only .doc/.wps conversion helpers. |
Built-in presets:
official: GB/T 9704-2012 style official document formatting.academic: academic paper formatting.legal: legal document formatting.custom: read the active desktop custom preset when available.Useful flags:
bash--custom-settings path.json --revision --deep-clean --smart-table-align --no-page-number --page-number-style dash|plain|page_text|page_total --page-number-position outside|left|center|right --page-number-offset-mm 7 --no-bold-serial
--custom-settings accepts desktop schema v2 config files, exported preset files shaped as {"preset": {...}}, or plain preset/override JSON. For non-custom presets, the JSON is merged over the selected preset.
Punctuation cleanup protects URLs, email addresses, Windows paths, time values like 9:30, and standards like ISO 9001:2015. It fixes brackets, colons, semicolons, question/exclamation marks, Chinese comma/period contexts, ellipses, dashes, and paired quotes.
Spacing modes:
remove_all: delete half-width and full-width spaces.keep_en_boundary: remove Chinese-to-Chinese spaces but keep exactly one space between Chinese and English/digits.keep_all: leave spaces unchanged.Generate and format a document from text:
bashuv run --with python-docx python scripts/from_text.py input.md output.docx --title "工作方案"
Markdown mode detects headings, bold spans, ordered/unordered lists, quotes, and fenced code blocks. # becomes the main title, ## becomes 一、, ### becomes (一), and deeper headings become numbered lower-level headings.
Use --no-process to only create the raw DOCX.
.docx processing needs only python-docx..doc/.wps conversion needs Windows plus WPS Office or Microsoft Word and pywin32.--smart-table-align for numeric/right and short-text/center alignment.| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-07 | pass→pass | 7,324 | 3,371 | -54% | 1 | 1 | 0% | 1,300 | 1,641 | +26% | 0 | 0 | — |
case-13 | fail→pass | 15,019 | 3,224 | -79% | 1 | 1 | 0% | 2,712 | 1,595 | -41% | 0 | 0 | — |
case-01 | fail→pass | 19,182 | 2,825 | -85% | 1 | 1 | 0% | 4,000 | 1,513 | -62% | 0 | 0 | — |
case-06 | fail→pass | 12,552 | 3,763 | -70% | 1 | 1 | 0% | 2,190 | 1,634 | -25% | 0 | 0 | — |
case-02 | fail→pass | 15,266 | 2,988 | -80% | 1 | 1 | 0% | 2,745 | 1,524 | -44% | 0 | 0 | — |
case-03 | fail→pass | 6,172 | 2,380 | -61% | 1 | 1 | 0% | 951 | 1,475 | +55% | 0 | 0 | — |
case-04 | fail→pass | 14,039 | 2,225 | -84% | 1 | 1 | 0% | 2,102 | 1,391 | -34% | 0 | 0 | — |
case-05 | fail→pass | 4,142 | 3,484 | -16% | 1 | 1 | 0% | 660 | 1,562 | +137% | 0 | 0 | — |
case-08 | fail→pass | 10,950 | 3,490 | -68% | 1 | 1 | 0% | 2,215 | 1,623 | -27% | 0 | 0 | — |
case-09 | fail→pass | 10,969 | 2,658 | -76% | 1 | 1 | 0% | 1,720 | 1,469 | -15% | 0 | 0 | — |
case-10 | fail→pass | 15,882 | 2,260 | -86% | 1 | 1 | 0% | 2,432 | 1,393 | -43% | 0 | 0 | — |
case-11 | fail→pass | 6,958 | 1,737 | -75% | 1 | 1 | 0% | 1,144 | 1,281 | +12% | 0 | 0 | — |
case-12 | fail→pass | 14,586 | 2,256 | -85% | 1 | 1 | 0% | 2,413 | 1,363 | -44% | 0 | 0 | — |
case-14 | pass→pass | 7,696 | 1,756 | -77% | 1 | 1 | 0% | 1,235 | 1,285 | +4% | 0 | 0 | — |
case-15 | fail→pass | 11,243 | 2,004 | -82% | 1 | 1 | 0% | 1,776 | 1,305 | -27% | 0 | 0 | — |
case-16 | fail→pass | 15,591 | 2,256 | -86% | 1 | 1 | 0% | 2,345 | 1,379 | -41% | 0 | 0 | — |
case-17 | fail→pass | 8,764 | 2,683 | -69% | 1 | 1 | 0% | 1,357 | 1,465 | +8% | 0 | 0 | — |
case-18 | fail→pass | 12,653 | 2,340 | -82% | 1 | 1 | 0% | 1,895 | 1,385 | -27% | 0 | 0 | — |
case-19 | fail→pass | 9,481 | 2,068 | -78% | 1 | 1 | 0% | 1,456 | 1,333 | -8% | 0 | 0 | — |
case-20 | pass→fail | 10,768 | 4,294 | -60% | 1 | 1 | 0% | 1,666 | 1,677 | +1% | 0 | 0 | — |
case-21 | fail→pass | 21,002 | 12,587 | -40% | 1 | 1 | 0% | 3,829 | 3,153 | -18% | 0 | 0 | — |
case-22 | fail→fail | 14,426 | 13,151 | -9% | 1 | 1 | 0% | 2,538 | 1,609 | -37% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 21 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +77 percentage points is the difference between those two pass rates over the 21 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.