agentleFS
juanlurgjuanlurg/data-science-claude-skills/skills/paper-to-code/SKILL.md

paper-to-code

Skill3 starsChanged 9 months agoMITView on GitHub

Reads a research paper and generates an implementation notebook with equations, code, and a toy example. Use when the user wants to implement a paper, convert a paper to code, or reproduce a paper's algorithm.

We split this skill into the rules it gives an agent

16 rules. 0 are common, 14 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 7 edited versions we read keep these.

  • 14

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If not provided, ask the user for the paper path or URL.

    line 16
  2. Distinctive:

    Read the PDF using the Read tool (Claude can read PDFs directly).

    line 21
  3. Distinctive:

    Use WebFetch to get the abstract page.

    line 24
  4. Distinctive:

    Check environment per environment-detection.md.

    line 45
  5. Distinctive:

    Follow notebook-format.md for structure.

    line 49
  6. Distinctive:

    No jargon. Write as if explaining to a competent programmer who hasn't read the paper.

    line 73
  7. Distinctive:

    Prefer functional style for clarity, unless the paper naturally maps to classes.

    line 97
  8. Distinctive:

    Keep code focused: no data loading boilerplate, no training loops, no logging — just the core algorithm.

    line 98
  9. Distinctive:

    Create a small synthetic dataset or simple input to demonstrate the implementation:

    line 104
  10. Distinctive:

    Run the implementation on it.

    line 113
  11. Very specific:

    Write to ./notebooks/paper_{short_title}_{YYYY-MM-DD}.ipynb where short_title is a snake_case abbreviation of the paper title (max 30 …

    line 135
  12. Very specific:

    Create the ./notebooks/ directory if it doesn't exist.

    line 137
  13. Distinctive:

    If the paper is too complex for a single notebook (e.g., full transformer architecture), pick the core innovation and implement that.

    line 149
  14. Distinctive:

    Prefer functional style for clarity over OOP unless the paper naturally maps to classes.

    line 150
  15. Distinctive:

    All code must be self-contained and runnable standalone.

    line 151
  16. Distinctive:

    Never claim the implementation is a complete reproduction — always include the disclaimer.

    line 153

“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Paper to Code

Input

$ARGUMENTS is either:

  • A PDF file path (local file).
  • An arXiv URL (e.g., https://arxiv.org/abs/2301.12345).

If not provided, ask the user for the paper path or URL.

Step 1: Read the Paper

If PDF path:

  • Read the PDF using the Read tool (Claude can read PDFs directly).

If arXiv URL:

  • Use WebFetch to get the abstract page.
  • Extract the PDF link: replace /abs/ with /pdf/ and append .pdf.
  • Fetch and read the PDF content.

Extract from the paper:

  • Title, authors, year.
  • Abstract.
  • Key method sections describing the novel contribution.
  • Core equations and algorithm descriptions.
  • Any pseudocode or algorithm boxes.

Step 2: Identify Required Framework

Based on the paper content, determine which libraries are needed:

  • numpy only — simple algorithms, statistical methods.
  • sklearn — ML algorithms, preprocessing.
  • PyTorch — deep learning, neural networks.
  • TensorFlow — deep learning (if paper uses TF).
  • JAX — differentiable programming, if paper uses JAX.

Check environment per environment-detection.md. Ask before installing missing packages.

Step 3: Generate the Notebook

Follow notebook-format.md for structure.

Section 1: Header (markdown)

# Paper Implementation: {paper_title}

**Authors:** {authors}
**Year:** {year}
**Link:** [{url_or_path}]({url_or_path})

*Generated on {YYYY-MM-DD} by paper-to-code skill*

> **Disclaimer:** This is an AI-generated starting point, not a verified
> reproduction. Verify against the original paper before use in production.

Section 2: Paper Overview (markdown)

1-2 paragraphs in plain language explaining:

  • What problem the paper solves.
  • Why it matters (context in the field).
  • The key insight or approach.

No jargon. Write as if explaining to a competent programmer who hasn't read the paper.

Section 3: Key Equations (markdown)

Core mathematical formulations in LaTeX. Each equation followed by a plain-English explanation.

Format:

$$\alpha_i = \frac{\exp(e_i)}{\sum_j \exp(e_j)}$$

This is the softmax attention weight — it converts raw scores into a probability
distribution over all positions. Higher scores get exponentially more weight.

Include only the equations central to the novel contribution — not standard loss functions or well-known formulas unless the paper modifies them.

Section 4: Core Implementation (code + markdown)

Python implementation of the main algorithm — the novel contribution of the paper, NOT the entire paper.

Guidelines:

  • Break into logical functions or classes that map to paper sections.
  • Heavy inline comments referencing paper sections: # Section 3.2, Eq. 5 — compute attention scores.
  • Prefer functional style for clarity, unless the paper naturally maps to classes.
  • Keep code focused: no data loading boilerplate, no training loops, no logging — just the core algorithm.

Markdown cells between code cells explaining what each piece does and how it connects to the paper.

Section 5: Toy Example (code + markdown)

Create a small synthetic dataset or simple input to demonstrate the implementation:

# Create toy data
import numpy as np
np.random.seed(42)
X = np.random.randn(100, 10)  # 100 samples, 10 features

Run the implementation on it. Print or visualize results.

Include a sanity check:

# Sanity check
# Expected behavior: output shape should be (100, 5) for 5 classes
print(f"Output shape: {output.shape}")
assert output.shape == (100, 5), "Shape mismatch!"
print("Sanity check passed.")

Section 6: Limitations & Notes (markdown)

  • What was simplified from the full paper.
  • What was skipped (e.g., specific training tricks, large-scale experiments).
  • Key differences from the paper's full implementation.
  • Links to official repositories if they exist (search GitHub for the paper title).
  • Suggestions for extending the implementation.

Step 4: Write the Notebook

Write to ./notebooks/paper_{short_title}_{YYYY-MM-DD}.ipynb where short_title is a snake_case abbreviation of the paper title (max 30 characters).

Create the ./notebooks/ directory if it doesn't exist.

Step 5: Report

Tell the user:

  • Where the notebook was saved.
  • What was implemented (the core contribution).
  • What was skipped and why.

Important Rules

  • Focus on the NOVEL contribution of the paper, not standard boilerplate.
  • If the paper is too complex for a single notebook (e.g., full transformer architecture), pick the core innovation and implement that. Explain what was scoped out.
  • Prefer functional style for clarity over OOP unless the paper naturally maps to classes.
  • All code must be self-contained and runnable standalone.
  • The toy example must actually run and produce visible output.
  • Never claim the implementation is a complete reproduction — always include the disclaimer.

Download now (ZIP)

  • Other versions7 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • Used alongsideProjects with it also use latex-formatting, novelty-assessment and 10 more.

    Other files people use alongside this one.

    Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
    • lingzhi227Skill

      latex-formatting

      Handle LaTeX formatting, templates, and styling for academic papers. Set up conference templates (ICML, ICLR, NeurIPS, AAAI, ACL), fix formatting issues, manage packages, and ensure venue-specific compliance. Use when the user needs to set up a paper template, fix LaTeX formatting, or prepare for submission.

      Also in 4 projects that use this

    • lingzhi227Skill

      novelty-assessment

      Assess research idea novelty through systematic literature search. Multi-round search-evaluate loops with harsh critic persona. Binary novel/not-novel decision with justification. Use before committing to a research direction.

      Also in 4 projects that use this

    • michaelboedingSkill

      slide-generation

      Use this skill to create presentation slides from structured content. Triggers: "create slides", "generate presentation", "make powerpoint", "create pptx", "build slides", "presentation from content", "slide deck", "slides for" Outputs: PPTX files, Markdown slides, or HTML presentations. Used by: pitch-deck-agent, market-researcher-agent, and other agents needing slides.

      Also in 4 projects that use this

    • OpenAISkill

      idea-generation

      Use when triaging public-equity idea candidates. Do not use for final trade recommendations, pitches, memos, or models.

      Also in 3 projects that use this

    • BlockSkill

      github-research

      Search GitHub issues, PRs, and code using the gh CLI.

      Also in 3 projects that use this

    • JDerekLomasSkill

      literature-review

      Conduct comprehensive, systematic literature reviews using multiple academic databases (PubMed, arXiv, bioRxiv, Semantic Scholar, etc.). This skill should be used when conducting systematic literature reviews, meta-analyses, research synthesis, or comprehensive literature searches across biomedical, scientific, and technical domains. Creates professionally formatted markdown documents and PDFs with verified citations in multiple citation styles (APA, Nature, Vancouver, etc.).

      Also in 5 projects that use this

    • +6 more from lingzhi227
  • In this repository4 other files it gives its agents.

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.