docx-skill-4-cn-paper: a Word skill for Chinese papers
docx-skill-4-cn-paper
The docx-editor-cn skill builds Word files to Chinese university rules: margins, fonts, native formulas and three-line tables
- 475 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Node.js and Python scripts read and overwrite Word documents
- Editing an existing file unpacks it into XML and rebuilds it, so keep a copy of the original
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add skills/docx-skill-4-cn-paperDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Node.js and Python scripts read and overwrite Word documents
- Editing an existing file unpacks it into XML and rebuilds it, so keep a copy of the original
This is third-party code. Review the repository files before installing.
What it does
The `docx-editor-cn` skill is based on Claude Code's docx skill and tuned for Chinese academic work: coursework, graduation theses and mathematical modeling contest papers. The agent creates a `.docx` with a ready template: A4, 2.5 cm margins, a centered page number at the bottom, SimSun 12 pt body text, SimHei 16, 14 and 12 pt headings, and 11 pt captions for figures and tables. There are two workflows. The first converts Markdown to Word: LaTeX formulas go through temml, MathML and docx.js and become native Word formulas, headings, figures and tables are numbered automatically, and references like `[1][2]` are set as superscripts. The second edits an existing document: `unpack.py` unpacks it into XML, the agent changes `document.xml` and `styles.xml`, `pack.py` builds the file back and `validate.py` checks the result. Separate scripts insert a three-line table (`table.py`), a block formula (`formula.py`) and comments (`comment.py`).
Who it is for. Students and graduate students writing a paper to a Chinese university's rules who hand the Word layout to an agent.
Good fit when
- A coursework paper sits in Markdown with LaTeX formulas, and the output must be a `.docx` whose formulas stay editable in Word
- An existing document needs different fonts, spacing or heading styles without breaking the rest of the layout
- The tables must be three-line tables, as is usual in academic texts
- Tracked changes and comments in a document must be accepted or checked, and the file rebuilt afterwards
Not a fit when
- The paper follows Russian GOST rules: the fonts, margins and numbering in the template target Chinese universities
- You need a general Word skill for business letters and reports: an ordinary docx skill without the academic template fits better
- The document only has to be read: `pandoc` is enough, as the skill description itself says
Example request
Convert paper.md to Word with the coursework template: make LaTeX formulas native Word formulas and the tables three-line tablesLimitations
The skill has to be copied by hand into the agent's skills directory, and the dependencies installed with `npm install docx temml fast-xml-parser`. Editing existing documents needs Python 3, converting `.doc` and accepting changes needs LibreOffice, reading text needs Pandoc.
The `SKILL.md` header gives the license as Proprietary with a link to `LICENSE.txt`, while the README and the repository say MIT. Compare both license files before using it in your own project.
The README has no Russian or English version: the instructions and description are written in Chinese.
How to disable. Delete the `docx-editor-cn` folder from the agent's skills directory. Finished `.docx` files stay, and the dependencies installed with `npm` can be removed from the project.
FAQ
How do I install docx-editor-cn in Claude Code?
Download the `docx-editor-cn` folder from the repository and put it in the skills directory, for example `~/.claude/skills/`. Run `npm install docx temml fast-xml-parser` in that folder, after which the agent sees the skill.
Which fonts and margins are set by default?
A4 paper, 2.5 cm margins, SimSun 12 pt body text, SimHei 16, 14 and 12 pt for first, second and third level headings, 11 pt captions. Digits and Latin letters use Cambria Math, which can be swapped for Times New Roman.
How does the skill turn LaTeX formulas into Word formulas?
A LaTeX string goes through temml into MathML, then `mathml-to-docx.js` and docx.js build a native Word formula from it. Such a formula stays editable in the formula editor.
Can I edit an existing document?
Yes. `scripts/office/unpack.py` unpacks the `.docx` into XML, the agent changes the needed files, `pack.py` builds the document back and `validate.py` checks its integrity.
What should I do with a `.doc` file?
Convert it to `.docx` first with `python scripts/office/soffice.py --headless --convert-to docx document.doc`, which needs LibreOffice.
Discussion
No questions or reviews yet.
Related
SkillsA skill plus the docx program: the agent fills forms, edits tables and reviews Word files with tracked changes
A set of LaTeX templates for Chinese research documents paired with Claude Code and Codex skills that fill and verify them
A set of three research skills: paper writing, academic Word and PowerPoint documents, scientific computing and figures
Four skills for Codex and Claude Code build editable PPTX and Word reports, website demo videos and Xiaohongshu cards.
16 ready skills for Cursor, Claude Code and Codex: theses, PDF and Office, draw.io diagrams, project documentation
A skill for Chinese official documents that picks the document type, builds the structure and strips hollow boilerplate.
README in short
The project page, in Chinese, covers the features, diagrams of the two workflows, the default format tables, the script tree and the dependencies. In its to-do list the table of contents and multilevel headings are marked done, while formula handling in Markdown conversion and speed on large documents are still ahead.
README badge
Original SKILL.md
--- name: docx-editor-cn description: "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." license: Proprietary. LICENSE.txt has complete terms --- # DOCX creation, editing, and analysis ## Overview A .docx file is a ZIP archive containing XML files. ## Quick Reference | Task | Approach | |------|----------| | Read/analyze content | `pandoc` or unpack for raw XML | | Create new document | `node scripts/new_doc.js` (edit CONTENT section first) | | Edit existing document | Unpack → edit XML → repack - see Editing Existing Documents below | | Insert 三线表 (XML editing) | `python scripts/table.py unpacked/ "1-1" "标题" --headers … --rows …` | | Insert block formula (XML editing) | `python scripts/formula.py unpacked/ "LaTeX" 1 --anchor "锚文本"` | ### Converting .doc to .docx Legacy `.doc` files must be converted before editing: ```bash python scripts/office/soffice.py --headless --convert-to docx document.doc ``` ### Reading Content ```bash # Text extraction with tracked changes pandoc --track-changes=all document.docx -o output.md # Raw XML access python scripts/office/unpack.py document.docx unpacked/ ``` ### Converting to Images ```bash python scripts/office/soffice.py --headless --convert-to pdf document.docx pdftoppm -jpeg -r 150 document.pdf page ``` ### Accepting Tracked Changes To produce a clean document with all tracked changes accepted (requires LibreOffice):