yjh051108/mmkit/comp-paper-zh

Claude Code and agent skill by yjh051108/mmkit

Trust tier 3
  • community
Source check pending

Checking that the SKILL.md file is still in the repository.

数学建模竞赛/统计建模中文论文撰写 — LaTeX(PDF 模式)或 Markdown(docx 模式)。按竞赛规范结构生成完整论文。Use when user says \"写竞赛论文\", \"competition paper\", \"建模论文\".

Install

npx vskill@latest install yjh051108/mmkit/comp-paper-zh

SKILL.md

Competition Paper Writing (Chinese)

Write a competition paper based on modeling results: $ARGUMENTS

Constants

  • COMPETITION — stats = 统计建模, huazhong = 华中杯, wuyi = 五一杯, mathorcup = MathorCup, others = 数模竞赛 (cumcm/huawei/etc.)
  • MAX_PAGES — Default 20. Body pages (chapter 1 through conclusion) must be ≥ MAX_PAGES.
  • CUSTOM_REQUIREMENTS

Inputs

  1. PROBLEM_ANALYSIS.md, MODELING_REPORT.md, RESULTS.md
  2. figures/, code/

Load shared rules

bash
cat _utils/writing_rules.md 2>/dev/null || cat skills/shared-scripts/writing_rules.md

<paper_structure>

Paper Structure by Competition Type

数模竞赛 (cumcm/huawei/mathorcup/huazhong/etc.)

Template: templates/cumcm/main.tex (国赛/华为杯), templates/mathorcup/main.tex (MathorCup), templates/apmcm_zh/main.tex (亚太赛中文 APMCM), templates/huazhong/main.tex (华中杯), templates/wuyi/main.tex (五一杯)

⛔ MathorCup 与 亚太赛中文(APMCM) 都使用 `MathorCupmodeling.cls` 文档类(模板文件夹已包含 cls)。使用 \bianhao{}、\tihao{}、\timu{} 设置队伍信息,\keyword{} 设置关键词。摘要用 \begin{abstract}...\end{abstract} 环境。参考文献用 \begin{thebibliography} 环境。

⛔ 华中杯必须使用 `cumcmthesis` 文档类(模板文件夹 huazhong/ 已包含 cls + 字体)。华中杯模板使用 \begin{abstract}...\keywords{}\end{abstract} 环境写摘要(不是手动排版),参考文献用 \begin{thebibliography} 环境(不是 \bibliography{})。

摘要(~1页,含关键词)
1 问题重述
2 模型假设
3 符号说明
4 问题一的建模与求解(each sub-problem gets its own chapter)
5 问题二的建模与求解
6 问题三的建模与求解
7 灵敏度分析与模型检验
8 模型评价与推广
参考文献
附录 A:代码
统计建模 (stats)

Template: templates/stats/main.tex

Chapter structure is driven by research content, not fixed templates.

Award-winning stats modeling papers vary wildly in structure — some organize by model, some by analysis step, some by research question. There is no "standard structure". Claude must design chapters autonomously based on the actual content in TOPIC_PLAN.md / MODELING_REPORT.md.

Fixed skeleton (must keep)
表格清单
插图清单
摘要(中英文,分页)
一、绪论/前言(研究背景 + 文献综述/研究现状 + 研究目标/内容)
↓
[Middle chapters: content-driven, Claude designs autonomously, typically 3-5 chapters]
↓
N、结论与建议(结论 + 建议/展望 + 创新与不足)
参考文献
致谢
附录(代码)
Middle chapter design guide

After reading TOPIC_PLAN.md, design middle chapters following these principles:

Principle 1: Chapter titles must be specific, not generic

  • ✗ "四、模型构建" → ✓ "四、基于 CNN 的水质预测模型构建与评价"
  • ✗ "五、实证分析" → ✓ "五、生育意愿的影响因素——集成学习模型"

Principle 2: Organize by research logic chain, not by textbook methodology

  • If the research has multiple sub-problems/models, each model can be its own chapter
  • If the research uses a single method with deep analysis, organize by analysis steps

