[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-74257":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},74257,"paper2code","PrathamLearnsToCode\u002Fpaper2code","PrathamLearnsToCode","Agent skill to turn any arxiv paper into a working implementation","",null,"Python",1393,169,5,1,0,11,23,116,33,19.69,"MIT License",false,"main",true,[27,28,29],"agent","claude-code","skills","2026-06-12 02:03:24","# paper2code\n\n> **arxiv URL in → citation-anchored implementation out**\n\n```\n┌─────────────────────────────┐         ┌──────────────────────────────────────┐\n│                             │         │  {paper_slug}\u002F                       │\n│  \u002Fpaper2code                │         │  ├── README.md                       │\n│  https:\u002F\u002Farxiv.org\u002Fabs\u002F     │  ───▶   │  ├── REPRODUCTION_NOTES.md          │\n│  1706.03762                 │         │  ├── requirements.txt               │\n│                             │         │  ├── src\u002F                            │\n│                             │         │  │   ├── model.py     # §3.2 cited  │\n│                             │         │  │   ├── loss.py      # §3.4 cited  │\n│                             │         │  │   ├── train.py     # §4.1 cited  │\n│                             │         │  │   ├── data.py                    │\n│                             │         │  │   ├── evaluate.py                │\n│                             │         │  │   └── utils.py                   │\n│                             │         │  ├── configs\u002F                        │\n│                             │         │  │   └── base.yaml   # all params   │\n│                             │         │  └── notebooks\u002F                      │\n│                             │         │      └── walkthrough.ipynb           │\n└─────────────────────────────┘         └──────────────────────────────────────┘\n```\n\n*[placeholder: animated GIF showing the full pipeline — paper fetch → parsing → ambiguity audit → code generation → walkthrough notebook]*\n\n---\n\n## Why this exists\n\n**The problem:** ML papers are vague. Critical hyperparameters are buried in appendices or omitted entirely. Prose contradicts equations. \"Standard settings\" refers to nothing specific. When you implement a paper, you spend more time detective-working than coding.\n\n**What LLMs get wrong:** Naive code generation fills in every gap silently and confidently. You get something that runs but doesn't match the paper. Worse, you can't tell which parts are from the paper and which were invented by the model.\n\n**What paper2code does differently:**\n\n1. **Citation anchoring** — every line of generated code references the exact paper section and equation it implements (`§3.2, Eq. 4`)\n2. **Ambiguity auditing** — before writing a single line of code, every implementation choice is classified as `SPECIFIED`, `PARTIALLY_SPECIFIED`, or `UNSPECIFIED`\n3. **Honest uncertainty** — unspecified choices are flagged with `[UNSPECIFIED]` comments at the exact line where the choice is made, with common alternatives listed\n4. **Appendix mining** — appendices, footnotes, and figure captions are treated as first-class sources, not ignored\n\nThe result: code you can trust because you can verify every decision against the paper.\n\n---\n\n## Install\n\n```bash\nnpx skills add PrathamLearnsToCode\u002Fpaper2code\u002Fskills\u002Fpaper2code\n```\n\nYou'll be prompted to:\n1. **Select agents** — pick the coding agents you want to use this skill with (e.g., Claude Code)\n2. **Choose scope** — Global (recommended) or project-level\n3. **Choose method** — Symlink (recommended) or copy\n\nOnce installed, open your agent and run the skill:\n\n```bash\nclaude  # or your preferred agent\n```\n\n---\n\n## Usage\n\n### Basic — generate a minimal implementation\n\n```\n\u002Fpaper2code https:\u002F\u002Farxiv.org\u002Fabs\u002F1706.03762\n```\n\n### Specify framework\n\n```\n\u002Fpaper2code https:\u002F\u002Farxiv.org\u002Fabs\u002F2006.11239 --framework jax\n```\n\n### Full mode — includes training loop and data pipeline\n\n```\n\u002Fpaper2code 2106.09685 --mode full\n```\n\n### Educational mode — extra comments and pedagogical notebook\n\n```\n\u002Fpaper2code https:\u002F\u002Farxiv.org\u002Fabs\u002F2010.11929 --mode educational\n```\n\n### Using bare arxiv ID\n\n```\n\u002Fpaper2code 1706.03762\n```\n\n---\n\n## What you get\n\n```\nattention_is_all_you_need\u002F\n├── README.md                    # Paper summary, contribution statement, quick-start\n├── REPRODUCTION_NOTES.md        # Ambiguity audit, unspecified choices, known deviations\n├── requirements.txt             # Pinned dependencies\n├── src\u002F\n│   ├── model.py                 # Architecture — every layer cited to paper section\n│   ├── loss.py                  # Loss functions with equation references\n│   ├── data.py                  # Dataset class skeleton with preprocessing TODOs\n│   ├── train.py                 # Training loop (if in scope)\n│   ├── evaluate.py              # Metric computation code\n│   └── utils.py                 # Shared utilities (masking, positional encoding, etc.)\n├── configs\u002F\n│   └── base.yaml                # All hyperparams — each one cited or flagged [UNSPECIFIED]\n└── notebooks\u002F\n    └── walkthrough.ipynb        # Pedagogical notebook linking paper sections → code → sanity checks\n```\n\n### Key files explained\n\n| File | Purpose |\n|------|---------|\n| `model.py` | Architecture only. Each class maps to a paper section. Variable names match paper notation. |\n| `REPRODUCTION_NOTES.md` | The ambiguity audit. Lists every choice, whether the paper specified it, and what alternatives exist. |\n| `base.yaml` | Single source of truth for all hyperparameters. |\n| `walkthrough.ipynb` | Runnable on CPU with toy dimensions. Quotes paper passages, shows corresponding code, runs shape checks. |\n\n---\n\n## What this skill will NOT do\n\n- **Won't guarantee correctness.** The implementation matches what the paper describes. If the paper is wrong, the code is wrong. If the paper is vague, the code flags it.\n- **Won't invent details.** If the paper doesn't specify a hyperparameter, the code uses a common default and marks it `[UNSPECIFIED]`. It will never silently fill in gaps.\n- **Won't download datasets.** The `data.py` provides a `Dataset` class skeleton with clear instructions on where to get the data and how to preprocess it.\n- **Won't set up training infrastructure.** No distributed training, no experiment tracking, no checkpointing beyond what the paper's contribution requires.\n- **Won't implement baselines.** Only the core contribution of the paper is implemented.\n- **Won't reimplement standard components.** If the paper says \"standard transformer encoder,\" the code imports it or notes the dependency — it doesn't reimplement attention from scratch.\n\n---\n\n## Design principles\n\n### Citation anchoring convention\n\nEvery non-trivial code decision is anchored to the paper:\n\n```python\n# §3.2 — \"We apply layer normalization before each sub-layer\" (Pre-LN variant)\nclass TransformerBlock(nn.Module):\n    def forward(self, x):\n        # §3.2, Eq. 2 — attention_weights = softmax(QK^T \u002F sqrt(d_k))\n        attn_out = self.attention(self.norm1(x))  # (batch, seq_len, d_model)\n        x = x + attn_out  # §3.2 — residual connection\n```\n\n### The UNSPECIFIED flag system\n\n```python\n# [UNSPECIFIED] Paper does not state epsilon for LayerNorm — using 1e-6 (common default)\n# Alternatives: 1e-5 (PyTorch default), 1e-8 (some implementations)\nself.norm = nn.LayerNorm(d_model, eps=1e-6)\n```\n\n```python\n# [ASSUMPTION] Using pre-norm based on \"we found pre-norm more stable\" in §4.1\n# The paper uses post-norm in Figure 1 but pre-norm in experiments — ambiguous\n```\n\n### Ambiguity classification\n\n| Tag | Meaning |\n|-----|---------|\n| `§X.Y` | Directly specified in paper section X.Y |\n| `§X.Y, Eq. N` | Implements equation N from section X.Y |\n| `[UNSPECIFIED]` | Paper does not state this — our choice with alternatives listed |\n| `[PARTIALLY_SPECIFIED]` | Paper mentions this but is ambiguous — quote included |\n| `[ASSUMPTION]` | Reasonable inference from paper context — reasoning explained |\n| `[FROM_OFFICIAL_CODE]` | Taken from the authors' official implementation |\n\n---\n\n## Contributing\n\n### Adding worked examples\n\nWorked examples are the most trust-building part of this project. To add one:\n\n1. Pick a well-known paper (people should be able to verify the output)\n2. Run the skill: `\u002Fpaper2code https:\u002F\u002Farxiv.org\u002Fabs\u002FXXXX.XXXXX`\n3. Save the full output to `skills\u002Fpaper2code\u002Fworked\u002F{paper_slug}\u002F`\n4. Write a `review.md` that honestly evaluates:\n   - What the skill got right\n   - What it correctly flagged as unspecified\n   - Any mistakes it made\n   - Any edge cases it handled well or poorly\n5. Submit a PR with all of the above\n\n### Improving guardrails\n\nIf you find a pattern where the skill hallucinates or makes a silent assumption, add it to the appropriate file in `guardrails\u002F`.\n\n### Adding domain knowledge\n\nIf papers in your subfield consistently reference components that the skill doesn't know about (e.g., graph neural network primitives, RL components), add a knowledge file in `knowledge\u002F`.\n\n---\n\n## Worked examples\n\nThis repo includes fully worked examples to demonstrate output quality:\n\n| Paper | Type | Command |\n|-------|------|---------|\n| Attention Is All You Need (1706.03762) | Architecture | `\u002Fpaper2code https:\u002F\u002Farxiv.org\u002Fabs\u002F1706.03762` |\n| DDPM (2006.11239) | Training method | `\u002Fpaper2code https:\u002F\u002Farxiv.org\u002Fabs\u002F2006.11239` |\n\nEach includes the complete generated output plus an honest `review.md` evaluating what the skill got right and wrong.\n\n---\n","paper2code 是一个将 arXiv 论文转换为可运行代码实现的工具。其核心功能包括引用锚定、模糊性审计、诚实不确定性标记以及附录挖掘，确保生成的每一行代码都能追溯到论文的具体章节和公式，并明确指出哪些部分是明确指定、部分指定或未指定的。这种设计使得用户能够轻松验证代码与论文的一致性。该项目适合需要从学术论文中快速实现算法或模型的研究人员和开发者使用，尤其在机器学习领域，能够显著减少因论文描述不清晰而导致的实现难度。",2,"2026-06-11 03:49:41","high_star"]