ml-paper-writing

davila7/claude-code-templates · updated Jun 4, 2026

MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.

$npx skills add https://github.com/davila7/claude-code-templates --skill ml-paper-writing
0 commentsdiscussion
summary

Expert-level guidance for writing publication-ready papers targeting NeurIPS, ICML, ICLR, ACL, AAAI, and COLM. This skill combines writing philosophy from top researchers (Nanda, Farquhar, Karpathy, Lipton, Steinhardt) with practical tools: LaTeX templates, citation verification APIs, and conference checklists.

skill.md

ML Paper Writing for Top AI Conferences

Expert-level guidance for writing publication-ready papers targeting NeurIPS, ICML, ICLR, ACL, AAAI, and COLM. This skill combines writing philosophy from top researchers (Nanda, Farquhar, Karpathy, Lipton, Steinhardt) with practical tools: LaTeX templates, citation verification APIs, and conference checklists.

Core Philosophy: Collaborative Writing

Paper writing is collaborative, but Claude should be proactive in delivering drafts.

The typical workflow starts with a research repository containing code, results, and experimental artifacts. Claude's role is to:

  1. Understand the project by exploring the repo, results, and existing documentation
  2. Deliver a complete first draft when confident about the contribution
  3. Search literature using web search and APIs to find relevant citations
  4. Refine through feedback cycles when the scientist provides input
  5. Ask for clarification only when genuinely uncertain about key decisions

Key Principle: Be proactive. If the repo and results are clear, deliver a full draft. Don't block waiting for feedback on every section—scientists are busy. Produce something concrete they can react to, then iterate based on their response.


⚠️ CRITICAL: Never Hallucinate Citations

This is the most important rule in academic writing with AI assistance.

The Problem

AI-generated citations have a ~40% error rate. Hallucinated references—papers that don't exist, wrong authors, incorrect years, fabricated DOIs—are a serious form of academic misconduct that can result in desk rejection or retraction.

The Rule

NEVER generate BibTeX entries from memory. ALWAYS fetch programmatically.

Action ✅ Correct ❌ Wrong
Adding a citation Search API → verify → fetch BibTeX Write BibTeX from memory
Uncertain about a paper Mark as [CITATION NEEDED] Guess the reference
Can't find exact paper Note: "placeholder - verify" Invent similar-sounding paper

When You Can't Verify a Citation

If you cannot programmatically verify a citation, you MUST:

% EXPLICIT PLACEHOLDER - requires human verification
\cite{PLACEHOLDER_author2024_verify_this}  % TODO: Verify this citation exists

Always tell the scientist: "I've marked [X] citations as placeholders that need verification. I could not confirm these papers exist."

Recommended: Install Exa MCP for Paper Search

For the best paper search experience, install Exa MCP which provides real-time academic search:

Claude Code:

claude mcp add exa -- npx -y mcp-remote "https://mcp.exa.ai/mcp"

Cursor / VS Code (add to MCP settings):

{
  "mcpServers": {
    "exa": {
      "type": "http",
      "url": "https://mcp.exa.ai/mcp"
    }
  }
}

Exa MCP enables searches like:

  • "Find papers on RLHF for language models published after 2023"
  • "Search for transformer architecture papers by Vaswani"
  • "Get recent work on sparse autoencoders for interpretability"

Then verify results with Semantic Scholar API and fetch BibTeX via DOI.


Workflow 0: Starting from a Research Repository

When beginning paper writing, start by understanding the project:

Project Understanding:
- [ ] Step 1: Explore the repository structure
- [ ] Step 2: Read README, existing docs, and key results
- [ ] Step 3: Identify the main contribution with the scientist
- [ ] Step 4: Find papers already cited in the codebase
- [ ] Step 5: Search for additional relevant literature
- [ ] Step 6: Outline the paper structure together
- [ ] Step 7: Draft sections iteratively with feedback

Step 1: Explore the Repository

# Understand project structure
ls -la
find . -name "*.py" | head -20
find . -name "*.md" -o -name "*.txt" | xargs grep -l -i "result\|conclusion\|finding"

Look for:

  • README.md - Project overview and claims
  • results/, outputs/, experiments/ - Key findings
  • configs/ - Experimental settings
  • Existing .bib files or citation references
  • Any draft documents or notes

Step 2: Identify Existing Citations

Check for papers already referenced in the codebase:

# Find existing citations
grep -r "arxiv\|doi\|cite" --include="*.md" --include="*.bib" --include="*.py"
find . -name "*.bib"

