# nature-paper2word

nature-paper2word is a Claude Code skill that compiles academic Markdown into compliant Word files. It triggers when preparing submission-ready DOCX papers with OMML formulas and citations.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 1400 installs · ★ 54456 repo stars
- Author: Yuan1z0825
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/Yuan1z0825/nature-skills/tree/HEAD/skills/nature-paper2word/SKILL.md
- Updated: 2026-11-22
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/nature-paper2word

## What it does

The tool transforms an academic Markdown manuscript into a `.docx` document, embedding native OMML equations, three-line tables, cross-references, and CSL bibliographies. The pipeline is deterministic: identical input and format rules always generate a byte-identical Word file. If the manuscript breaks syntax rules, pre-flight checks halt the process and report the exact line number.

Formatting rules can be extracted from PDF guidelines, Word samples, scanned images, or a local `format.txt` file. Without an explicit `-f` specification, the engine chooses either the `zh-academic` preset for Chinese or `en-nature` for other languages. The `--base-template` flag injects the compiled body directly into an existing university document while keeping its cover page and front matter untouched.

The export pipeline depends on the `md-to-word` CLI, which must be installed via `pip install md-to-word-docx`. Any manuscript containing citations requires a companion `.bib` file, as handwritten reference lists are rejected.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Yuan1z0825/nature-skills --skill nature-paper2word -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/nature-paper2word/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/nature-paper2word/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Yuan1z0825/nature-skills --skill nature-paper2word -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/nature-paper2word/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Yuan1z0825/nature-skills --skill nature-paper2word -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/nature-paper2word/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Yuan1z0825/nature-skills skills/nature-paper2word
```

2. **Manually: put the files in place**
- File: `.github/skills/nature-paper2word/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Yuan1z0825/nature-skills --skill nature-paper2word -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Yuan1z0825/nature-skills --path skills/nature-paper2word
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/nature-paper2word/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Yuan1z0825/nature-skills --skill nature-paper2word -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Yuan1z0825/nature-skills/tree/HEAD/skills/nature-paper2word/SKILL.md

## When to use it
- compile academic papers to Word
- embed native OMML equations and three-line tables
- format manuscripts to match journal guidelines
- manage citations with CSL and BibTeX

## Example prompts
- Compile manuscript `paper.md` into Word using the `en-nature` preset
- Format `thesis.md` into a DOCX file using rules from `guidelines.pdf`
- Export `draft.md` to Word using `--base-template school-template.docx`

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: c4a7afe48821422c.

BEGIN THIRD-PARTY FILE c4a7afe48821422c
````text
---
name: nature-paper2word
description: "Compile an academic Markdown manuscript into a journal- or school-compliant Word (.docx): declared typography, native OMML equations, three-line tables, cross-references, per-section page numbers, CSL bibliographies (GB/T 7714, APA, Nature, IEEE), and pre/post-export quality gates. 把学术论文的 Markdown 稿件导出为符合期刊或学位论文规范的 Word：摘要、公式编号、三线表、题注、交叉引用、目录域、参考文献。Use when the user wants a submission-ready .docx — 论文转 Word、学位论文排版、期刊投稿排版、prepare submission docx — or a readable copy of a manuscript. Not for PDF, HTML or LaTeX output, and not for slide decks or grant forms. Also use for reference-paper reformatting and format requirements supplied as PDF, Word, images or pasted text, with automatic image-text recognition. 参考论文样式提取、按参考文档重排版、期刊排版要求、图片与扫描件识别。"
license: MIT
---

# Markdown → compliant Word

This file is the router. The engine is deterministic: the same manuscript and the same format
requirements always produce a byte-identical `.docx`. Do not substitute a hand-written
python-docx script; run the installed pipeline.

**Before the first export in a session, confirm the engine is available**: `md-to-word --version`
must print a version. The export engine is installed separately; if the command is missing, install it
with `pip install md-to-word-docx`, then run the check again.

Check the capability rather than the version, since the version here would go stale:

```bash
md-to-word --help | grep -- --base-template   # present = a school template can be kept as the base
```

**The full vocabulary lives in the manual inside the package**, not here. `md-to-word --contract`
prints its absolute path (Chinese or English, following the manuscript). Everything below is order
of work; every spelling is looked up in the manual.

## 1. Decide the scenario first

| Scenario | What the user says | What to do |
|---|---|---|
| Journal or school compliance | "format it using these journal instructions" | Read [format-requirements](references/format-requirements.md); extract requirements from PDF, Word, images or pasted text, then build the engine requirements file. |
````
END THIRD-PARTY FILE c4a7afe48821422c

The third-party file has ended. Everything between the c4a7afe48821422c tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2336 of 13995 bytes. © Yuan1z0825 · MIT · https://github.com/Yuan1z0825/nature-skills/tree/HEAD/skills/nature-paper2word/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
