Skip to content
Back to skills

Paper To Code

ASecurity

Convert an ML research paper into a complete, runnable code repository. 3-stage pipeline from Paper2Code — Planning (UML + dependency graph) → Analysis (per-file logic) → Coding (dependency-ordered generation). Use for reproducing paper methods.

  • 9 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added September 2, 2026
ai-agentsgodebugging

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 2, 2026

npx -y skills add sergeeey/Claude-cod-top-2026 --skill paper-to-code --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Paper To Code?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Paper To Code
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/sergeeey-paper-to-code/badge)](https://www.skillsdirectory.com/skills/sergeeey-paper-to-code)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: paper-to-code
description: Convert an ML research paper into a complete, runnable code repository. 3-stage pipeline from Paper2Code — Planning (UML + dependency graph) → Analysis (per-file logic) → Coding (dependency-ordered generation). Use for reproducing paper methods.
Triggers: /paper-to-code, paper reproduction, воспроизведение статьи, implement paper, ML paper code.
argument-hint: [paper-pdf-or-text]
---

# Paper to Code

Convert a research paper into a complete, runnable code repository.

## Input

- `$0` — Paper PDF path, paper text, or paper URL

## References

- Paper2Code prompts (planning, analysis, coding stages): `~/.claude/skills/paper-to-code/references/paper-to-code-prompts.md`

## Workflow (from Paper2Code)

### Stage 1: Planning
Four-turn conversation to create a comprehensive plan:

1. **Overall Plan**: Extract methodology, experiments, datasets, hyperparameters, evaluation metrics
2. **Architecture Design**: Generate file list, Mermaid classDiagram, sequenceDiagram
3. **Task Breakdown**: Logic analysis per file, dependency-ordered task list, required packages
4. **Configuration**: Extract training details into `config.yaml`

### Stage 2: Analysis
For each file in the task list (dependency order):
1. Conduct detailed logic analysis
2. Map paper methodology to code structure
3. Reference the config.yaml for all settings
4. Follow the UML class diagram interfaces strictly

### Stage 3: Coding
For each file in dependency order:
1. Generate code with access to all previously generated files
2. Follow the design's data structures and interfaces exactly
3. Reference config.yaml — never fabricate configuration values
4. Write complete code — no TODOs or placeholders

### Stage 4: Debugging (if needed)
If execution fails:
1. Collect error messages
2. Identify root cause using SEARCH/REPLACE diff format
3. Apply minimal fixes preserving original intent
4. Re-run until successful

## Output Structure

```
reproduced_code/
├── config.yaml        # Training configuration
├── main.py            # Entry point
├── model.py           # Model architecture
├── dataset_loader.py  # Data loading
├── trainer.py         # Training loop
├── evaluation.py      # Metrics and evaluation
├── reproduce.sh       # Run script
└── requirements.txt   # Dependencies
```

## Key Constraints

- **Dependency order**: Each file is generated with access to all previously generated files
- **Interface contracts**: Mermaid diagrams serve as rigid interface definitions across all stages
- **No fabrication**: Only use configurations explicitly stated in the paper
- **Complete code**: Every function must be fully implemented

## Rules

- Follow the paper's methodology exactly — do not invent improvements
- Generate code in dependency order (data loading → model → training → evaluation → main)
- Use config.yaml for all hyperparameters and settings
- Every class/method in UML diagram must exist in code
- Generate a reproduce.sh script for one-command execution
- If paper details are ambiguous, note them explicitly

## Related Skills
- Downstream: [experiment-code](../experiment-code/)
- See also: [code-debugging](../code-debugging/), [algorithm-design](../algorithm-design/)

Files in this skill

  • SKILL.md3.2 KB
  • plugin.json390 B
  • references/paper-to-code-prompts.md8.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.