These are high-signal starting points for Related Work—the scientist has already deemed them relevant.

Step 3: Clarify the Contribution

Before writing, explicitly confirm with the scientist:

"Based on my understanding of the repo, the main contribution appears to be [X]. The key results show [Y]. Is this the framing you want for the paper, or should we emphasize different aspects?"

Never assume the narrative—always verify with the human.

Step 4: Search for Additional Literature

Use web search to find relevant papers:

Search queries to try:
- "[main technique] + [application domain]"
- "[baseline method] comparison"
- "[problem name] state-of-the-art"
- Author names from existing citations

Then verify and retrieve BibTeX using the citation workflow below.

Step 5: Deliver a First Draft

Be proactive—deliver a complete draft rather than asking permission for each section.

If the repo provides clear results and the contribution is apparent:

  1. Write the full first draft end-to-end
  2. Present the complete draft for feedback
  3. Iterate based on scientist's response

If genuinely uncertain about framing or major claims:

  1. Draft what you can confidently
  2. Flag specific uncertainties: "I framed X as the main contribution—let me know if you'd prefer to emphasize Y instead"
  3. Continue with the draft rather than blocking

Questions to include with the draft (not before):

  • "I emphasized X as the main contribution—adjust if needed"
  • "I highlighted results A, B, C—let me know if others are more important"
  • "Related work section includes [papers]—add any I missed"

When to Use This Skill

Use this skill when:

  • Starting from a research repo to write a paper
  • Drafting or revising specific sections
  • Finding and verifying citations for related work
  • Formatting for conference submission
  • Resubmitting to a different venue (format conversion)
  • Iterating on drafts with scientist feedback

Always remember: First drafts are starting points for discussion, not final outputs.


Balancing Proactivity and Collaboration

Default: Be proactive. Deliver drafts, then iterate.

Confidence Level Action
High (clear repo, obvious contribution) Write full draft, deliver, iterate on feedback
Medium (some ambiguity) Write draft with flagged uncertainties, continue
Low (major unknowns) Ask 1-2 targeted questions, then draft

Draft first, ask with the draft (not before):

Section Draft Autonomously Flag With Draft
Abstract Yes "Framed contribution as X—adjust if needed"
Introduction Yes "Emphasized problem Y—correct if wrong"
Methods Yes "Included details A, B, C—add missing pieces"
Experiments Yes "Highlighted results 1, 2, 3—reorder if needed"
Related Work Yes "Cited papers X, Y, Z—add any I missed"

Only block for input when:

  • Target venue is unclear (affects page limits, framing)
  • Multiple contradictory framings seem equally valid
  • Results seem incomplete or inconsistent
  • Explicit request to review before continuing

Don't block for:

  • Word choice decisions
  • Section ordering
  • Which specific results to show (make a choice, flag it)
  • Citation completeness (draft with what you find, note gaps)

The Narrative Principle

The single most critical insight: Your paper is not a collection of experiments—it's a story with one clear contribution supported by evidence.

Every successful ML paper centers on what Neel Nanda calls "the narrative": a short, rigorous, evidence-based technical story with a takeaway readers care about.

Three Pillars (must be crystal clear by end of introduction):

Pillar Description Example
The What 1-3 specific novel claims within cohesive theme "We prove that X achieves Y under condition Z"
The Why Rigorous empirical evidence supporting claims Strong baselines, experiments distinguishing hypotheses
The So What Why readers should care Connection to recognized community problems

If you cannot state your contribution in one sentence, you don't yet have a paper.


Paper Structure Workflow

Workflow 1: Writing a Complete Paper (Iterative)

Copy this checklist and track progress. Each step involves drafting → feedback → revision:

Paper Writing Progress:
- [ ] Step 1: Define the one-sentence contribution (with scientist)
- [ ] Step 2: Draft Figure 1 → get feedback → revise
- [ ] Step 3: Draft abstract → get feedback → revise
- [ ] Step 4: Draft introduction → get feedback → revise
- [ ] Step 5: Draft methods → get feedback → revise
- [ ] Step 6: Draft experiments → get feedback → revise
- [ ] Step 7: Draft related work → get feedback → revise
- [ ] Step 8: Draft limitations → get feedback → revise
- [ ] Step 9: Complete paper checklist (required)
- [ ] Step 10: Final review cycle and submission

Step 1: Define the One-Sentence Contribution

This step requires explicit confirmation from the scientist.

Before writing anything, articulate and verify:

  • What is the single thing your paper contributes?
  • What was not obvious or present before your work?

