Przejdź do treści
Biblioteka skilli
Nauka i badania · Budowanie i kod

paper2code

/paper2code

Zamienia artykuł arXiv na minimalną implementację w Pythonie, z odniesieniami do tekstu i zaznaczeniem niejasności.

Repozytorium
paper2code ↗
Licencja
MIT
Ostatnia zmiana repozytorium
10.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
47
Skrypty
19
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 10.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co sprawdzić przed instalacją
  • 19 skryptów w paczce. Przejrzyj je przed instalacją, bo Claude może je uruchomić.

Skrypty: scaffolds/data_template.py, scaffolds/evaluate_template.py, scaffolds/loss_template.py, scaffolds/model_template.py, scaffolds/train_template.py, scripts/extract_structure.py, scripts/fetch_paper.py, worked/attention_is_all_you_need/src/data.py, worked/attention_is_all_you_need/src/evaluate.py, worked/attention_is_all_you_need/src/loss.py, worked/attention_is_all_you_need/src/model.py, worked/atte

Co robi i kiedy

Zamienia artykuł arXiv na minimalną implementację w Pythonie, z odniesieniami do tekstu i zaznaczeniem niejasności.

Wyzwalacze z opisu

implement this paper
Oryginalny opis (EN)

Converts an arxiv paper into a minimal, citation-anchored Python implementation. Trigger when user runs /paper2code with an arxiv URL or paper ID, says "implement this paper", or pastes an arxiv link asking for implementation. Flags all ambiguities honestly. Never invents implementation details not stated in the paper.

Jak działa

  1. Parse arguments
  2. Set up working directory
  3. Install dependencies
  4. Execute pipeline
  5. Cleanup
  6. Final output
  7. Mode-specific behavior
  8. Guardrails — always active
  9. Knowledge base — consult as needed
Sekcje z nagłówków SKILL.md, w oryginale · 109 linii, 618 słów
Podgląd SKILL.md
---
name: paper2code
description: Converts an arxiv paper into a minimal, citation-anchored Python implementation. Trigger when user runs /paper2code with an arxiv URL or paper ID, says "implement this paper", or pastes an arxiv link asking for implementation. Flags all ambiguities honestly. Never invents implementation details not stated in the paper.
---

# paper2code — Orchestration

You are executing the paper2code skill. This file governs the high-level flow. Each stage dispatches to a detailed reasoning protocol in `pipeline/`. Do NOT skip stages. Do NOT combine stages. Execute them in order.

## Parse arguments

Extract from the user's input:
- `ARXIV_ID`: the arxiv paper ID (e.g., `2106.09685`). Strip any URL prefix.
- `MODE`: one of `minimal` (default), `full`, `educational`.
- `FRAMEWORK`: one of `pytorch` (default), `jax`, `numpy`.

If the user provided a full URL like `https://arxiv.org/abs/2106.09685`, extract the ID `2106.09685`.
If the user provided a versioned ID like `2106.09685v2`, keep the version.

## Set up working directory

Create a temporary working directory: `.paper2code_work/{ARXIV_ID}/`
This is where intermediate artifacts go. The final output goes in the current directory under `{paper_slug}/`.

## Install dependencies

Run via Bash:
```bash
pip install pymupdf4llm pdfplumber requests pyyaml
```

## Execute pipeline

### Stage 1 — Paper Acquisition and Parsing
Read and follow: `pipeline/01_paper_acquisition.md`

Run the helper script to fetch and parse the paper:
```bash
python skills/paper2code/scripts/fetch_paper.py {ARXIV_ID} .paper2code_work/{ARXIV_ID}/
```
Then run structure extraction:
```bash
python skills/paper2code/scripts/extract_structure.py .paper2code_work/{ARXIV_ID}/paper_text.md .paper2code_work/{ARXIV_ID}/
```
Verify the outputs exist before proceeding. If extraction failed, follow the fallback protocol in `pipeline/01_paper_acquisition.md`.

The script also searches for official code repositories (in the paper text and on the arxiv page) and saves any found links to `paper_metadata.json` under the `official_code` key. Verify these links before relying on them — see Step 8 in `pipeline/01_paper_acquisition.md`.

### Stage 2 — Contribution Identification
Read and follow: `pipeline/02_contribution_identification.md`

Read the parsed paper sections. Identify the single core contribution. Classify the paper type. Write the contribution statement. Save it to `.paper2code_work/{ARXIV_ID}/contribution.md`.

### Stage 3 — Ambiguity Audit
Read and follow: `pipeline/03_ambiguity_audit.md`

Before reading this stage, also read: `guardrails/hallucination_prevention.md`

Go through every implementation-relevant detail. Classify each as SPECIFIED, PARTIALLY_SPECIFIED, or UNSPECIFIED. Save the audit to `.paper2code_work/{ARXIV_ID}/ambiguity_audit.md`.

### Stage 4 — Code Generation
Read and follow: `pipeline/04_code_generation.md`

Before writing code, read:
- `guardrails/scope_enforcement.md` — to determine what's in and out of scope
- `guardrails/badly_written_papers.md` — if the paper is vague or inconsistent
- The relevant knowledge files in `knowledge/` for the paper's domain
- The scaffold templates in `scaffolds/` for the expected file structure

Determine the `paper_slug` from the paper title (lowercase, underscores, no special chars).
Generate all files under `{paper_slug}/` in the current working directory.

### Stage 5 — Walkthrough Notebook
Read and follow: `pipeline/05_walkthrough_notebook.md`