Principle 3: Data and method chapters can be merged or separated

  • Simple data (one dataset) → merge into "数据与方法"
  • Complex data (multi-source, heavy preprocessing) → separate chapter "数据描述与预处理"
Award-winning paper structure examples (reference only, do not copy)

Example A — Classification + Path Analysis (fertility intention): 前言 → 模型构建 (introduce ensemble + Bayesian network) → 数据说明和预处理 → 探索性特征分析 → 生育意愿的影响因素 (ensemble results) → 生育意愿影响路径 (Bayesian network results) → 结论与建议

Example B — Mixed Modeling (data factors & economic growth): 研究背景+文献 → 研究思路和模型介绍 → 理论分析 → 模型构建 (production function + regression + ARIMA, each a section) → 模型应用 (GDP prediction) → 总结与建议 → 创新与不足

Example C — DEA Evaluation (economic sustainability): 绪论 → 文献综述 → 研究区域概况 → 评价指标体系构建 → 数据优化处理 (normalization + PCA) → DEA 模型建立及求解 → 结论及建议

Example D — Deep Learning Prediction (water quality CNN): 绪论 → 模型构建思路与创新 → 数据描述及预处理 → 主成分分析 → CNN 模型构建与评价 (with model comparison) → 结论与展望

Key observations:

  • No award-winning paper uses the "baseline regression → robustness → heterogeneity" causal inference structure (unless the topic IS causal inference)
  • Chapter count varies from 5-7, determined by content
  • "Model introduction / theoretical basis" can come before or after the data chapter
  • "Innovation & limitations" can be inside the conclusion or a standalone chapter
Chapter design checklist (self-check before writing)
  • [ ] Does every chapter title contain specific research content (not generic "模型构建")?
  • [ ] Does the chapter order follow the research logic chain (reader can follow naturally)?
  • [ ] Do core analysis chapters (model results) occupy 40-50% of the paper?
  • [ ] Is there a dedicated data description / exploratory analysis chapter (reviewers value data understanding)?
  • [ ] Does the conclusion include "innovation" and "limitations" (reviewer bonus points)?

Use Chinese numbering (一、二、三...) with sub-sections (一)(二)(三). Do not use 1、2、3 or 1.1、1.2 format. Fixed sections that must be kept: 表格清单, 插图清单, 中英文摘要, 绪论, 结论, 参考文献, 致谢. </paper_structure>

⛔⛔⛔ 完成铁律(最高优先级)

