skills/paper-code-audit/SKILL.md
Perform three-way cross-validation of a research paper by comparing the original paper text (via Zotero), official code implementation (via Git), and personal Obsidian notes. Use this skill whenever the user wants to "audit a paper", "verify paper claims against code", "cross-check notes with implementation", "triangulate paper + code + notes", "find discrepancies between paper and code", or mentions wanting a deep, structured comparison of a paper's claims against its implementation and their own notes. Also trigger when the user asks to "analyze this paper thoroughly" with code available, or when they want to systematically reconcile what the paper says, what the code does, and what their notes claim.
npx skillsauth add jaimeparker/stable-jarvis paper-code-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
对一篇研究论文进行系统性三方对比:论文原文(Zotero 全文 + annotations)→ 官方代码(Git clone 到本地精读)→ 个人笔记(Obsidian 已有笔记),找出所有偏差并输出结构化分析报告到 Obsidian。
此 skill 需要以下 MCP 工具可用:
mcp__zotero-mcp__* — Zotero 文献库访问(搜索、全文提取、annotations)mcp__obsidian__* — Obsidian vault 笔记读写Phase 1: Source Acquisition
├── Zotero: search by title → get full text + annotations
├── Obsidian: search by paper title/keywords → read existing notes
└── Git: clone repo to reference/<repo-name>/
Phase 2: Deep Reading
├── Read all source files in the repo
├── Read config files and hyperparameters
├── Read paper full text (algorithms, equations, implementation details)
└── Read Obsidian notes in full
Phase 3: Cross-Comparison (see detailed checklist below)
Phase 4: Documentation
├── Write discrepancy note to Obsidian (same dir as existing notes)
└── Update relevant MOC(s) with link to new note
通过论文标题在 Zotero 中搜索:
mcp__zotero-mcp__search_library(title="<exact paper title>", includeAttachments="true")
获取到 item key 后,并行拉取三个信息源:
mcp__zotero-mcp__get_content(itemKey="<key>", mode="complete", format="text")mcp__zotero-mcp__get_item_abstract(itemKey="<key>")mcp__zotero-mcp__get_annotations(itemKey="<key>")Zotero 连接可能不稳定。若 get_content 返回 socket closed,先尝试 fulltext_database(action="get", itemKeys=["<key>"]) 从缓存读取。若仍失败,降级使用 abstract + annotations。
全文文本量大时(>25K tokens),用 Python 脚本按关键词分段提取:
python3 -c "
import json
with open('<cached-fulltext.json>', encoding='utf-8') as f:
text = json.load(f)[0]['text']
# Extract sections around keywords
for kw in ['Algorithm', 'loss', 'hyperparam', 'Implementation', 'horizon']:
idx = text.lower().find(kw.lower())
if idx >= 0:
print(text[max(0,idx-80):idx+800])
print('---')
"
mcp__obsidian__search_notes(query="<paper title keywords>", limit=5, searchContent=true)
找到笔记路径后读取全文:
mcp__obsidian__read_note(path="<note-path>")
若笔记关联了 MOC(通过 search_notes 结果的 excerpt 或 MOC 文件名判断),记录 MOC 路径供后续更新。
从论文中获取 GitHub URL(通常在 abstract 末尾或 footnote 中),Clone 到 reference 目录:
mkdir -p D:/Projects/reference && cd D:/Projects/reference && git clone <repo-url> <repo-name>
若论文未直接提供 URL,从 Zotero notes/comments 中搜索(annotations 中常见 Code: https://github.com/...)。
按以下优先级读取所有源文件:
train.py, main.py, run.pyalgorithm/<name>.py, agent.py, model.pyhelper.py, utils.py, networks.pyconfig.yaml, cfgs/default.yaml, cfgs/**/*.yamlenv.py, environment.py重点关注以下章节:
完整阅读 Obsidian 笔记,提取:
按此清单逐项对比,每项标注 一致 / 偏差 / 代码未实现 / 笔记有误:
| # | 检查项 | 论文 | 代码 | 笔记 | |---|--------|------|------|------| | A1 | Encoder 结构 (layers, dims, activations) | | | | | A2 | Dynamics/Transition model | | | | | A3 | Reward predictor | | | | | A4 | Value/Critic network(s) | | | | | A5 | Policy/Actor network | | | | | A6 | Target network 更新机制 | | | |
| # | 检查项 | 论文值 | 代码值 | 笔记值 | |---|--------|--------|--------|--------| | H1 | Learning rate | | | | | H2 | Batch size | | | | | H3 | Discount factor γ | | | | | H4 | Planning/rollout horizon | | | | | H5 | Loss coefficients | | | | | H6 | Network dimensions | | | | | H7 | EMA τ / update frequency | | | | | H8 | Exploration parameters | | | | | H9 | Gradient clip norm | | | |
| # | 检查项 | 论文公式 | 代码实现 | 笔记描述 | |---|--------|---------|---------|---------| | L1 | Reward loss 形式 | | | | | L2 | Value/TD loss 形式 | | | | | L3 | Consistency/regularization loss | | | | | L4 | Policy/Actor loss | | | | | L5 | 额外 loss terms | | | |
| # | 检查项 | 论文 | 代码 | 笔记 | |---|--------|------|------|------| | F1 | Planning 流程 (采样→rollout→打分→更新) | | | | | F2 | Training 流程 (采样→encode→unroll→loss→backprop) | | | | | F3 | 数据流 (buffer 采样方式、序列长度) | | | | | F4 | Exploration 策略 | | | | | F5 | Warm-start / momentum 细节 | | | |
| # | 检查项 | 代码实际 | 笔记是否覆盖 | |---|--------|---------|-------------| | E1 | Loss clamping / gradient protection | | | | E2 | Device placement (GPU/CPU buffer) | | | | E3 | Frame stacking / preprocessing | | | | E4 | Action repeat / episode length 计算 | | | | E5 | Per-task config overrides | | |
在 Obsidian 中已有笔记的同目录下创建新笔记,命名格式:<PaperName> Code vs Note 偏差分析.md
报告结构:
# <PaperName> Code vs Note 偏差分析
对比对象:
- **论文**: <citation>
- **官方代码**: <repo-url> (reference/<repo-name>/)
- **已有笔记**: [[<existing-note>]]
总体结论:<一句话总结一致性>
---
## 1. <偏差类别 1>
**笔记说法**:...
**代码实际**:...
**结论**:...
---
## 2. <偏差类别 2>
...
---
## 总结
| 偏差类型 | 严重程度 | 说明 |
|----------|---------|------|
| ... | 高/中/低 | ... |
严重程度判断标准:
在相关 MOC 中将新笔记添加为已有论文笔记的子链接:
mcp__obsidian__patch_note(
path="<MOC-path>",
oldString="- [[<existing-note>]] <原有描述>",
newString="- [[<existing-note>]] <原有描述>\n\t- [[<new-note>]] 代码、论文、笔记的三方对比与偏差记录"
)
若原笔记隶属多个 MOC,选择最相关的(通常是与论文领域直接对应的 MOC 章节)。
| 场景 | 处理方式 | |------|---------| | Zotero 全文获取失败 | 使用 abstract + annotations + fulltext_database cache | | 论文无公开代码 | 跳过 Phase 2.1 代码部分,仅做论文 vs 笔记对比,报告中注明 | | Obsidian 无相关笔记 | 跳过笔记对比,仅做论文 vs 代码对比 | | Git clone 失败 (SSH/网络) | 尝试 https URL 替代 git@ URL | | 代码语言非 Python | 仍按 Phase 2 流程推进,可能需关注不同文件约定 | | MOC 结构不明确 | 将新笔记放在原笔记同目录,用户手动链接 |
development
# Mao Semantic Search Search Mao Zedong Selected Works by conceptual meaning using vector embeddings. Builds a local embedding index over all 230 articles across 5 volumes, then performs cosine similarity search at query time. ## When to Use - User asks a thematic/conceptual question about Mao's works ("What did Mao say about guerrilla warfare?") - Keyword search over the .md files is insufficient - User wants to find passages related to a concept without knowing exact terminology - As a pre-
development
Use when a researcher is choosing, framing, refining, or stress-testing a research question, hypothesis, thesis topic, project idea, grant direction, paper angle, or stalled research direction.
research
精读文献。快速泛读请用paper-quick-read。
data-ai
泛读:快速概览Zotero库中的文献,单轮LLM生成摘要级Markdown报告,并上传为Zotero Note。深度精读请用paper-deep-reader。