Generate the walkthrough notebook that connects paper sections to code with runnable sanity checks. Save to `{paper_slug}/notebooks/walkthrough.ipynb`.

## Cleanup

Remove the `.paper2code_work/` directory after successful completion.

## Final output

Print a summary:
```
✓ paper2code complete for: {paper_title}
  Output directory: {paper_slug}/
  Files generated: {list of files}
  Unspecified choices: {count} (see REPRODUCTION_NOTES.md)
  Mode: {MODE} | Framework: {FRAMEWORK}
```

## Mode-specific behavior

- **minimal** (default): Core contribution only. Training loop only if contribution involves training. No data pipeline beyond Dataset skeleton.
- **full**: Core contribution + full training loop + data pipeline + evaluation pipeline. More code, same citation rigor.
- **educational**: Same as minimal but with extra inline comments explaining ML concepts, expanded walkthrough notebook with theory sections, and a `PAPER_GUIDE.md` that walks through the paper section by section.

## Guardrails — always active

These apply at ALL stages. Read them if you haven't already:
- `guardrails/hallucination_prevention.md` — the most important file in this skill
- `guardrails/scope_enforcement.md` — what to implement and what to skip
- `guardrails/badly_written_papers.md` — what to do when the paper is unclear

## Knowledge base — consult as needed

Before implementing any of these components, read the corresponding knowledge file:
- Transformer layers, attention, positional encoding → `knowledge/transformer_components.md`
- Optimizers, LR schedules, batch size semantics → `knowledge/training_recipes.md`
- Cross-entropy, contrastive loss, diffusion loss, ELBO → `knowledge/loss_functions.md`
- Framework-specific pitfalls, notation mismatches → `knowledge/paper_to_code_mistakes.md`
Pliki w paczce (47)
  • SKILL.md 5 KB
  • guardrails/badly_written_papers.md 9 KB
  • guardrails/hallucination_prevention.md 8 KB
  • guardrails/scope_enforcement.md 8 KB
  • knowledge/loss_functions.md 10 KB
  • knowledge/paper_to_code_mistakes.md 10 KB
  • knowledge/training_recipes.md 9 KB
  • knowledge/transformer_components.md 14 KB
  • pipeline/01_paper_acquisition.md 7 KB
  • pipeline/02_contribution_identification.md 8 KB
  • pipeline/03_ambiguity_audit.md 11 KB
  • pipeline/04_code_generation.md 11 KB
  • pipeline/05_walkthrough_notebook.md 7 KB
  • scaffolds/config_template.yaml 3 KB
  • scaffolds/data_template.py 3 KB
  • scaffolds/evaluate_template.py 2 KB
  • scaffolds/loss_template.py 1 KB
  • scaffolds/model_template.py 4 KB
  • scaffolds/readme_template.md 2 KB
  • scaffolds/reproduction_notes_template.md 4 KB
  • scaffolds/train_template.py 6 KB
  • scripts/extract_structure.py 11 KB
  • scripts/fetch_paper.py 15 KB
  • worked/attention_is_all_you_need/README.md 3 KB
  • worked/attention_is_all_you_need/REPRODUCTION_NOTES.md 6 KB
  • worked/attention_is_all_you_need/requirements.txt 1 KB
  • worked/attention_is_all_you_need/review.md 5 KB
  • worked/attention_is_all_you_need/configs/base.yaml 3 KB
  • worked/attention_is_all_you_need/notebooks/walkthrough.ipynb 27 KB
  • worked/attention_is_all_you_need/src/data.py 6 KB
  • worked/attention_is_all_you_need/src/evaluate.py 2 KB
  • worked/attention_is_all_you_need/src/loss.py 3 KB
  • worked/attention_is_all_you_need/src/model.py 23 KB
  • worked/attention_is_all_you_need/src/train.py 3 KB
  • worked/attention_is_all_you_need/src/utils.py 3 KB
  • worked/ddpm/README.md 3 KB
  • worked/ddpm/REPRODUCTION_NOTES.md 6 KB
  • worked/ddpm/requirements.txt 1 KB
  • worked/ddpm/review.md 4 KB
  • worked/ddpm/configs/base.yaml 4 KB
  • worked/ddpm/notebooks/walkthrough.ipynb 14 KB
  • worked/ddpm/src/data.py 3 KB
  • worked/ddpm/src/evaluate.py 8 KB
  • worked/ddpm/src/loss.py 2 KB
  • worked/ddpm/src/model.py 15 KB
  • worked/ddpm/src/train.py 6 KB
  • worked/ddpm/src/utils.py 8 KB

Wersje

W bazie nie ma innych skilli o nazwie paper2code.

Migawka bazy z 13.11.2026 · wersja paczki 0b4dcd5739bc (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 91read-arxiv-paper
    Czyta artykuł z arXiv na podstawie podanego adresu URL.
  • 100paper-to-runnable
    Przerabia artykuł na najmniejszą uczciwą implementację głównej idei, sprawdzoną testem i wykresami.
  • 100arxiv
    Wyszukuje, pobiera i streszcza prace naukowe z arXiv oraz zapisuje je w lokalnej bibliotece artykułów.
  • 100arxiv
    Wyszukuje, pobiera i streszcza prace naukowe z arXiv.
  • 100aris-arxiv
    Wyszukuje, pobiera i streszcza artykuły naukowe z arXiv i zapisuje je w lokalnej bibliotece prac.
  • 100arxiv
    Wyszukuje na arXiv artykuły i zapisuje ich pliki PDF lokalnie, gdy użytkownik chce znaleźć i zachować publikacje.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.