"I propose framing the contribution as: '[one sentence]'. Does this capture what you see as the main takeaway? Should we adjust the emphasis?"

Step 2: Draft Figure 1

Figure 1 deserves special attention—many readers skip directly to it.

  • Convey core idea, approach, or most compelling result
  • Use vector graphics (PDF/EPS for plots)
  • Write captions that stand alone without main text
  • Ensure readability in black-and-white (8% of men have color vision deficiency)

Step 3: Write Abstract (5-Sentence Formula)

From Sebastian Farquhar (DeepMind):

1. What you achieved: "We introduce...", "We prove...", "We demonstrate..."
2. Why this is hard and important
3. How you do it (with specialist keywords for discoverability)
4. What evidence you have
5. Your most remarkable number/result

Delete generic openings like "Large language models have achieved remarkable success..."

Step 4: Write Introduction (1-1.5 pages max)

Must include:

  • 2-4 bullet contribution list (max 1-2 lines each in two-column format)
  • Clear problem statement
  • Brief approach overview
  • Methods should start by page 2-3 maximum

Step 5: Methods Section

Enable reimplementation:

  • Conceptual outline or pseudocode
  • All hyperparameters listed
  • Architectural details sufficient for reproduction
  • Present final design decisions; ablations go in experiments

Step 6: Experiments Section

For each experiment, explicitly state:

  • What claim it supports
  • How it connects to main contribution
  • Experimental setting (details in appendix)
  • What to observe: "the blue line shows X, which demonstrates Y"

Requirements:

  • Error bars with methodology (standard deviation vs standard error)
  • Hyperparameter search ranges
  • Compute infrastructure (GPU type, total hours)
  • Seed-setting methods

Step 7: Related Work

Organize methodologically, not paper-by-paper:

Good: "One line of work uses Floogledoodle's assumption [refs] whereas we use Doobersnoddle's assumption because..."

Bad: "Snap et al. introduced X while Crackle et al. introduced Y."

Cite generously—reviewers likely authored relevant papers.

Step 8: Limitations Section (REQUIRED)

All major conferences require this. Counter-intuitively, honesty helps:

  • Reviewers are instructed not to penalize honest limitation acknowledgment
  • Pre-empt criticisms by identifying weaknesses first
  • Explain why limitations don't undermine core claims

Step 9: Paper Checklist

NeurIPS, ICML, and ICLR all require paper checklists. See references/checklists.md.


Writing Philosophy for Top ML Conferences

This section distills the most important writing principles from leading ML researchers. These aren't optional style suggestions—they're what separates accepted papers from rejected ones.

"A paper is a short, rigorous, evidence-based technical story with a takeaway readers care about." — Neel Nanda

The Sources Behind This Guidance

This skill synthesizes writing philosophy from researchers who have published extensively at top venues:

Source Key Contribution Link
Neel Nanda (Google DeepMind) The Narrative Principle, What/Why/So What framework How to Write ML Papers
Sebastian Farquhar (DeepMind) 5-sentence abstract formula How to Write ML Papers
Gopen & Swan 7 principles of reader expectations Science of Scientific Writing
Zachary Lipton Word choice, eliminating hedging Heuristics for Scientific Writing
Jacob Steinhardt (UC Berkeley) Precision, consistent terminology Writing Tips
Ethan Perez (Anthropic) Micro-level clarity tips Easy Paper Writing Tips
Andrej Karpathy Single contribution focus Various lectures

For deeper dives into any of these, see:

Time Allocation (From Neel Nanda)

Spend approximately equal time on each of:

  1. The abstract
  2. The introduction
  3. The figures
  4. Everything else combined

Why? Most reviewers form judgments before reaching your methods. Readers encounter your paper as: title → abstract → introduction → figures → maybe the rest.

Writing Style Guidelines

