paper2code

A workflow that reads a research paper from a PDF or arXiv link and turns its described method into executable code. It first creates a structured YAML plan, then implements and checks the code one file at a time.

In plain words
What is it for?
Use it to reproduce a research result, implement an algorithm from a paper, or convert a paper's method into tested software.
Why use it?
It gives paper replication a repeatable process and keeps the implementation tied to the paper's stated specifications.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/proyecto26/sherlock-ai-plugin/paper2code
Any agent
npx skills add proyecto26/sherlock-ai-plugin --skill paper2code
Clone the repo
git clone --depth 1 https://github.com/proyecto26/sherlock-ai-plugin

Made for: Claude Code, Codex.

Per session 58 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,279 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00058 $0.02279
Opus 5 $0.00029 $0.01140
Sonnet 5 $0.00012 $0.00456
Haiku 4.5 $0.00006 $0.00228

Measured 2d ago against content hash 3e3987917f57, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

paper2code scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -L "https://arxiv.org/pdf/xxxx.xxxxx.pdf" -o paper.pdf
skills/paper2code/SKILL.md · 302 lines

How it starts

The opening of the file, as written. The whole thing — 302 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Paper2Code: AI Agent for Converting Research Papers into Code

Overview

This Skill executes a 4+2 stage pipeline effectively systematically analyzing research papers and converting them into executable code.

Core Principle: Do not simply read the paper and generate code; generate a structured intermediate representation (YAML) first, then write the code.


⚠️ Critical Behavioral Control Rules (CRITICAL)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠️ MANDATORY BEHAVIORAL RULES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. Implement one file at a time
2. Proceed to the next file only after completing the current file, without asking for confirmation
3. Original paper specifications always take precedence over reference code
4. Perform a Self-Check for each Phase before completion
5. Save all intermediate results as YAML files

DO:
✓ Implementing exactly what is stated in the paper
✓ Write simple and direct code
✓ Working code first, elegant code later
✓ Test each component immediately
✓ Move to the next file immediately after implementation is complete

DON'T:
✗ Do not ask "Shall I implement the next file?" between files
✗ Extensive documentation not required for core functionality
✗ Optimization not needed for reproducibility
✗ Excessive abstraction or design patterns
✗ Providing instructions without writing actual code
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Input Processing

Supported Formats

  1. arXiv URL: https://arxiv.org/abs/xxxx.xxxxx or https://arxiv.org/pdf/xxxx.xxxxx.pdf
  2. PDF File Path: /path/to/paper.pdf
  3. Converted Text/Markdown: When paper content is provided as text

Input Processing Method

For arXiv URL:

# Convert to PDF URL and download
curl -L "https://arxiv.org/pdf/xxxx.xxxxx.pdf" -o paper.pdf

# Convert PDF to text (using pdftotext)
pdftotext -layout paper.pdf paper.txt

For PDF File:

pdftotext -layout "/path/to/paper.pdf" paper.txt

Read the full file on GitHub · 302 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 302 lines · 58 tokens per session scan A 3e3987917f57

Subscribe to this mod's changes

paper2code is a skill published in the GitHub repository proyecto26/sherlock-ai-plugin (35 stars, last pushed 4mo ago), licensed MIT. It adds 58 tokens to every session and 2,279 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

paper2code

Analyzes research papers (PDF/arXiv URL) and converts them into executable code. Automatically activated upon requests for paper replication, algorithm implementation, or research reproduction. Responds to requests like "Implement this paper", "paper2code", "Convert paper to code".

lyx2022518/sherlock-ai-plugin · 58 tokens

paper-comic

Generate educational comics from academic papers, using visual storytelling to explain core ideas and innovations. Supports 4 art styles: classic (clean lines), tech (futuristic), warm (friendly), chalk (blackboard). Uses genimg-gemini-web to generate images.

lyx2022518/sherlock-ai-plugin · 58 tokens

paper-visualizer

Transform research papers into professional visual schemas. Analyzes paper logic, selects optimal layout patterns, and generates detailed prompts for AI image generation.

lyx2022518/sherlock-ai-plugin · 33 tokens

paper-analyzer

Transform academic papers into in-depth technical articles with multiple writing style options. Use the MinerU Cloud API for high-precision PDF parsing, automatically extracting images, tables, and formulas. Optional formula explanations and GitHub code analysis, generating Markdown and HTML formats.

lyx2022518/sherlock-ai-plugin · 55 tokens

paper-slides

Generate conference presentation slides (beamer LaTeX → PDF + editable PPTX) from a compiled paper, with speaker notes and full talk script. Use when user says "做PPT", "做幻灯片", "make slides", "conference talk", "presentation slides", "生成slides", "写演讲稿", or wants beamer slides for a conference talk.

wanshuiyin/Auto-claude-code-research-in-sleep · 81 tokens

paper-talk

End-to-end conference talk pipeline: paper → slide outline → Beamer + PPTX → per-page polish → assurance checks (claim / citation / anonymity) → final export and report. Default-good for academic conference talks (NeurIPS / ICML / ICLR / VALSE / 投稿 talks). Trigger phrases: "做 talk", "做 PPT 全流程", "talk pipeline"…

wanshuiyin/Auto-claude-code-research-in-sleep · 113 tokens