paper2code — Arxiv Paper to Working Implementation
Skill by ara.so — Daily 2026 Skills collection.
paper2code is a Claude Code agent skill that converts any arxiv paper URL into a citation-anchored Python implementation. Every code decision references the exact paper section and equation it implements, and all gaps/ambiguities are explicitly flagged rather than silently filled in.
Install
During install you'll choose:
- Agents: which coding agents get the skill (e.g., Claude Code)
- Scope: Global (recommended) or project-level
- Method: Symlink (recommended) or copy
Then launch your agent:
Core Commands
Basic usage
With framework override
With mode flag
Bare arxiv ID (no URL required)
Output Structure
Every run produces a directory named after the paper slug:
Citation Anchoring Convention
The core value of paper2code is traceability. Every non-trivial decision is tagged:
Example — model.py with citation anchors
Example — configs/base.yaml with citations
Example — REPRODUCTION_NOTES.md structure
What paper2code Will NOT Do
Understanding limits prevents wasted debugging time:
- Won't guarantee correctness — matches what the paper describes; if the paper is wrong, the code is wrong
- Won't invent details silently — gaps are always
[UNSPECIFIED], never filled confidently - Won't download datasets —
data.pygives aDatasetskeleton with instructions - Won't set up training infrastructure — no distributed training, no experiment tracking
- Won't implement baselines — only the paper's core contribution
- Won't reimplement standard components — imports them or notes the dependency
Common Patterns
Pattern 1 — Implement a new architecture paper
Focus: src/model.py will contain the full architecture. Review REPRODUCTION_NOTES.md to understand every ambiguous choice before running.
Pattern 2 — Reproduce a training method
Focus: src/train.py will contain the full training loop. configs/base.yaml will list every hyperparameter with paper citations.
Pattern 3 — Educational deep-dive
Focus: notebooks/walkthrough.ipynb walks through each paper section, shows corresponding code, and runs CPU-safe shape checks.
Pattern 4 — Quick architecture prototype
Then inspect and run:
Troubleshooting
Skill not triggering
- Confirm install completed:
npx skills listshould showpaper2code-arxiv-implementation - Use the explicit trigger:
/paper2code <url> - Try bare arxiv ID format:
/paper2code 1706.03762
Generated code has import errors
- Run
pip install -r requirements.txtfirst - Check
REPRODUCTION_NOTES.mdfor noted dependencies - Standard components (e.g., HuggingFace transformers) are imported, not reimplemented — install them separately
"Paper not found" or fetch errors
- Confirm the arxiv ID exists:
https://arxiv.org/abs/<ID> - Try the full URL instead of bare ID
- Some very new papers (hours old) may not be indexed yet
Silent assumptions in generated code
- This should not happen by design — if you find one, it's a bug
- Check
REPRODUCTION_NOTES.mdfirst; the assumption may be documented there - Report via the repo issues if a gap was genuinely filled silently
Framework-specific issues
- Default framework is PyTorch — omitting
--frameworkgives PyTorch output - JAX output requires
jax,flax,optax— listed inrequirements.txt - TensorFlow output requires
tensorflow>=2.x
Contributing
Add a worked example
- Run:
/paper2code https://arxiv.org/abs/XXXX.XXXXX - Save output to
skills/paper2code/worked/{paper_slug}/ - Write
review.mdevaluating correctness, flagged ambiguities, and any mistakes - Submit PR
Improve guardrails
Add patterns where the skill makes silent assumptions to guardrails/.
Add domain knowledge
Papers in your subfield reference common components? Add a knowledge file to knowledge/ (e.g., knowledge/graph_neural_networks.md).
Resources
- Repo: https://github.com/PrathamLearnsToCode/paper2code
- Worked examples:
skills/paper2code/worked/in the repo - Issues: https://github.com/PrathamLearnsToCode/paper2code/issues
- License: MIT


