yjh051108/mmkit/comp-paper-en

Claude Code and agent skill by yjh051108/mmkit

Trust tier 2
  • community
Source check pending

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

Mathematical modeling competition paper writing in English (MCM/ICM/APMCM) — LaTeX (PDF mode) or Markdown (docx mode). Generate complete paper following COMAP format. Use when user says \"write MCM paper\", \"美赛论文\", \"English competition paper\".

Install

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

SKILL.md

Competition Paper Writing (English)

Write a competition paper: $ARGUMENTS

Constants

  • COMPETITION — Default mcm. From Additional Parameters.
  • MAX_PAGES — Default 25. Body pages 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

MCM/ICM Paper Structure

Summary Sheet (1 page — most important page in the entire paper)
Table of Contents
1. Introduction (1-2 pages)
2. Assumptions and Justifications (0.5 page)
3. Notations (0.5 page)
4. Model Design and Solution (per sub-problem, 4-5 pages each)
5. Sensitivity Analysis (1-2 pages)
6. Model Evaluation (Strengths + Weaknesses)
7. Conclusions (0.5 page)
References
Appendix A: Code

⛔⛔⛔ Output Contract (highest priority)

Mandatory output depends on `params.output_format`:

  • PDF mode: paper/main.tex (≥ 5KB) + paper/sections/*.tex + paper/references.bib
  • docx mode: paper/main.md (single file, ≥ 5KB). Do NOT create paper/main.tex. Read references/docx-conventions.md in this skill for the Markdown conventions.

⛔ MUST run output verification before ending the step:

bash
MODE=$(grep -q "Word(.docx)\|docx mode" CLAUDE.md 2>/dev/null && echo docx || echo pdf)
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 missing"; 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 missing"; PASS=false; }
SECT_COUNT=$(ls paper/sections/*.tex 2>/dev/null | wc -l)
[ "$SECT_COUNT" -ge 3 ] && echo "✅ sections ($SECT_COUNT)" || { echo "❌ too few sections"; PASS=false; }
fi
[ "$PASS" != true ] && echo "⛔ Output verification FAILED — must complete before ending"

Workflow

Step 0: Backup + resume check

Back up existing paper/. Check for incomplete sections:

bash
echo "=== Resume check ==="
if [ -d "paper/sections" ]; then
for f in paper/sections/*.tex; do
[ -f "$f" ] || continue
chars=$(wc -c < "$f")
[ "$chars" -lt 500 ] && echo "⚠ Placeholder: $(basename $f) ($chars chars)" || echo "✅ Complete: $(basename $f) ($chars chars)"
done
fi

Resume: only write placeholder sections, skip completed ones (>2000 chars). Save each section immediately. If approaching output limit, create % [PLACEHOLDER] files.

Step 1: Select template
bash
mkdir -p paper/sections
TMPL_BASE="_templates"
[ -d "$TMPL_BASE" ] || TMPL_BASE="templates"
if echo "$ARGUMENTS" | grep -qi "mcm\|MCM\|ICM" || grep -qi "mcm\|MCM" CLAUDE.md 2>/dev/null; then
echo "Using MCM template"
cp "$TMPL_BASE/mcm/"* paper/ 2>/dev/null
elif echo "$ARGUMENTS" | grep -qi "apmcm\|APMCM\|亚太" || grep -qi "apmcm" CLAUDE.md 2>/dev/null; then
echo "Using APMCM template"
cp "$TMPL_BASE/apmcm/"* paper/ 2>/dev/null
else
echo "Using default English template"
cp "$TMPL_BASE/default/"* paper/ 2>/dev/null
fi
[ -f paper/main.tex ] && echo "Template copied: $(wc -l < paper/main.tex) lines" || echo "ERROR: template not found!"

MCM/ICM uses mcmthesis.cls (included in template folder). APMCM uses article class.

⛔ Do not write main.tex from scratch — copy the template and only replace placeholders. The template handles fonts, margins, headers, and formatting.

Step 2: Figure inventory

Before writing any section, build a complete inventory of available figures:

bash
echo "=== Available PDF figures ==="
ls -la figures/*.pdf 2>/dev/null || echo "No PDF figures found"
echo ""
echo "=== Available table files (PDF mode: .tex / Word mode: .md) ==="
ls -la figures/TABLE_*.tex figures/TABLE_*.md 2>/dev/null || echo "No TABLE files found"
echo ""
echo "=== latex_includes.tex content (figure→PDF mapping) ==="
cat figures/latex_includes.tex 2>/dev/null || echo "No latex_includes.tex"
echo ""
echo "=== TikZ geometry/algorithm/architecture diagrams ==="
# TikZ generated by paper-figure as figures/tikz_diagrams.tex → compiled to figures/tikz_diagrams.pdf
# (legacy name tikz_architecture_examples.tex also accepted). Their \includegraphics blocks are in latex_includes.tex.
ls figures/tikz_*.pdf 2>/dev/null && echo "→ TikZ present, must embed" || echo "No TikZ diagrams"

⛔ MANDATORY: Build a FIGURE EMBEDDING PLAN before writing any section:

FIGURE EMBEDDING PLAN:
1. fig_p1_result.pdf → Problem 1 section → caption: "Figure X: ..."
2. fig_p2_result.pdf → Problem 2 section → caption: "Figure X: ..."
3. TABLE_comparison.tex → Results section → caption: "Table X: ..."
4. tikz_diagrams.pdf (geometry/algorithm/architecture TikZ, from latex_includes.tex) → Introduction/Model section

Rules:

  • ⛔ Must use figure blocks from `latex_includes.tex`, not write \includegraphics from scratch
  • ⛔ TikZ diagrams must be embedded: every \begin{figure} block in latex_includes.tex that references tikz_diagrams.pdf / tikz_*.pdf must be copied into a section — do not miss any
  • ⛔ Image paths must be `../figures/xxx.pdf`
  • Only embed figures whose PDF files actually exist

⛔⛔⛔ DrawIO figure embedding (most commonly missed — check each one):

DrawIO figures (roadmap, flow charts, pipeline diagrams) are appended at the end of latex_includes.tex by the paper-figure step. You MUST embed them:

DrawIO figure typeEmbed locationSection file
Technical roadmap (fig_roadmap)End of Introduction/Problem Restatement1_introduction.tex
Sub-problem flow chart (fig_flow_q1/q2/q3)Inside each sub-problem's "Model Construction" subsection, preceded by 2-3 sentences introducing the solving approach and main steps4_problem1.tex, 5_problem2.tex etc.
Data pipeline (fig_pipeline)Data preprocessing sectionData/method section
TikZ geometry/algorithm (tikz_diagrams.pdf)Geometry → relevant sub-problem section; algorithm flow → Model Construction subsectionSub-problem/Model section

After writing all sections, verify DrawIO/TikZ figures are embedded:

bash
echo "=== DrawIO/TikZ embedding check ==="
for pdf in figures/fig_roadmap.pdf figures/fig_flow_*.pdf figures/fig_pipeline*.pdf figures/fig_framework*.pdf; do
[ -f "$pdf" ] || continue
bn=$(basename "$pdf")
grep -rq "$bn" paper/sections/*.tex paper/main.tex 2>/dev/null && echo "✅ $bn embedded" || echo "❌ $bn NOT embedded — fix now!"
done
# ⛔ TikZ check by PDF filename (most reliable)
for tpdf in figures/tikz_diagrams.pdf figures/tikz_diagrams_*.pdf figures/tikz_*.pdf; do
[ -f "$tpdf" ] || continue
tbn=$(basename "$tpdf")
grep -rq "$tbn" paper/sections/*.tex paper/main.tex 2>/dev/null && echo "✅ TikZ $tbn embedded" || echo "❌ TikZ $tbn NOT embedded — fix now!"
done

Also scan figures/*.tex for all \begin{figure} / \begin{table} blocks with their \label{}. After writing, verify all embedded:

bash
grep -oh '\\label{[^}]*}' figures/*.tex 2>/dev/null | sort -u > _tmp/all_fig_labels.txt
grep -oh '\\label{[^}]*}' paper/sections/*.tex paper/main.tex 2>/dev/null | sort -u > _tmp/embedded_labels.txt
comm -23 _tmp/all_fig_labels.txt _tmp/embedded_labels.txt # should be empty

Follow interleaving and embedding rules from _utils/writing_rules.md.

⛔ Figure-text interleaving hard rules (every section must follow):

  • All \begin{figure} must use [H], never [htbp]
  • Every figure/table must be followed by ≥5 lines of analysis text (data interpretation + comparison + conclusion) before the next figure
  • Absolutely no consecutive figures/tables without analysis paragraphs between them
  • Use \includegraphics[width=0.85\textwidth,keepaspectratio] (width-driven, let height auto-scale). ⛔ Do NOT add a small height=0.38\textheight cap — with keepaspectratio, a height cap can only shrink the figure: near-square or tall figures (heatmaps, radar charts, forest plots, confusion matrices, stacked subplots, flowcharts) get clamped to ~half text-width and look tiny. Only add height=0.9\textheight as an overflow guard when a single figure is genuinely near a full page tall
Step 2.5: Pre-fetch verified reference pool

⛔ MUST complete before writing any \citep{} in Step 3.

bash
PYTHON=$(command -v python3 2>/dev/null || command -v python 2>/dev/null)
mkdir -p _tmp
# Search for real papers in your topic areas (adapt queries to your paper)
# Example:
# $PYTHON "$SCHOLAR_SCRIPT" bibtex "your core method keywords" --max 5
# $PYTHON "$SCHOLAR_SCRIPT" bibtex "your research domain keywords" --max 5

Create _tmp/_verified_refs.txt with verified papers. Only cite papers from this pool when writing. Search and verify before adding new citations.

Fallback: If scholar_fetch.py returns no results or match_label="low" for a topic, use WebSearch to find the paper on Google Scholar / Semantic Scholar website, then manually verify title + authors + year before adding to the pool.

Step 3: Write each section

⛔ MCM/ICM chapter order (must follow template):

1_introduction.tex — Problem background + restatement + approach overview
2_assumptions.tex — Assumptions and justifications
3_symbols.tex — Notation table (use non-floating table: \begin{center}\begin{tabular}, NOT \begin{table})
4_model.tex — Model development (or split per sub-problem)
5_results.tex — Results and analysis
6_sensitivity.tex — Sensitivity analysis
7_strengths.tex — Strengths and weaknesses
A_code.tex — Appendix: code

File names must match template \input{sections/...} lines.

⛔ Before writing each section, read MODELING_REPORT.md and RESULTS.md for exact numbers and formulas.

⛔ No `\begin{itemize}` or `\begin{enumerate}` in body text — use flowing prose. Inline numbering "(1)...(2)..." is acceptable.

<exemplar_depth>

Writing depth reference

MCM/ICM Outstanding Paper (25 pages total, including everything):

  • Summary Sheet (1p): 300-400 words, self-contained with specific numerical results. Structure: problem statement (1-2 sentences) → method (2-3 sentences) → key results (3-4 sentences with numbers) → conclusion (1-2 sentences)
  • Introduction (2p): problem context + literature + approach overview
  • Assumptions (0.5p): each assumption with justification (not just a bullet list)
  • Notations (0.5p): use non-floating table (\begin{center}\begin{tabular} + \captionof{table}{}, NOT \begin{table}). This prevents the section title and table from being split across pages. Keep to 15-20 symbols max.
  • Each sub-problem (4-5p): model formulation (1.5p, with derivation) + solution method (1p, with algorithm) + results with table+figure+numbers (1p) + analysis (0.5-1p, interpretation + comparison)
  • Sensitivity Analysis (2-3p): ≥2 key parameters, each with variation plot + analysis paragraph
  • Model Evaluation (1.5p): 3-5 strengths + 2-3 weaknesses (honest, not token weaknesses) + generalization discussion
  • References + Appendix (3-4p)

APMCM First Prize (25-30 pages): similar but can be longer, 5-6 pages per sub-problem with more detailed analysis. </exemplar_depth>

After each chapter, check chars:

bash
chars=$(wc -c < "paper/sections/current_chapter.tex")
echo "Current chapter: $chars chars"
# English LaTeX ≈ 2000-2500 chars/page
# If sub-problem chapter expected 4 pages but only 4000 chars (~2 pages), expand immediately

This is the start of the file. Read the full SKILL.md on GitHub.

Security

  • Security scanPassed, 100 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-en/badge)](https://verified-skill.com/skills/yjh051108/mmkit/comp-paper-en)

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