yjh051108/mmkit/paper-write-zh
Claude Code and agent skill by yjh051108/mmkit
- community
Checking that the SKILL.md file is still in the repository.
Draft a Chinese academic paper in LaTeX (XeLaTeX + ctex, PDF mode) or Markdown (docx mode). Use when user says \"写中文论文\", \"中文LaTeX\", \"中文Word论文\", \"Chinese paper writing\", or wants to generate Chinese paper content.
Install
npx vskill@latest install yjh051108/mmkit/paper-write-zhSKILL.md
Chinese Paper LaTeX Writing
Draft a Chinese LaTeX paper section by section: $ARGUMENTS
Constants
- PAPER_TYPE —
bachelor/master/journal. Defaultjournal. - MAX_PAGES — bachelor=25, master=55, journal=15. Body pages must be ≥ MAX_PAGES.
- CUSTOM_REQUIREMENTS — Highest priority.
- REVIEWER_SCRIPT — External reviewer script
reviewer_client.py
Inputs
- PAPER_PLAN.md — outline with data analysis summary
- NARRATIVE_REPORT.md — research narrative
- figures/ — PDFs +
latex_includes*.tex+tikz_diagrams.tex(TikZ,编译为tikz_diagrams.pdf) - user_data/ — user materials (.cls/.docx templates, data files)
If user_data/ has CSV/JSON, read exact values with pandas before writing experiment chapters.
Load shared rules
docx 模式(output_format = docx)
当 params.output_format == 'docx':只产出 paper/main.md 一个文件(≥ 5KB),禁止生成 .tex、禁止残留 LaTeX 命令。Markdown 规范(标题层级/摘要/公式/图表/引用)见本 skill 的 references/docx-mode-zh.md。后续由 docx-cn-engine 转 .docx。
Template selection
Priority: user .cls > user .docx > built-in template
Built-in templates in templates/:
bachelor_main.tex— 本科毕业论文 (ctexart)master_main.tex— 硕士学位论文 (ctexbook)journal_main.tex— 期刊论文 (ctexart, two-column)
Copy template to paper/main.tex, replace all bracket placeholders with actual content. Template handles fonts, spacing, margins, gbt7714, headers/footers — do not write main.tex from scratch.
⛔ CRITICAL TEMPLATE RULES:
- NEVER rewrite main.tex from scratch — the template has carefully tuned preamble
- NEVER replace `\listoftables`/`\listoffigures` with hand-written text — use auto-generated lists
- Only replace bracket placeholders (
[论文标题],[作者], etc.) with actual content - Only modify
\input{sections/...}lines to match actual section filenames
<abstract_format>
Abstract format
The template uses manual typesetting for abstracts (\begin{center}{\heiti 摘要}\end{center} + \begin{center}{\bfseries Abstract}\end{center}). Do not use two \begin{abstract} environments — ctexart's abstract title is fixed as "摘要", so the English abstract would also show a Chinese title.
Chinese abstract: 500-700 characters. Aim to fill most of one page but leave 3-4 lines margin at the bottom — overflowing onto a second page looks worse than being slightly short. Content chain: 研究背景与意义 → 现有方法不足 → 本文方法 → 数据来源与处理 → 关键数值结果(精度、R²、p值等)→ 应用价值与建议.
English abstract: 350-500 words, faithful translation covering the same structure and all numerical results. Same principle — fit on one page, do not overflow. </abstract_format>
⛔⛔⛔ 完成铁律(最高优先级,违反则本步骤失败)
根据 `params.output_format` 决定主产物路径:
- PDF 模式(默认):必须产出
paper/main.tex(基于模板,≥ 5KB)+paper/sections/*.tex(每章节 ≥ 500 字符)+paper/references.bib - docx 模式(用户选 Word 输出):必须产出
paper/main.md(单文件,含完整论文,≥ 5KB)。禁止产 paper/main.tex
⛔ 如何识别当前模式:
⛔ 结束前必跑产出验证(步骤的最后一步,绝不省略):
如果验证失败,继续补全产出而不是退出。
Workflow
Step 0: Backup + resume check + 上游验证
⛔ 上游输出完整性检查(写论文前必做):
Back up existing paper/ to paper-backup-{timestamp}/. Check for incomplete sections:
Resume: only write placeholder sections (<500 chars or contains "待补充"/"placeholder"), skip completed ones (>2000 chars). See <resume_strategy> in writing_rules.md for full details.
⛔ 数值来源规则(全文遵守): 所有论文中的数值(精度、RMSE、R²、p-value、系数、训练时间等)必须来自 figures/all_results.json 或 RESULTS.md。写任何含数值的章节之前先:
从中复制数字原样填入论文。不要凭记忆估算、四舍五入或编造数值。最终的 quality gate 会做数值一致性检查,编造的数字会被发现。
⛔ Claims-Evidence 对照(必须严格遵循规划):
写每个章节前,先重读 PAPER_PLAN.md 中的 claims-evidence 矩阵:
写作纪律:
- 论文中的每个论断必须对应到规划中的某一行
- 不要添加规划外的新论断(如有新发现,先更新 PAPER_PLAN.md)
- 不要跳过规划中的论断(即使是负面结果也要如实报告)
- 每个论断的数值证据必须与
figures/all_results.json一致
如果某个规划中的论断在数据中找不到证据,诚实写"初步结果提示 X,更严谨的验证留待未来工作",不要编造证据。
Step 1: Initialize
Create paper/, copy template to main.tex, generate math_commands.tex (paper-specific commands only — do not redefine \sin, \cos, \log, etc.).
Step 2: Figure inventory
Before writing any section, build a complete inventory of available figures. This prevents empty figure environments (caption without image).
From the output above, build a mapping table: figure label → PDF filename → target section. Only embed figures whose PDF files actually exist — do not create figure environments for PDFs that don't exist (this causes empty figures with just a caption and no image).
⛔ TikZ 图(如 `figures/tikz_diagrams.pdf` / `figures/tikz_*.pdf`)必须嵌入论文。 它们已在 latex_includes.tex 中有对应 \includegraphics 图块,按几何/算法/架构图的章节归属嵌入(几何示意图→对应子问题章节,算法流程图→模型建立章节)。禁止漏掉任何 `tikz_*.pdf`。
⛔ 中文论文的图表 caption 必须是中文。 如果 latex_includes.tex 里的 caption 是英文,嵌入时必须翻译成中文。例如:\caption{Model Performance Comparison} → \caption{模型性能对比}。
Also scan figures/*.tex for all \begin{figure} / \begin{table} blocks with their \label{}. After writing, verify all embedded:
Step 2.5: 文献预检索(写正文之前必须完成)
⛔ 在写任何 \cite{} 之前,必须先建立已验证的文献池。
目的:先搜索到真实存在的论文,写正文时只引用池子里的论文,避免编造不存在的文献。
搜索后,创建 _tmp/_verified_refs.txt,每行一篇已验证论文:
写正文时只能引用这个池子里的论文。 如果需要引用池子外的论文,先搜索验证后再加入池子。
兜底:如果 scholar_fetch.py 搜不到或 match_label="low",用 WebSearch 在 Google Scholar / Semantic Scholar 网站上搜索,手动核实标题+作者+年份后再加入池子。
Step 3: Write each section
Writing order: method/core → experiments → introduction → related work → conclusion. Save each section immediately. If approaching output limit, create % [PLACEHOLDER] files for remaining sections.
⛔ 写实验/结果章节前,必须先读 experiment_results.md / RESULTS.md / figures/*.json 获取精确数值。 不要凭记忆编造结果——所有数值(精度、R²、p 值、系数等)必须从数据文件中提取。
⛔ 写作风格铁律:
- 禁止在正文中使用 `\begin{itemize}` 或 `\begin{enumerate}`。 用连贯段落叙述,需要列举时用"(1)...(2)...(3)..."行内编号或"首先...其次..."过渡词。
- 每段至少 3-5 句话,不要写 1-2 句的短段落。
- 连续段落不能以相同句式开头。
Follow all rules from _utils/writing_rules.md (interleaving, embedding, LaTeX constraints, page filling, resume strategy).
⛔ 图文并茂硬规则(每个章节都必须遵守):
- 所有
\begin{figure}必须用[H],不要用[htbp] - 每张图/表后面必须有 ≥5 行分析文字(数值解读+对比+结论),然后才能放下一张图
- 绝对禁止两张图连续出现中间没有分析段落
- 图片用
\includegraphics[width=0.85\textwidth,keepaspectratio](以宽度为主,高度自适应)。⛔ 不要再加height=0.38\textheight这种小高度限制——在keepaspectratio下 height 只会把图压得更小:方形或竖高的图(热力图、雷达图、森林图、混淆矩阵、竖排子图、流程图)会被 0.38 页高卡到只有半页宽,导致"图很小看不清"。只有当某张图确实接近整页高、可能溢出时,才加height=0.9\textheight作为防溢出兜底
After each section, check chars:
<exemplar_depth>
Writing depth by paper type
本科毕业论文 (30 pages, 5 chapters):
- 绪论 (5-6p): 研究背景 1-2 段 + 国内外研究现状按 2-3 个方向分类综述 + 研究内容与方法 + 论文结构
- 理论基础 (5-6p): 核心概念定义 + 相关理论介绍 + 技术路线说明, each concept in full paragraphs (not one-sentence mentions)
- 方法/系统设计 (8-10p): 整体架构 + 各模块详细设计 + 关键算法/公式 + 实现细节
- 实验/测试 (6-8p): 实验环境 + 数据集 + 评价指标 + 主要结果表 + 对比图 + 结果分析 (1-2 paragraphs per result)
- 总结与展望 (2-3p): 工作总结 + 不足之处 + 未来改进方向
硕士论文 — CS/AI (80 pages, 6 chapters):
- 绪论 (8-10p): 研究背景 2-3 段详细论述 + 国内外研究现状按子领域分 3-4 类每类 3-5 篇详细讨论 + 研究内容与创新点
- 相关工作 (12-14p): 按子领域分组, each sub-field has overview paragraph + representative methods detailed + connection to this work
- 方法 (18-20p): each core concept in full paragraphs (definition → formula → intuition → connection to this work), derivation steps not skipped
- 实现 (10-12p): 系统架构 + 数据流 + 超参数配置 + 工程优化细节
- 实验 (20-24p): every result has 2-3 paragraphs of interpretation (数值分析 + 原因分析 + 与其他方法对比), not just "如表所示我们更好"
- 总结 (4-6p): 改述贡献 + 局限性 + 未来工作
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/paper-write-zh/SKILL.md
Popularity
- 7-day trend score
- 5
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/yjh051108/mmkit/paper-write-zh)