mcpbeat

Document Format Skills for Codex

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.

39k tokens
context cost
the whole folder, loaded on every use
19
files
ships runnable scripts
0
copies elsewhere
how many repositories repackaged it
209
stars on the repo
on the repository, not the skill itself

Install

one command, takes just this skill from the repository
npx skills add https://github.com/KaguraNanaga/document-format-skills --skill document-format-skills

The instruction itself

7 sections, as written by the author

Document Format Skills

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.

Quick Workflow

Run one smart pass when the user wants the document cleaned end to end:

uv run --with python-docx python scripts/process.py smart input.docx output.docx --preset official

Run diagnostics only:

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

uv run --with python-docx python scripts/process.py punctuation input.docx output.docx --space-mode keep_en_boundary

Run only formatting:

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

uv run --with python-docx --with pywin32 python scripts/process.py smart input.wps output.wps

Scripts

| 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. |

Formatting Options

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:

--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 And Spacing

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.

Text Or Markdown To DOCX

Generate and format a document from text:

uv 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.

Implementation Notes

  • .docx processing needs only python-docx.
  • .doc/.wps conversion needs Windows plus WPS Office or Microsoft Word and pywin32.
  • Page number handling avoids overwriting non-page footer content and can replace existing page-number footers when requested.
  • Default table formatting preserves original alignment; use --smart-table-align for numeric/right and short-text/center alignment.
  • macOS font handling keeps installed official fonts when present and falls back to compatible system fonts only when detection confirms the original is missing.

Other skills for the same job

different authors, same section of the catalogue
DOCX
by anthropics
vendor ×16

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

7k tokens
PDF
by anthropics
vendor ×16

Comprehensive PDF manipulation toolkit for extracting text and tables, creating new PDFs, merging/splitting documents, and handling forms. When Claude needs to fill in a PDF form or programmatically process, generate, or analyze PDF documents at scale.

13k tokens scripts
PPTX
by JayZeeDesign
×15

Presentation creation, editing, and analysis. When Claude needs to work with presentations (.pptx files) for: (1) Creating new presentations, (2) Modifying or editing content, (3) Working with layouts, (4) Adding comments or speaker notes, or any other presentation tasks

308k tokens scripts
Canvas Design
by anthropics
vendor ×13

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

1388k tokens
PDF
by anthropics
vendor ×10

Use 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 PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.

15k tokens scripts
DOCX
by w95
×6

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

5k tokens
PPTX
by w95
×4

Use this skill any time a .pptx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates, layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx filename, regardless of what they plan to do with the content afterward. If a .pptx file needs to be opened, created, or touched, use this skill.

2k tokens
Obsidian Markdown
by ZhanlinCui
×3

Create and edit Obsidian Flavored Markdown with wikilinks, embeds, callouts, properties, and other Obsidian-specific syntax. Use when working with .md files in Obsidian, or when the user mentions wikilinks, callouts, frontmatter, tags, embeds, or Obsidian notes.

3k tokens

How to use it

Copy the folder

Take kagurananaga/document-format-skills from the repository into ~/.claude/skills for personal use, or into .claude/skills inside a project.

Check the name does not clash

The agent identifies a skill by the name field in its header. Two skills with the same name cannot sit side by side — one of them will be ignored.