Sentence-Level Clarity (Gopen & Swan's 7 Principles)

These principles are based on how readers actually process prose. Violating them forces readers to spend cognitive effort on structure rather than content.

Principle Rule Example
Subject-verb proximity Keep subject and verb close ❌ "The model, which was trained on..., achieves" → ✅ "The model achieves... after training on..."
Stress position Place emphasis at sentence ends ❌ "Accuracy improves by 15% when using attention" → ✅ "When using attention, accuracy improves by 15%"
Topic position Put context first, new info after ✅ "Given these constraints, we propose..."
Old befo
how to use ml-paper-writing

How to use ml-paper-writing on Cursor

AI-first code editor with Composer

1

Prerequisites

Before installing skills in Cursor, ensure your development environment meets these requirements:

  • Cursor installed and configured on your development machine
  • Node.js version 16.0+ with npm package manager (verify with node --version)
  • Active project directory or workspace where you want to add ml-paper-writing
2

Execute installation command

Execute the skills CLI command in your project's root directory to begin installation:

$npx skills add https://github.com/davila7/claude-code-templates --skill ml-paper-writing

The skills CLI fetches ml-paper-writing from GitHub repository davila7/claude-code-templates and configures it for Cursor.

3

Select Cursor when prompted

The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:

◆ Which agents do you want to install to?
│ ── Universal (.agents/skills) ── always included ────
│ • Amp
│ • Antigravity
│ • Cline
│ • Codex
│ ●Cursor(selected)
│ • Cursor
│ • Windsurf
4

Verify installation

Confirm successful installation by checking the skill directory location:

.cursor/skills/ml-paper-writing

Reload or restart Cursor to activate ml-paper-writing. Access the skill through slash commands (e.g., /ml-paper-writing) or your agent's skill management interface.

Security & Verification Notice

We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.

Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.

List & Monetize Your Skill

Submit your Claude Code skill and start earning

GET_STARTED →

Use Cases

Task Automation & Efficiency

Automate repetitive workflows and reduce manual effort

Example

Generate reports, summarize documents, draft communications

Save 3-5 hours per week on routine tasks

Knowledge Enhancement

Learn new skills, understand complex topics, get expert guidance

Example

Explain concepts, provide examples, suggest learning resources

Accelerate learning and skill development by 2x

Quality Improvement

Enhance output quality through reviews, suggestions, and refinements

Example

Review drafts, suggest improvements, catch errors

Improve work quality by 30-40% with less effort

Implementation Guide

Prerequisites

  • Claude Desktop or compatible AI client with skill support
  • Clear understanding of task or problem to solve
  • Willingness to iterate and refine outputs

Time Estimate

15-45 minutes depending on use case complexity

Installation Steps

  1. 1.Install skill using provided installation command
  2. 2.Test with simple use case relevant to your work
  3. 3.Evaluate output quality and relevance
  4. 4.Iterate on prompts to improve results
  5. 5.Integrate into regular workflow if valuable

Common Pitfalls

  • Expecting perfect results without iteration
  • Not providing enough context in prompts
  • Using skill for tasks outside its intended scope
  • Accepting outputs without review and validation

Best Practices

✓ Do

  • +Start with clear, specific prompts
  • +Provide relevant context and constraints
  • +Review and refine all outputs before using
  • +Iterate to improve output quality
  • +Document successful prompt patterns

✗ Don't

  • Don't use without understanding skill limitations
  • Don't skip validation of outputs
  • Don't share sensitive information in prompts
  • Don't expect skill to replace human judgment

💡 Pro Tips

  • Be specific about desired format and style
  • Ask for multiple options to choose from
  • Request explanations to understand reasoning
  • Combine AI efficiency with human expertise

When to Use This

✓ Use When

Use when skill capabilities match your task, clear ROI on time saved, and you can validate outputs. Best for repetitive tasks, learning, and quality improvement.

✗ Avoid When

Avoid when task requires deep expertise you can't validate, involves sensitive decisions, or when learning process is more valuable than speed of completion.

Learning Path

  1. 1Familiarize yourself with skill capabilities and limitations
  2. 2Start with low-risk, non-critical tasks
  3. 3Progress to more complex and valuable use cases
  4. 4Build expertise through regular use and experimentation

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.541 reviews
  • Pratham Ware· Dec 12, 2024

    ml-paper-writing is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Amina Yang· Dec 8, 2024

    Keeps context tight: ml-paper-writing is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Yusuf Kapoor· Nov 27, 2024

    ml-paper-writing is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Sakshi Patil· Nov 3, 2024

    Keeps context tight: ml-paper-writing is the kind of skill you can hand to a new teammate without a long onboarding doc.

  • Chaitanya Patil· Oct 22, 2024

    Registry listing for ml-paper-writing matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Ava Perez· Oct 18, 2024

    ml-paper-writing fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Kaira Jackson· Sep 25, 2024

    ml-paper-writing has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Layla Mehta· Sep 17, 2024

    ml-paper-writing is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Yuki Choi· Sep 13, 2024

    Useful defaults in ml-paper-writing — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Piyush G· Sep 1, 2024

    ml-paper-writing reduced setup friction for our internal harness; good balance of opinion and flexibility.

showing 1-10 of 41

1 / 5