skills/67-econfin-workflow-toolkit/reference-verify/SKILL.md
Verify references in an academic paper: check whether each BibTeX entry is real, whether in-text citations match the cited paper's actual content, and produce a structured verification report. Use when user says "验证参考文献", "ref verify", "check references", "核实引用", "引用是否正确", or wants to audit citations in a LaTeX manuscript.
npx skillsauth add brycewang-stanford/Awesome-Agent-Skills-for-Empirical-Research reference-verifyInstall 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.
Verify references for: $ARGUMENTS
This skill performs a systematic audit of every reference cited in a LaTeX manuscript. For each citation it:
web — How to verify references. Options: web (WebSearch + WebFetch for each entry), dblp (DBLP API first, WebSearch fallback), manual (skip online verification, only check internal consistency).excel — Output format. Options: excel (default, .xlsx with conditional formatting), markdown, latex, all (all three)..tex file.zh — Report language. Options: zh (Chinese headers), en (English headers).true, flag any citation where the attributed claim cannot be confirmed from the paper's abstract/title as 未确认. When false, give benefit of the doubt for plausible matches.interactive — Whether to apply the suggested fixes after the report is generated. Options: interactive (default — show each proposed edit and ask user y/n/skip/edit), auto (apply every fix without asking; use only when user explicitly opts in), off (stop after the report; no edits to source files).The skill accepts one of:
.tex and .bib files (scans all .tex files for citations)..tex file (uses the \bibliography{} command to locate the .bib file)..bib file alone (verifies entries exist but cannot check in-text citation context).If no argument is provided, scan the current working directory.
.tex files in the target directory (or the single specified file)..bib file(s) referenced by \bibliography{} or \addbibresource{}..bib file to extract all BibTeX entries..tex files to extract all \cite{}, \citep{}, \citet{}, \citealt{}, \citealp{} commands.For each citation key found in the .tex files:
Produce an internal data structure:
[
{
"seq": 1,
"key": "baker2006investor",
"bib": { "author": "Baker, Malcolm and Wurgler, Jeffrey", "title": "Investor sentiment...", "journal": "Journal of Finance", "year": "2006" },
"occurrences": [
{ "file": "sections/1_introduction.tex", "line": 12, "context": "...investor sentiment predicts cross-sectional stock returns...", "claim": "investor sentiment predicts cross-sectional returns" }
]
},
...
]
For each BibTeX entry, perform verification in order:
Use this verification chain (stop at first success):
Method A: DBLP (if VERIFY_METHOD includes dblp)
# Search DBLP by title + first author
curl -s "https://dblp.org/search/publ/api?q=TITLE+FIRST_AUTHOR&format=json&h=3"
# If match found: VERIFIED
Method B: WebSearch
WebSearch: "EXACT_TITLE" author FIRST_AUTHOR_LASTNAME journal JOURNAL_NAME
Check the top 3 results. A paper is VERIFIED if:
A paper is UNVERIFIED if no matching result is found after both methods.
Method C: CrossRef DOI (if a DOI is in the bib entry)
WebFetch: https://doi.org/DOI
If the paper is verified, compare the BibTeX metadata against the verified source:
Flag any discrepancies.
For each occurrence of the citation in the manuscript:
Classification:
The default output is an Excel report (ref_verify_report.xlsx). Use Python + openpyxl to generate.
ref_verify_report.xlsx) — DEFAULTThe Excel workbook contains three sheets, structured as follows:
Sheet 1: 总览 (Overview)
| 项目 | 数值 | |------|------| | 论文标题 | [paper title] | | 验证日期 | [date] | | 验证方法 | [web/dblp/manual] | | 总引用数 | X | | 验证通过 | Y | | 存疑 | Z | | 不存在 | W | | 未引用条目 | U |
Sheet 2: 已验证文献 (Verified References)
This sheet covers references that can be found online. Focus is on citation–claim support analysis.
| 列 | 说明 | |----|------| | 序号 | 按文中首次出现顺序 | | 参考文献 | 作者 (年份), 期刊缩写 | | BibTeX Key | cite key | | 文中引用位置 | 文件名:行号,多处用分号分隔 | | 引用观点 | 作者在引用处表达的核心观点(≤30字) | | 支撑判定 | 支撑 / 部分支撑 / 不支撑 / 未确认 | | 支撑分析 | 详细说明:原文实际说了什么 vs 引用处声称了什么,差异在哪 | | 元数据问题 | 年份、期刊名、作者拼写等元数据错误(无则留空) | | 修改建议 | 针对不支撑/部分支撑/元数据错误的具体修改建议 |
Conditional formatting for this sheet:
#C6EFCE)#FFEB9C)#FFC7CE)#D9D9D9)Sheet 3: 问题文献 (Problematic References)
This sheet covers references that cannot be found or have serious issues. Each entry gets a detailed problem diagnosis.
| 列 | 说明 | |----|------| | 序号 | 按文中首次出现顺序 | | 参考文献 | BibTeX 中的作者 (年份), 期刊 | | BibTeX Key | cite key | | 文中引用位置 | 文件名:行号 | | 引用观点 | 作者在引用处表达的核心观点 | | 问题类型 | 见下方分类 | | 问题详情 | 详细描述搜索过程和发现 | | 可能原因 | 分析此条目出问题的原因 | | 修改建议 | 具体修改方案(替换文献/修正信息/删除引用) | | 严重程度 | 🔴 高 / 🟡 中 / 🟢 低 |
问题类型分类 (fill in "问题类型" column):
Conditional formatting for this sheet:
#FFC7CE), bold font#FFD9B3)#BDD7EE)Use this Python pattern via Bash to generate the xlsx:
import openpyxl
from openpyxl.styles import Font, PatternFill, Alignment, Border, Side
from openpyxl.utils import get_column_letter
wb = openpyxl.Workbook()
# --- Sheet 1: Overview ---
ws1 = wb.active
ws1.title = "总览"
# Write overview stats...
# --- Sheet 2: Verified References ---
ws2 = wb.create_sheet("已验证文献")
headers2 = ["序号", "参考文献", "BibTeX Key", "文中引用位置", "引用观点",
"支撑判定", "支撑分析", "元数据问题", "修改建议"]
# Write headers with bold + background
# Write rows, apply conditional fill per 支撑判定 value
# Auto-adjust column widths
# --- Sheet 3: Problematic References ---
ws3 = wb.create_sheet("问题文献")
headers3 = ["序号", "参考文献", "BibTeX Key", "文中引用位置", "引用观点",
"问题类型", "问题详情", "可能原因", "修改建议", "严重程度"]
# Write headers, rows, apply severity-based fills
# Auto-adjust column widths
# Global styling
for ws in [ws1, ws2, ws3]:
ws.sheet_properties.pageSetUpPr = openpyxl.worksheet.properties.PageSetupProperties(fitToPage=True)
ws.freeze_panes = "A2" # Freeze header row
wb.save("OUTPUT_DIR/ref_verify_report.xlsx")
Important: Before running, ensure openpyxl is installed: pip install openpyxl
ref_verify_report.md) — only when OUTPUT_FORMAT includes markdown or all# 参考文献验证报告
**论文**: [paper title]
**验证日期**: [date]
**验证方法**: [web/dblp/manual]
**总引用数**: X | **验证通过**: Y | **存疑**: Z | **不存在**: W
## 一、已验证文献
| 序号 | 参考文献 | 文中引用位置 | 引用观点 | 支撑判定 | 支撑分析 | 修改建议 |
|------|----------|-------------|----------|----------|----------|----------|
| 1 | Baker and Wurgler (2006), JF | 1_intro.tex:L12 | investor sentiment predicts returns | ✅ 支撑 | 与原文主要发现一致 | — |
## 二、问题文献
| 序号 | 参考文献 | 问题类型 | 问题详情 | 可能原因 | 修改建议 | 严重程度 |
|------|----------|----------|----------|----------|----------|----------|
| 5 | Smith (2020), AER | 论文不存在 | 搜索Google Scholar/DBLP均无结果 | 可能为AI生成的虚构文献 | 删除该引用或替换为... | 🔴 高 |
## 三、未引用条目
...
## 四、总结与建议
...
ref_verify_report.tex) — only when OUTPUT_FORMAT includes latex or allGenerate a LaTeX longtable with the same two-section structure (已验证 + 问题文献).
After the table, provide:
The verification report is only useful if its "修改建议" column actually reaches the source files. Step 6 walks every actionable suggestion back into the .tex and .bib files. Skip this step only when APPLY_FIXES = off.
Why this matters. Authors typically have 30–100 citations. Hand-applying every suggested fix from the report is tedious and error-prone — they will silently skip the "small" ones (a wrong year, an orphan entry) and the manuscript ships with the same defects. Closing the loop here is the difference between a report and a real audit.
Re-use the in-memory verification data from Steps 2–3 — do not re-parse the xlsx. Build an ordered queue of rows that need action:
支撑判定 = 部分支撑 — the claim is overstated, narrowed, or reframed.Rows where 支撑判定 ∈ {支撑, 未确认} are not in the queue. 不支撑 rows belong on Sheet 3 already (move them there if the report put them on Sheet 2). Process the queue in 序号 order so the user sees fixes flow in the same order as the manuscript.
The "修改建议" column says what to do at the policy level (e.g. "替换为 Baker and Wurgler (2007)"). Step 6 turns it into an exact diff. Map by category:
| 类别 | 处理方式 | 改哪里 |
|------|----------|--------|
| 部分支撑 (Sheet 2) | 重写引用所在句子,使陈述与原文实际结论一致;或替换为更贴切的 cite key | .tex |
| 不支撑 | 同上,或删除该引用 | .tex (+ .bib if cite key is also dropped) |
| 论文不存在 | 优先按"修改建议"中提名的替代文献替换;若无替代,则删除该引用并重写句子使其独立成立 | .bib (新增/删除) + .tex (替换 key 或重写句) |
| 作者不匹配 / 期刊年份不匹配 / 标题错误 | 修正 BibTeX 字段(author / journal / year / title / volume / pages) | .bib |
| 疑似混淆 | 替换为正确论文的 cite key,必要时新增 bib 条目 | .bib + .tex |
| 预印本/未发表 | 若已正式发表 → 替换为正式版本;否则将 bib 条目类型改为 @unpublished 或 @misc 并补 note = {Working paper} | .bib |
| 孤立条目 | 直接从 .bib 删除(默认低风险,可批量执行) | .bib |
For each row, before showing the user, prepare:
.tex line for in-text edits; the BibTeX entry block for .bib edits.old_string: enough surrounding context to be unique. For sentence rewrites, include the full sentence; for bib edits, include the relevant field line(s).new_string: the proposed edit applied.When APPLY_FIXES = interactive, present each fix to the user using this exact template, then act on the response:
[修订 N/总数] 序号 K · <BibTeX Key> · <类别>
位置: <file>:<line> 严重程度: <🔴/🟡/🟢/—>
引用观点: <引用观点 from report>
原文实际: <one sentence on what the cited paper actually says, or "—" for bib-only fixes>
修改理由: <one-line rationale>
— 当前 —
<old_string>
— 修改后 —
<new_string>
应用此修改?(y=apply / n=skip / e=let me edit new_string / q=quit Step 6)
Response handling:
Edit tool with the prepared old_string / new_string. Mark the row applied.new_string, then re-confirm before applying.When APPLY_FIXES = auto, skip the prompt and apply every prepared edit, but still display the same block so the user can scroll back and audit. Auto mode requires explicit user opt-in (-- apply: auto); never silently auto-apply.
These are non-negotiable — getting a citation fix wrong can introduce plagiarism risk or hallucinated content into a published paper.
.tex and .bib file that will be touched to <file>.bak-YYYYMMDD-HHMMSS. One backup per file, not per edit..bib file, or (b) point to a paper you actually verified online during Step 3 — in which case generate a clean BibTeX entry from the verified metadata, do not paraphrase..tex locations and the fix is bib-side (metadata correction), one .bib edit covers all sites. If the fix is in-text (claim rewrite), each occurrence is its own queue row and gets reviewed separately — the same paper can be fine in one place and overstated in another.\citep{key}, \citet{key}, \cite[p.~12]{key} are not interchangeable — when replacing a cite key, keep the same command and any optional arguments. When rewriting a sentence, keep the citation command in a sensible position.\citep{} was left behind; no .bak filenames leaked into the manuscript.After Step 6 completes, write ref_verify_changes.md next to the report. One entry per applied/skipped row:
# 参考文献修订日志
**生成时间**: 2026-05-08 07:35
**总数**: 已应用 N · 跳过 M · 用户编辑 K · 失败 F
## 已应用
### 1. baker2006investor — 部分支撑
- 位置: `1_introduction.tex:42`
- 原: investor sentiment predicts cross-sectional stock returns in all market conditions
- 改: investor sentiment predicts cross-sectional stock returns more strongly among stocks that are difficult to value or arbitrage (Baker and Wurgler, 2006)
- 理由: 原文结论限定在难以估值/套利的股票,原句过度泛化
### 2. smith2020aer — 论文不存在
- 位置: `2_literature.tex:88`,`bib/refs.bib:142`
- 操作: 删除 `.bib` 条目;将文中 `\citep{smith2020aer}` 替换为 `\citep{shleifer1997limits}`
- 理由: 在 Google Scholar / DBLP / SSRN 均搜索不到 Smith (2020, AER),疑似虚构;改用主张相近的 Shleifer & Vishny (1997)
## 跳过
...
This log is the audit trail — if a co-author later asks "what did the verifier change?", the answer is one file. It also lets the user sanity-check before committing.
| 列名 | 含义 | 填写规则 | |------|------|----------| | 序号 | 按文中首次出现顺序编号 | 从 1 开始递增 | | 参考文献 | 作者 (年份), 期刊缩写 | 如 "Baker and Wurgler (2006), JF" | | BibTeX Key | citation key | 如 "baker2006investor" | | 文中引用位置 | 文件名:行号 | 如 "1_intro.tex:L42";多处引用用分号分隔 | | 引用观点 | 作者在引用处表达的核心观点 | 用一句话概括,不超过 30 字 | | 支撑判定 | 被引论文是否支持该观点 | 支撑 / 部分支撑 / 不支撑 / 未确认 | | 支撑分析 | 对比分析 | 原文实际结论 vs 引用处声称内容,指出差异 | | 元数据问题 | bib 条目信息错误 | 年份/期刊/作者拼写等,无则留空 | | 修改建议 | 具体修改方案 | 针对不支撑/部分支撑/元数据错误 |
| 列名 | 含义 | 填写规则 | |------|------|----------| | 序号 | 按文中首次出现顺序编号 | 从 1 开始递增 | | 参考文献 | BibTeX 中的作者 (年份), 期刊 | 原样摘录 bib 信息 | | BibTeX Key | citation key | 如 "smith2020aer" | | 文中引用位置 | 文件名:行号 | 多处引用用分号分隔 | | 引用观点 | 作者在引用处的核心观点 | ≤30 字 | | 问题类型 | 分类标签 | 论文不存在/作者不匹配/期刊年份不匹配/标题错误/疑似混淆/预印本未发表/孤立条目 | | 问题详情 | 搜索过程与发现 | 搜了什么、找到什么、哪里对不上 | | 可能原因 | 问题成因分析 | 如 AI 生成、记忆混淆、版本差异等 | | 修改建议 | 具体修复方案 | 替换为哪篇/修正哪些字段/删除引用 | | 严重程度 | 风险等级 | 🔴 高(虚构/严重误引)/ 🟡 中(元数据错误/模糊匹配)/ 🟢 低(孤立条目/预印本) |
\cite in the manuscript must appear in the report.未确认, not 支撑.\citep{a, b, c}, create separate rows for each key but note they appear in the same citation group..bib but are never cited in any .tex file (orphan entries)..bib entries not referenced in the text in a separate "未引用条目" section (in Excel: added to Sheet 3 with 问题类型 = "孤立条目")..xlsx report. Only generate .md / .tex if OUTPUT_FORMAT is markdown, latex, or all.APPLY_FIXES = off or the user explicitly declines. The fix queue is all of Sheet 3 plus Sheet 2 rows where 支撑判定 = 部分支撑 — process in 序号 order so the user can follow along with the manuscript..tex and .bib. Always create timestamped backups on the first applied edit, and never invent a replacement cite key without an actual verified source behind it. Write ref_verify_changes.md so the user has an audit trail./ref-verify → scan current directory, output Excel
/ref-verify "paper/" → scan paper/ directory, output Excel
/ref-verify "main.tex" → scan specific file, output Excel
/ref-verify "paper/" -- format: all → output Excel + Markdown + LaTeX
/ref-verify "paper/" -- format: markdown → output Markdown only
/ref-verify "paper/" -- strict: true → strict mode (flag all unconfirmed)
/ref-verify "paper/" -- method: dblp → use DBLP API first
/ref-verify "paper/" -- lang: en → English report headers
/ref-verify "paper/" -- apply: interactive → review & apply each fix one by one (default)
/ref-verify "paper/" -- apply: auto → apply every suggested fix without asking
/ref-verify "paper/" -- apply: off → stop after report; do NOT touch .tex / .bib
tools
Recommend AND run open-source AI tools, agents, Claude Code / Codex skills, and MCP servers for any stage of a literature review — searching, reading, extracting, synthesizing, screening, citation-checking, and paper writing. Use when the user asks "what tool should I use to..." OR "install/run/use <tool> to ..." for research/lit-review work: automating a survey or related-work section, PDF→Markdown extraction for LLMs (MinerU/marker/docling), PRISMA / systematic review (ASReview), citation-backed Q&A over PDFs (PaperQA2), wiring papers into Claude/Cursor via MCP (arxiv/paper-search/zotero servers), or chatting with a Zotero library. Ships a launcher (scripts/litrun.py) that installs each tool in an isolated venv and runs it. Curated catalog of 70+ vetted projects. 支持中英文(用于「文献综述工具选型」与「一键安装/运行」)。
development
Route empirical-research requests through the Auto-Empirical Research Skills catalog when this whole repository is installed as one skill in Codex, CodeBuddy, Claude Code, or another IDE. Use to choose and load the right vendored AERS skill for causal inference, econometrics, replication, data acquisition, manuscript writing, peer review and referee responses, citation checking, de-AIGC editing, or full empirical-paper workflows without reading the entire repository at once.
documentation
Use when the project collects primary data or runs a field, lab, or survey experiment, before the intervention begins — write the pre-analysis plan, size the sample from a power calculation, and register with the AEA RCT Registry. Apply after the design is chosen in aer-identification and before any outcome data are seen.
tools
Guide economists to authoritative data sources with explicit, confirmed data specifications before retrieval; interfaces with Playwright MCP to navigate portals and extract real data, not articles about data.