learn-from-repo
用于深度理解研究型代码仓库的方法论 skill。当用户想要学习一个新的 ML/AI repo、理解其实现与论文的对应关系、或为后续修改做准备时使用。结合对话式学习风格,逐组件拆解模型实现。
npx skills add majiayu000/claude-skill-registry --skill learn-from-repo --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Learn From Repo & Paper 用于深度阅读研究型 repo 的完整方法论,核心是**代码-论文双向对应**,目标是理解到"可以修改"的程度。 --- ## 默认学习偏好(可按需调整) - **对话式推进**:不要一次输出所有内容,每个组件讲完后停下来,等用户确认或提问 - **零基础假设**:不跳过前置知识,包括引用论文中涉及的前序工作 - **Paper-Code 对应**:每个模块标注对应的论文章节/公式 - **穿插方法论**:在讲具体代码时,穿插"如何读 repo"的通用技巧 - **格式偏好**:表格、ASCII 图、代码块,结构清晰 - **代码定位**:讲解每个概念时,明确标注对应的文件路径和行号(如 `model.py:48-80`),让用户能直接跳转查看 - **每节结尾**:提示"下一步可以看什么",引导对话继续 > 如有不同偏好,在激活 skill 时告知即可(如"不用对话式,直接给完整讲解")。 --- ## Phase 0:激活前准备 在开始讲解前,先完成以下两项: ### 0a. 用 claude-paper:study 处理论文 如果用户提供了论文 PDF 或 arXiv 链接,先调用: /claude-paper:study <paper_url_or_path> 这会生成结构化学习材料,后续讲解可引用。 ### 0b. 快速扫描 repo 骨架 ```bash # 查看文件树(2层) find . -maxdepth 2 -not -path '*/.git/*' | sort | head -60 # 统计核心文件大小(找"重心"文件) wc -l **/*.py 2>/dev/null | sort -rn | head -20 # 看 git log,了解开发脉络 git log --oneline -20 ``` 目的:30秒内找到核心文件,不要盲目遍历。 --- ## Phase 1:四步阅读法(每个 Repo 通用) ``` Step 1: 看骨架(文件树) 问:核心文件是哪个?依赖什么外部库? ↓ Step 2: 找入口(forward / main / __call__) 问:数据从哪里进来,从哪里出去? ↓ Step 3: 识别核心数据结构 问:数据长什么样?有哪些字段?如何在模块间传递? ↓ Step 4: 逐组件拆解 问:每个模块的输入、处理、输出是什么?对应论文哪里? ``` 核心原则:先看"数据流",再看"算法"。搞清楚数据格式,代码自然就懂了。 --- ## Phase 2:逐组件讲解模板 对每个核心组件,按以下结构讲解: 1. 动机(为什么需要这个组件?解决什么问题?) → 对应论文:Sec X.X / Figure X 2. 接口(输入输出是什么?) → 输入:shape
- 默认学习偏好(可按需调整)
- Phase 0:激活前准备
- 0a. 用 claude-paper:study 处理论文
- 0b. 快速扫描 repo 骨架
- Phase 1:四步阅读法(每个 Repo 通用)
- Phase 2:逐组件讲解模板
- Phase 3:Paper-Code 对应检查表
- Phase 4:为"可修改"做准备
- Phase 5:对话式 Deep Dive
- 通用读代码技巧
find . -maxdepth 2 -not -path '*/.git/*' | sort | head -60 wc -l **/*.py 2>/dev/null | sort -rn | head -20 git log --oneline -20
What does the learn-from-repo skill do?
用于深度理解研究型代码仓库的方法论 skill。当用户想要学习一个新的 ML/AI repo、理解其实现与论文的对应关系、或为后续修改做准备时使用。结合对话式学习风格,逐组件拆解模型实现。
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill learn-from-repo --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