根据 `params.output_format` 决定主产物:

  • PDF 模式(默认):paper/main.tex(≥ 5KB)+ paper/sections/*.tex + paper/references.bib
  • docx 模式:paper/main.md(单文件,≥ 5KB)。禁止产 paper/main.tex。Markdown 规范(标题层级/摘要/公式/图表/引用、LaTeX 残留检查)见本 skill 的 references/docx-mode-zh.md。

⛔ 结束前必跑产出验证:

bash
MODE=$(grep -q "Word(.docx)" CLAUDE.md 2>/dev/null && echo docx || echo pdf)
echo "MODE: $MODE"
PASS=true
if [ "$MODE" = "docx" ]; then
[ -f paper/main.md ] && SZ=$(wc -c < paper/main.md) || SZ=0
[ "$SZ" -ge 5120 ] && echo "✅ paper/main.md ($SZ)" || { echo "❌ paper/main.md 缺失或过小"; PASS=false; }
else
[ -f paper/main.tex ] && SZ=$(wc -c < paper/main.tex) || SZ=0
[ "$SZ" -ge 5120 ] && echo "✅ paper/main.tex ($SZ)" || { echo "❌ paper/main.tex 缺失或过小"; PASS=false; }
SECT_COUNT=$(ls paper/sections/*.tex 2>/dev/null | wc -l)
[ "$SECT_COUNT" -ge 3 ] && echo "✅ sections ($SECT_COUNT)" || { echo "❌ 章节过少"; PASS=false; }
fi
[ "$PASS" != true ] && echo "⛔ 产出验证失败 — 必须补全后重新跑验证, 不要结束本步骤"

Workflow

Step 0: Backup + resume check + upstream validation

⛔ 上游输出完整性检查(写论文前必做):

bash
echo "=== 上游输出完整性检查 ==="
UPSTREAM_OK=true
# 1. 核心文件是否存在
for f in PROBLEM_ANALYSIS.md MODELING_REPORT.md RESULTS.md; do
if [ -f "$f" ]; then
sz=$(wc -c < "$f")
echo "✅ $f ($sz 字符)"
[ "$sz" -lt 500 ] && echo " ⚠ 文件过小,内容可能不完整"
else
echo "❌ $f 不存在!"
UPSTREAM_OK=false
fi
done
# 2. 子问题覆盖度:赛题分析 vs 建模报告 vs 代码结果
PROB_COUNT=$(grep -c '问题[一二三四五六七八九十]' PROBLEM_ANALYSIS.md 2>/dev/null || echo 0)
MODEL_COUNT=$(grep -c '问题[一二三四五六七八九十]' MODELING_REPORT.md 2>/dev/null || echo 0)
RESULT_FILES=$(ls figures/problem_*_results.json 2>/dev/null | wc -l)
echo "子问题数: 分析=$PROB_COUNT, 建模=$MODEL_COUNT, 代码结果=$RESULT_FILES"
[ "$MODEL_COUNT" -lt "$PROB_COUNT" ] && echo "⚠ 建模报告覆盖子问题数少于赛题分析"
[ "$RESULT_FILES" -lt "$PROB_COUNT" ] && echo "⚠ 代码结果文件数少于子问题数"
# 3. 图表文件是否存在
PDF_COUNT=$(ls figures/*.pdf 2>/dev/null | wc -l)
echo "PDF 图表: $PDF_COUNT 个"
[ "$PDF_COUNT" -eq 0 ] && echo "⚠ 没有 PDF 图表,论文将缺少图片"
# 4. all_results.json 是否存在
[ -f figures/all_results.json ] && echo "✅ all_results.json 存在" || echo "⚠ all_results.json 不存在,论文数值可能不准确"
# 5. latex_includes.tex 是否存在
[ -f figures/latex_includes.tex ] && echo "✅ latex_includes.tex 存在" || echo "⚠ latex_includes.tex 不存在,图表嵌入代码缺失"
echo "=== 上游检查完成 ==="

Back up existing paper/. Check for incomplete sections from previous runs:

bash
echo "=== 断点续写检查 ==="
if [ -d "paper/sections" ]; then
for f in paper/sections/*.tex; do
[ -f "$f" ] || continue
chars=$(wc -c < "$f")
if [ "$chars" -lt 500 ]; then
echo "⚠ 占位符: $(basename $f) ($chars 字符) — 需要续写"
else
echo "✅ 已完成: $(basename $f) ($chars 字符)"
fi
done
fi

Resume rules: only write placeholder sections (<500 chars or contains "待补充"/"placeholder"), skip completed ones (>2000 chars). Save each chapter immediately — do not accumulate in memory.

Step 1: Copy template (based on COMPETITION type)
bash
mkdir -p paper/sections
# Select template based on competition type — copy entire folder (tex + cls + fonts)
TMPL_BASE="_templates"
[ -d "$TMPL_BASE" ] || TMPL_BASE="templates"
if [ "$COMPETITION" = "stats" ] || echo "$ARGUMENTS" | grep -qi "统计建模\|stats"; then
echo "Using stats template"
cp "$TMPL_BASE/stats/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "apmcm_zh\|亚太.*中文\|亚太赛中文" || grep -qi "apmcm_zh\|亚太.*中文\|亚太赛中文" CLAUDE.md 2>/dev/null; then
echo "Using APMCM (Chinese) template (MathorCupmodeling.cls)"
cp "$TMPL_BASE/apmcm_zh/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "mathorcup\|MathorCup\|mathor" || grep -qi "mathorcup" CLAUDE.md 2>/dev/null; then
echo "Using MathorCup template"
cp "$TMPL_BASE/mathorcup/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "huazhong\|华中杯" || grep -qi "huazhong\|华中杯" CLAUDE.md 2>/dev/null; then
echo "Using huazhong template"
cp "$TMPL_BASE/huazhong/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "huawei\|华为杯" || grep -qi "huawei\|华为杯" CLAUDE.md 2>/dev/null; then
echo "Using huawei template"
cp "$TMPL_BASE/huawei/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "wuyi\|五一杯" || grep -qi "wuyi\|五一杯" CLAUDE.md 2>/dev/null; then
echo "Using wuyi template"
cp "$TMPL_BASE/wuyi/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "cumcm\|国赛" || grep -qi "cumcm\|国赛" CLAUDE.md 2>/dev/null; then
echo "Using cumcm template"
cp "$TMPL_BASE/cumcm/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "changsanjiao\|长三角" || grep -qi "changsanjiao\|长三角" CLAUDE.md 2>/dev/null; then
echo "Using changsanjiao template"
cp "$TMPL_BASE/changsanjiao/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "huashu\|华数杯" || grep -qi "huashu\|华数杯" CLAUDE.md 2>/dev/null; then
echo "Using huashubei template"
cp "$TMPL_BASE/huashubei/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "diangong\|电工杯" || grep -qi "diangong\|电工杯" CLAUDE.md 2>/dev/null; then
echo "Using diangongbei template"
cp "$TMPL_BASE/diangongbei/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "dongsansheng\|东三省\|辽宁" || grep -qi "dongsansheng\|东三省\|辽宁" CLAUDE.md 2>/dev/null; then
echo "Using dongsansheng template"
cp "$TMPL_BASE/dongsansheng/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "shuwei\|数维杯" || grep -qi "shuwei\|数维杯" CLAUDE.md 2>/dev/null; then
echo "Using shuweibei template"
cp "$TMPL_BASE/shuweibei/"* paper/ 2>/dev/null
else
echo "Using default template"
cp "$TMPL_BASE/default/"* paper/ 2>/dev/null
fi
# Rename to main.tex if needed
[ -f paper/main.tex ] && echo "Template copied: $(wc -l < paper/main.tex) lines" || echo "ERROR: template not found!"

⛔ 模板复制后立即验证(必须通过才能继续):

bash
echo "=== 模板完整性验证 ==="
if [ ! -f paper/main.tex ]; then
echo "❌ CRITICAL: paper/main.tex 不存在!模板复制失败"
else
# 通用检查
grep -q 'documentclass' paper/main.tex && echo "✅ documentclass 存在" || echo "❌ 缺少 documentclass"
grep -q '\\input{sections/' paper/main.tex && echo "✅ sections input 存在" || echo "❌ 缺少 sections input"
grep -q 'thebibliography\|bibliography{' paper/main.tex && echo "✅ 参考文献结构存在" || echo "❌ 缺少参考文献"
grep -q 'appendices\|\\appendix' paper/main.tex && echo "✅ 附录结构存在" || echo "❌ 缺少附录"
# ⛔ 模板指纹校验:对比 paper/main.tex 和模板原文,确认是复制的不是 Claude 自己写的
TMPL_BASE="_templates"
[ -d "$TMPL_BASE" ] || TMPL_BASE="templates"
# 找到当前使用的模板原文
TMPL_MAIN=""
for d in "$TMPL_BASE"/*/; do
[ -f "${d}main.tex" ] || continue
# 用 documentclass 行匹配
TMPL_CLS=$(grep 'documentclass' "${d}main.tex" 2>/dev/null | head -1)
PAPER_CLS=$(grep 'documentclass' paper/main.tex 2>/dev/null | head -1)
if [ "$TMPL_CLS" = "$PAPER_CLS" ]; then
TMPL_MAIN="${d}main.tex"
break
fi
done

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

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
vskill VERIFIED badge
[![vskill VERIFIED](https://verified-skill.com/api/v1/skills/yjh051108/mmkit/comp-paper-zh/badge)](https://verified-skill.com/skills/yjh051108/mmkit/comp-paper-zh)

Something wrong with this skill or its page? Tell us.