paper-to-code — Claude Code skill: what it does, how to install
Turns an ML research paper into a runnable code repository. Useful when reproducing published experiments and models without manual scaffolding.
npx skills add lingzhi227/agent-research-skills --skill paper-to-code -a claude-codeWhat paper-to-code does
The skill implements the Paper2Code pipeline to reconstruct ML projects through planning, per-file analysis, and dependency-ordered coding. During the planning turn, the agent extracts methodology and training details into config.yaml, then sets up Mermaid diagrams. These diagrams act as strict interface contracts across every subsequent step.
Generation follows a strict order, starting with dataset_loader.py and proceeding to model.py, trainer.py, evaluation.py, and main.py. It produces a complete implementation with zero placeholders or fabricated hyperparameter values. If execution fails, an iterative debugging step applies SEARCH/REPLACE diffs until the code runs cleanly.
It requires a PDF path, raw paper text, or URL as input. Any ambiguity in the published methodology is flagged explicitly instead of being masked by improvised code fixes.
What it helps with
- extract architecture and hyperparameters from an ML paper
- generate class and sequence diagrams from research text
- build a complete runnable repository in dependency order
- fix runtime errors using minimal diff replacements
Example prompts for the agent
- Reproduce the methodology from paper.pdf into a runnable project
- Extract the model architecture and training configuration from paper.txt
- Generate reproduced code and a reproduce.sh script from the research paper
How to install paper-to-code
1Skills CLI (Vercel)
npx skills add lingzhi227/agent-research-skills --skill paper-to-code -a claude-code2Manually: put the files in place
~/.claude/skills/paper-to-code/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/paper-to-code/
1Skills CLI (Vercel)
npx skills add lingzhi227/agent-research-skills --skill paper-to-code -a codex2Manually: put the files in place
.agents/skills/paper-to-code/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add lingzhi227/agent-research-skills --skill paper-to-code -a cursor2Manually: put the files in place
.cursor/skills/paper-to-code/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install lingzhi227/agent-research-skills paper-to-code2Manually: put the files in place
.github/skills/paper-to-code/SKILL.md1Skills CLI (Vercel)
npx skills add lingzhi227/agent-research-skills --skill paper-to-code -a gemini-cli2Platform CLI
gemini skills install https://github.com/lingzhi227/agent-research-skills --path skills/paper-to-codeManually: put the files in place
.devin/skills/paper-to-code/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add lingzhi227/agent-research-skills --skill paper-to-code -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about paper-to-code
How to install paper-to-code in Claude Code?
Run npx skills add lingzhi227/agent-research-skills --skill paper-to-code -a claude-code in your terminal.
What files does paper-to-code generate?
It builds a reproduced_code directory containing config.yaml, dataset_loader.py, model.py, trainer.py, evaluation.py, main.py, requirements.txt, and reproduce.sh.
How does paper-to-code handle missing hyperparameter details?
The workflow forbids fabricating configuration values. If details are ambiguous in the text, the skill explicitly notes them instead of guessing.