Claude-skills refining-ml-papers
Refines ML/scientific LaTeX papers based on reviewer or advisor feedback. Handles structural reorganization (moving problem statements, merging sections), concrete instantiations of abstract tables, cross-file deduplication, and compilation verification. Use when the user requests paper revisions, addresses reviewer comments, restructures sections, or improves exposition clarity.
git clone https://github.com/shubham0704/claude-skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/shubham0704/claude-skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/refining-ml-papers" ~/.claude/skills/shubham0704-claude-skills-refining-ml-papers && rm -rf "$T"
refining-ml-papers/SKILL.mdRefining ML Papers: From Feedback to Camera-Ready
This skill captures battle-tested patterns for revising scientific LaTeX papers in response to reviewer/advisor feedback. Built from extensive revision work on multi-file ICML-style papers with Overleaf git workflows.
When to Use This Skill
Invoke when the user:
- Has reviewer or advisor feedback to address
- Wants to restructure paper sections (move content, merge sections)
- Needs to explain tables or figures with concrete examples
- Asks to improve exposition clarity or reduce redundancy
- Wants to fix LaTeX compilation issues after restructuring
- Needs to prepare a camera-ready or arXiv version
Core Methodology
Phase 1: Understand the Paper Architecture
Before making ANY changes:
- Map the file structure:
forGlob
to find all LaTeX files**/*.tex - Identify the main file and all
dependencies\input{} - Read the target sections completely before editing
- Check for shared macros: Look for
/\providecommand
patterns that indicate cross-file dependencies\newcommand - Note existing labels:
forGrep
and\label{
to understand cross-reference graph\ref{
# Typical modular structure: main_arxiv.tex # Preamble + abstract + introduction + \input{} calls methods.tex # Section 3 experiments.tex # Section 4 appendix.tex # Appendix appendix_casimir.tex # Specialized appendix references.bib # Bibliography
Phase 2: Plan Changes with Feedback Mapping
Map each piece of feedback to a concrete file + line range + action:
| Feedback | Action | File(s) | Risk |
|---|---|---|---|
| "Problem statement too late" | Move to Sec 1 + slim Sec 3 | main.tex + methods.tex | Cross-ref breakage |
| "Table entries unclear" | Add concrete instantiations paragraph | main.tex | None |
| "Sections redundant" | Merge + back-reference | methods.tex | Label conflicts |
| "Abstract doesn't state problem" | Restructure abstract | main.tex | None |
Always use
for multi-file restructuring. Present the plan before editing.EnterPlanMode
Phase 3: Implementation Patterns
Pattern 1: Moving Content Earlier (e.g., Problem Statement to Introduction)
This is the most common revision request. The three-step protocol:
- Add the content in its new location (e.g., new
in Introduction)\paragraph{Problem setting.} - Slim the original location to a back-reference: "As described in Section~\ref{sec:intro}, ..."
- Preserve all
tags or update\label{}
calls\ref{}
Key principle: The moved content should be a self-contained summary, not a copy-paste. The original section keeps the technical details.
Example structure for a problem-setting paragraph in the Introduction:
\paragraph{Problem setting.} We consider the [setting name]: we observe only [what's observed] at discrete times; [what's latent] are latent and never measured. The goal is to [goal (a)] and [goal (b)]. [Method] addresses this via [solution sketch: 2-3 stages]. Given [input], [method] produces [output]; Section~\ref{sec:methods} details the components.
Pattern 2: Explaining Abstract Tables with Concrete Instantiations
When a table maps systems to mathematical components, add a
\paragraph{Concrete instantiations.} that walks through 2-3 representative rows:
\paragraph{Concrete instantiations.} To make the mapping from physical system to $(V, M, D)$ template explicit, we walk through three representative entries from Table~\ref{tab:...}: \begin{itemize} \item \textbf{System A} (REGIME). State $q = ...$, momentum $p = ...$. [Component 1] encodes [physical meaning]; [Component 2] is [given/learned because...]; [Component 3] is [the unknown that method learns]. \item \textbf{System B} (DIFFERENT REGIME). [Same structure, different system, showing contrast] \item \textbf{System C} (CROSS-DOMAIN). [Non-obvious domain to show generality] \end{itemize}
Selection heuristic: Pick one fully-specified (KNOWN), one partially-specified (PARTIAL), and one from a surprising domain (non-mechanical, ecological, etc.).
Pattern 3: Abstract Restructuring (Problem-First)
Reviewers often complain the abstract leads with the framework instead of the problem. The canonical structure:
- Context (1 sentence): Why this domain matters
- Problem (1-2 sentences): What we're solving, what's observed vs. latent
- Framework (1 sentence): The structural insight that enables the solution
- Method (1-2 sentences): What the method does concretely
- Results (1 sentence): Key empirical finding
- Insight (1 sentence): What we learned (e.g., identifiability vs. forecasting)
Anti-pattern: Starting with "$\dot{x} = (J-R)\nabla H(x)$" before the reader knows what problem is being solved.
Pattern 4: Section Merging / Deduplication
When two sections overlap (e.g., Sec 3.1 and Sec 3.2 both introduce PH dynamics):
- Identify the canonical location (usually the first occurrence)
- Move unique content from the later section into the earlier one
- Replace the later section with a back-reference paragraph
- Update the section roadmap (the "This section describes..." paragraph)
- Check all
calls to the removed/merged subsection labels\ref{}
Pattern 5: Cross-File Consistency After Restructuring
After moving content between files, verify:
- Labels defined in one file aren't duplicated in another
calls still resolve (compile and check log)\ref{}- Notation is consistent (same macro names for the same symbols)
- Commented-out content in the original location is cleaned up or marked
Pattern 6: Cross-Reference Connectivity Audit
For a thorough review (not just compilation), audit the full cross-reference graph:
- Grep all
and\label{}
across every\ref{}
file.tex - Check label naming matches location: A label
should be defined in the methods section, not the introduction. Rename mislocated labels.sec:methods:X - Find orphan labels: Defined but never referenced — typically fine for internal appendix structure, but flag any in the main paper
- Find dangling refs: Referenced but not defined — even in commented-out code, these signal stale content
- Verify back-references: If methods.tex opens with "As described in Sec 1...", confirm the label resolves to the right paragraph
Real example:
sec:methods:regimes was defined in the Introduction (promoted for arXiv) but the name implied Methods. Every \ref resolved to Sec 1 when readers expected Sec 3. Renamed to sec:intro:regimes.
Pattern 7: Table Claim Verification
When a table summarizes properties (identifiability, convergence, complexity):
- Check each cell against its detailed description in the appendix or body text
- Flag qualified claims presented as unqualified (e.g., "Yes" when the appendix says "up to overall scale")
- Check notation consistency: Symbols in table columns shouldn't clash with established notation (e.g., $D_0$ for mass base diagonal when $D$ is reserved for damping → rename to $m_0$)
- Add footnotes for caveats: Use
with caption text rather than silent simplification$^\dagger$
Pattern 8: Appendix Cleanup & Prose Quality
Appendix sections often accumulate dead code and robotic prose:
- Delete empty placeholders: Subsections that say only "Left to future work" — remove entirely
- Clean commented-out blocks: >50 commented lines with no active content nearby → delete
- Add regime/group headers: When listing many items back-to-back (e.g., 9 systems), group them with
headers and 1-2 connecting sentences\paragraph{} - Fix float drift: Appendix figures with
or[h]
often drift into the bibliography → use[t]
(requires[H]
)\usepackage{float}
Phase 4: Compilation & Verification
Always compile after changes. The full verification workflow:
# Full build (from the paper directory) pdflatex -interaction=nonstopmode main.tex bibtex main pdflatex -interaction=nonstopmode main.tex pdflatex -interaction=nonstopmode main.tex
Post-compilation checks:
# Zero undefined references grep -c "undefined" main.log # Zero multiply-defined labels grep "multiply" main.log # Check for other warnings (filter noise) grep -i "warning" main.log | grep -v "Font\|pdf\|Unused\|size\|rerun\|float\|empty\|draft"
Visual verification: Read the PDF pages where changes were made to confirm rendering.
Phase 5: Git Workflow (Overleaf)
For Overleaf-backed papers:
- Commit with descriptive messages referencing the feedback addressed
- Push directly to master (Overleaf syncs from master)
- Only commit
and.tex
files; exclude build artifacts (.bib
,.aux
,.log
,.pdf
,.bbl
,.blg
).out
Common Revision Patterns by Feedback Type
"The paper doesn't state the problem clearly"
→ Pattern 1 (move to intro) + Pattern 3 (rewrite abstract)
"I don't understand what Table X means"
→ Pattern 2 (concrete instantiations)
"Sections 3.1 and 3.2 seem redundant"
→ Pattern 4 (merge + back-reference)
"The abstract is too technical / leads with equations"
→ Pattern 3 (problem-first abstract)
"The notation is introduced too late"
→ Move notation paragraph earlier; keep formal definition in Methods
LaTeX Pitfalls in Paper Revision
See
PITFALLS.md for the complete reference. Critical ones:
| Issue | Cause | Fix |
|---|---|---|
| xcolor option clash | Style file loads xcolor; you also load it | BEFORE |
Undefined after merge | Label moved to different file | Check exists in the new location |
in single-column | Switched from two-column to one-column | Replace → , → |
| Multiply-defined labels | Merged sections both had | Rename one; update all calls |
doesn't override | Macro already defined in preamble | Use or define only in preamble |
Output Format
After implementing all revisions:
## Revision Summary | Part | File | What Changed | |------|------|-------------| | A | main.tex | Abstract rewritten: problem before framework | | B | main.tex | New "Problem setting" paragraph in Sec 1 | | C | methods.tex | Sec 3.1 slimmed to back-reference | | D | main.tex | Concrete instantiations for Table 1 | Build: clean (N pages, 0 undefined refs, 0 warnings)
Progressive Disclosure
For detailed examples and pitfalls:
— Complete before/after examples from real revisionsPATTERNS.md
— Comprehensive LaTeX pitfalls with fixesPITFALLS.md
Validation Checklist
Before marking revision complete:
- All feedback items addressed with specific file + line changes
- Full compilation passes (pdflatex + bibtex + pdflatex × 2)
- Zero undefined references in log
- Zero multiply-defined labels
- PDF visually verified on affected pages
- No redundant content between sections (no reader déjà vu)
- Abstract states the problem before the framework
- All tables with abstract entries have concrete explanations nearby
- Label names match the section they're defined in (no
in intro)sec:methods:X - Table claims match detailed text (footnote any qualified claims)
- No notation collisions across columns/sections (e.g., $D_0$ for mass vs. $D$ for damping)
- Appendix: no empty placeholder sections, no large commented-out blocks
- Appendix: figures use
placement (not[H]
/[h]
which drift)[t] - Git committed with descriptive message mapping to feedback