关于 citation-management
面向研究与写作的引用管理技能,可搜索论文、提取并补全引文元数据,生成经过验证的 BibTeX 书目,适用于论文、学位论文和文献综述。
主要功能
- 01搜索 Google Scholar 和 PubMed
- 02从 DOI、PMID、arXiv ID 提取元数据
- 03补全缺失的引文字段
- 04格式化并验证 BibTeX
- 05检查重复参考文献
适用场景
- 01为论文或学位论文编制书目
- 02将论文标识符转换为 BibTeX
- 03查找并核实某领域的论文
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ hkphysics/ scientific-agent-skills --skill citation-management安装后在 Claude Code 中输入/citation-management确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
assets/bibtex_template.bibcitation_checklist.mdreferences/bibtex_formatting.mdcitation_validation.mdgoogle_scholar_search.mdmetadata_extraction.mdpubmed_search.mdscripts/doi_to_bibtex.pyextract_metadata.pyformat_bibtex.pygenerate_schematic_ai.pygenerate_schematic.pysearch_google_scholar.pysearch_pubmed.pyvalidate_citations.py详细介绍
引用管理
概述
在整个研究和写作过程中系统地管理引用。此技能提供了用于搜索学术数据库(Google Scholar、PubMed)、从多个来源(CrossRef、PubMed、arXiv)提取准确元数据、验证引用信息以及生成格式规范的 BibTeX 条目的工具和策略。
这对确保引用准确、避免参考文献错误以及保障研究可复现性至关重要。它与 literature-review 技能无缝集成,支持全面的研究工作流。
何时使用此技能
在以下情况下使用此技能:
- 在 Google Scholar 或 PubMed 上搜索特定论文
- 将 DOI、PMID 或 arXiv ID 转换为格式规范的 BibTeX
- 提取引用的完整元数据(作者、标题、期刊、年份等)
- 验证现有引用的准确性
- 清理并格式化 BibTeX 文件
- 查找特定领域中引用量很高的论文
- 核实引用信息是否与实际出版物相符
- 为论文或学位论文整理参考文献
- 检查是否存在重复引用
- 确保引用格式统一
使用科学示意图增强视觉效果
使用此技能创建文档时,务必考虑添加科学图表和示意图,以增强视觉传达效果。
如果文档中尚无示意图或图表:
- 使用 scientific-schematics 技能生成 AI 驱动、达到出版品质的图表
- 只需用自然语言描述所需的图表
- Nano Banana Pro 将自动生成、检查并优化示意图
对于新文档: 默认应生成科学示意图,以直观呈现文中描述的关键概念、工作流、架构或关系。
生成示意图的方法:
python scripts/generate_schematic.py "your diagram description" -o figures/output.png
AI 将自动:
- 创建格式规范、达到出版品质的图像
- 通过多轮迭代进行检查和优化
- 确保易于访问(适合色盲人士、对比度高)
- 将输出保存到 figures/ 目录
适合添加示意图的内容:
- 引用工作流图
- 文献检索方法流程图
- 参考文献管理系统架构图
- 引用格式选择决策树
- 数据库集成图
- 任何适合通过可视化呈现的复杂概念
有关创建示意图的详细指南,请参阅 scientific-schematics 技能文档。
核心工作流
引用管理遵循系统化流程:
阶段 1:论文发现与检索
目标:使用学术搜索引擎查找相关论文。
Google Scholar 检索
Google Scholar 在各个学科中提供最全面的覆盖范围。
基本检索:
# Search for papers on a topic
python scripts/search_google_scholar.py "CRISPR gene editing" \
--limit 50 \
--output results.json
# Search with year filter
python scripts/search_google_scholar.py "machine learning protein folding" \
--year-start 2020 \
--year-end 2024 \
--limit 100 \
--output ml_proteins.json
高级检索策略(参见 references/google_scholar_search.md):
- 使用引号搜索确切短语:
"deep learning" - 按作者搜索:
author:LeCun - 在标题中搜索:
intitle:"neural networks" - 排除词语:
machine learning -survey - 使用排序选项查找引用量很高的论文
- 按日期范围筛选,查找近期研究
最佳实践:
- 使用具体、有针对性的搜索词
- 加入关键技术术语和缩写
- 对发展迅速的领域,筛选近几年的研究
- 查看“Cited by”以查找奠基性论文
- 导出排名靠前的结果以作进一步分析
PubMed 搜索
PubMed 专注于生物医学和生命科学文献(3,500 多万条引文)。
基本搜索:
# Search PubMed
python scripts/search_pubmed.py "Alzheimer's disease treatment" \
--limit 100 \
--output alzheimers.json
# Search with MeSH terms and filters
python scripts/search_pubmed.py \
--query '"Alzheimer Disease"[MeSH] AND "Drug Therapy"[MeSH]' \
--date-start 2020 \
--date-end 2024 \
--publication-types "Clinical Trial,Review" \
--output alzheimers_trials.json
高级 PubMed 查询(参见 references/pubmed_search.md):
- 使用 MeSH 术语:
"Diabetes Mellitus"[MeSH] - 字段标签:
"cancer"[Title]、"Smith J"[Author] - 布尔运算符:
AND、OR、NOT - 日期筛选:
2020:2024[Publication Date] - 出版物类型:
"Review"[Publication Type] - 与 E-utilities API 结合使用以实现自动化
最佳实践:
- 使用 MeSH 浏览器查找正确的受控词汇
- 先在 PubMed 高级搜索构建器中构建复杂查询
- 使用 OR 添加多个同义词
- 检索 PMID,以便轻松提取元数据
- 导出为 JSON 或直接导出为 BibTeX
阶段 2:元数据提取
目标:将论文标识符(DOI、PMID、arXiv ID)转换为完整、准确的元数据。
快速将 DOI 转换为 BibTeX
对于单个 DOI,请使用快速转换工具:
# Convert single DOI
python scripts/doi_to_bibtex.py 10.1038/s41586-021-03819-2
# Convert multiple DOIs from a file
python scripts/doi_to_bibtex.py --input dois.txt --output references.bib
# Different output formats
python scripts/doi_to_bibtex.py 10.1038/nature12345 --format json
全面的元数据提取
对于 DOI、PMID、arXiv ID 或 URL:
# Extract from DOI
python scripts/extract_metadata.py --doi 10.1038/s41586-021-03819-2
# Extract from PMID
python scripts/extract_metadata.py --pmid 34265844
# Extract from arXiv ID
python scripts/extract_metadata.py --arxiv 2103.14030
# Extract from URL
python scripts/extract_metadata.py --url "https://www.nature.com/articles/s41586-021-03819-2"
# Batch extraction from file (mixed identifiers)
python scripts/extract_metadata.py --input identifiers.txt --output citations.bib
元数据来源(参见 references/metadata_extraction.md):
-
CrossRef API:DOI 的主要来源
- 提供期刊文章的全面元数据
- 提供出版商信息
- 包含作者、标题、期刊、卷、页码和日期
- 免费,无需 API 密钥
-
PubMed E-utilities:生物医学文献
- NCBI 官方元数据
- 包含 MeSH 术语、摘要
- PMID 和 PMCID 标识符
- 免费;高频使用时建议使用 API 密钥
-
arXiv API:物理学、数学、计算机科学和 q-bio 领域的预印本
- 提供预印本的完整元数据
- 版本跟踪
- 作者所属机构
- 免费、开放获取
-
DataCite API:研究数据集、软件及其他资源
- 提供非传统学术成果的元数据
- 为数据集和代码提供 DOI
- 免费访问
提取内容:
- 必需字段:作者、标题、年份
- 期刊文章:期刊、卷、期号、页码、DOI
- 书籍:出版商、ISBN、版次
- 会议论文:书名、会议地点、页码
- 预印本:存储库(arXiv、bioRxiv)、预印本 ID
- 其他信息:摘要、关键词、URL
阶段 2.5:通过网络搜索丰富元数据(必需)
目标:使用网络搜索检测并补全任何缺失的元数据字段。此阶段在提取之后、格式化之前运行,以确保每条 BibTeX 记录都完整。
为何这至关重要:从 API(CrossRef、PubMed、arXiv)提取的元数据有时会返回不完整的记录——缺少卷、页码、期号或 DOI。在认为参考文献列表已准备就绪之前,必须补全这些信息。
步骤 1:检查不完整的条目
提取元数据后,扫描 BibTeX 文件,查找缺少关键字段的条目:
按条目类型检查的字段:
| 条目类型 | 必须包含 | 应包含 |
|---|---|---|
| @article | author, title, journal, year | volume, pages, number, doi |
| @inproceedings | author, title, booktitle, year | pages, doi |
| @book | author/editor, title, publisher, year | isbn, doi |
| @misc | author, title, year | doi 或 url |
任何缺少 volume、pages 或 doi 的 @article 条目都视为不完整,必须补全。
步骤 2:通过网络搜索查找缺失的元数据
对于每条不完整的记录,使用 parallel-web 技能搜索缺失信息:
选项 A — 按标题和作者搜索(最适合查找 DOI):
parallel-cli search "FIRST_AUTHOR TITLE JOURNAL_NAME volume pages DOI" \
--json --max-results 10 \
-o sources/search_citation_CITATIONKEY.json
选项 B — 从 DOI 页面提取(最适合已知 DOI、但缺少卷或页码的情况):
parallel-cli extract "https://doi.org/10.XXXX/YYYY" --json \
--objective "extract complete citation metadata: volume, issue, pages, publication date" \
-o sources/extract_doi_CITATIONKEY.json
选项 C — 直接搜索 CrossRef API(编程方式,速度快):
parallel-cli search "crossref DOI metadata FIRST_AUTHOR TITLE" \
--json --max-results 10 \
-o sources/search_crossref_CITATIONKEY.json
选项 D — 搜索 Google Scholar(难以查找的论文的备用方案):
parallel-cli search "google scholar FIRST_AUTHOR TITLE YEAR complete citation" \
--json --max-results 10 \
-o sources/search_scholar_CITATIONKEY.json
步骤 3:更新 BibTeX 条目
找到缺失的元数据后:
- 打开
references.bib - 将缺失字段添加到不完整的条目中
- 验证找到的元数据与现有字段一致(作者、标题和年份相同)
- 记录每项修复:
[HH:MM:SS] METADATA ENRICHED: [CitationKey] - added volume={X}, pages={Y--Z}, doi={10.XXX/YYY} ✅
步骤 4:处理无法查到的元数据
如果经过网络搜索后确实无法找到元数据(非常古老的论文、鲜为人知的会议等):
- 在 BibTeX 条目中添加
note字段,说明缺失情况:note = {Volume and pages not available — published online only} - 记录例外情况:
[HH:MM:SS] METADATA INCOMPLETE: [CitationKey] - pages unavailable (online-only publication) ⚠️ - 这类例外应当很少见——大多数现代论文都能通过网络搜索找到完整的元数据。
快速参考:常见缺失字段及其查找方式
| 缺失字段 | 最佳搜索策略 |
|---|---|
| DOI | 通过 parallel-cli 搜索“作者 标题 DOI” |
| 卷号 | 从 DOI 页面提取,或搜索“期刊 年份 标题 卷号” |
| 页码 | 从 DOI 页面提取,或搜索出版商网站 |
| 期号/编号 | 从 DOI 页面或 CrossRef 提取 |
| 出版商 | 搜索“期刊 出版商”,或查看期刊网站 |
阶段 3:BibTeX 格式化
目标:生成整洁、格式规范的 BibTeX 条目。
了解 BibTeX 条目类型
完整指南请参阅 references/bibtex_formatting.md。
常见条目类型:
@article:期刊论文(最常见)@book:书籍@inproceedings:会议论文@incollection:书籍章节@phdthesis:博士论文@misc:预印本、软件、数据集
各类型所需字段:
@article{citationkey,
author = {Last1, First1 and Last2, First2},
title = {Article Title},
journal = {Journal Name},
year = {2024},
volume = {10},
number = {3},
pages = {123--145},
doi = {10.1234/example}
}
@inproceedings{citationkey,
author = {Last, First},
title = {Paper Title},
booktitle = {Conference Name},
year = {2024},
pages = {1--10}
}
@book{citationkey,
author = {Last, First},
title = {Book Title},
publisher = {Publisher Name},
year = {2024}
}
格式化与清理
使用格式化工具统一 BibTeX 文件:
# Format and clean BibTeX file
python scripts/format_bibtex.py references.bib \
--output formatted_references.bib
# Sort entries by citation key
python scripts/format_bibtex.py references.bib \
--sort key \
--output sorted_references.bib
# Sort by year (newest first)
python scripts/format_bibtex.py references.bib \
--sort year \
--descending \
--output sorted_references.bib
# Remove duplicates
python scripts/format_bibtex.py references.bib \
--deduplicate \
--output clean_references.bib
# Validate and report issues
python scripts/format_bibtex.py references.bib \
--validate \
--report validation_report.txt
格式化操作:
- 统一字段顺序
- 统一缩进和间距
- 正确设置标题大小写(使用 {} 保护)
- 统一作者姓名格式
- 统一引用键格式
- 删除不必要的字段
- 修正常见错误(缺少逗号、大括号)
阶段 4:引文验证
目标:验证所有引文准确且完整。
全面验证
# Validate BibTeX file
python scripts/validate_citations.py references.bib
# Validate against a venue standard (e.g., Nature, NeurIPS, Literature Review)
python scripts/validate_citations.py references.bib --venue nature
python scripts/validate_citations.py references.bib --venue neurips
python scripts/validate_citations.py references.bib --venue review
# Validate with custom minimum citation count
python scripts/validate_citations.py references.bib --min-count 40
# Check references against a written manuscript file (detect missing or unused citations)
python scripts/validate_citations.py references.bib --manuscript paper.md
# Generate detailed validation report
python scripts/validate_citations.py references.bib \
--venue nature \
--manuscript paper.md \
--report validation_report.json \
--verbose
验证检查项(参见 references/citation_validation.md):
-
DOI 验证:
- DOI 可通过 doi.org 正确解析
- BibTeX 与 CrossRef 中的元数据一致
- 没有失效或无效的 DOI
-
必需字段:
- 条目类型所需的字段齐全
- 没有空字段或缺失的关键信息
- 作者姓名格式正确
-
数据一致性:
- 年份有效(4 位数字,范围合理)
- 卷号/期号为数字
- 页码格式正确(例如 123--145)
- URL 可访问
-
重复项检测:
- 同一 DOI 被多次使用
- 标题相似(可能存在重复项)
- 作者/年份/标题组合相同
-
格式合规性:
- BibTeX 语法有效
- 大括号和引号使用正确
- 引用键唯一
- 特殊字符处理正确
验证输出:
{
"total_entries": 150,
"valid_entries": 145,
"errors": [
{
"citation_key": "Smith2023",
"error_type": "missing_field",
"field": "journal",
"severity": "high"
},
{
"citation_key": "Jones2022",
"error_type": "invalid_doi",
"doi": "10.1234/broken",
"severity": "high"
}
],
"warnings": [
{
"citation_key": "Brown2021",
"warning_type": "possible_duplicate",
"duplicate_of": "Brown2021a",
"severity": "medium"
}
]
}
按发表渠道划分的引用数量标准
引用数量必须始终达到所选或推荐发表渠道的期刊和会议出版标准。 切勿满足于稀少的参考文献列表;应建立权威、丰富的背景,并密集引用经核实的文献。
| 发表渠道类型 | 目标引用数量 |
|---|---|
| 高影响力综合期刊(Nature、Science、Cell) | 35-50+ |
| 机器学习 / 计算机科学会议(NeurIPS、ICML、ICLR、CVPR、ACL) | 30-45+ |
| 综合性文献综述 / 市场研究报告 | 40-65+ |
| 医学期刊(NEJM、Lancet、JAMA) | 30-45+ |
应始终根据目标发表渠道的常规引用密度和惯例,适当提高引用数量目标。避免“偷懒式”的引用重复——不要反复引用同一篇或两篇论文来支持多个无关论点;应引用多样且高质量的权威文献。
使用 validate_citations.py --venue <venue> 或 --min-count <N> 以编程方式执行这些标准。
写作完成后的强制参考文献检查(不可妥协)
完成整份科学报告或论文的起草和写作后,在编译最终交付物之前,必须对所有引用进行全面的写后核验:
- 确认没有缺失或未解析的引用:检查草稿或编译后的文档,确保每条文内引用都能正确对应到
references.bib中的参考文献。不得存在任何失效的引用键、缺失的标识符或未解析的引用(例如[?]或[citation needed])。 - 确认没有未使用的(游离)书目条目:检查
references.bib中的每条记录是否都在报告正文中被引用。删除所有未使用的条目,确保参考文献列表完全整洁。 - 确认引用数量符合目标标准:确保最终引用数量达到或超过所选或推荐发表渠道的高标准(见上表)。如果数量低于标准,应先补充检索文献,找到高质量论文,并将其纳入合适的章节。
- 确认元数据完整:确认所有引用条目均包含完整且经过核实的字段(所有作者姓名、完整的期刊 / 会议名称、准确年份、卷号、期号、页码范围和有效 DOI)。
在一条命令中运行所有这些检查:
python scripts/validate_citations.py references.bib \
--venue <venue> \
--manuscript paper.md \
--report post_writing_check.json
阶段 5:与写作工作流集成
为稿件编制参考文献
创建参考文献列表的完整工作流:
# 1. Search for papers on your topic
python scripts/search_pubmed.py \
'"CRISPR-Cas Systems"[MeSH] AND "Gene Editing"[MeSH]' \
--date-start 2020 \
--limit 200 \
--output crispr_papers.json
# 2. Extract DOIs from search results and convert to BibTeX
python scripts/extract_metadata.py \
--input crispr_papers.json \
--output crispr_refs.bib
# 3. Add specific papers by DOI
python scripts/doi_to_bibtex.py 10.1038/nature12345 >> crispr_refs.bib
python scripts/doi_to_bibtex.py 10.1126/science.abcd1234 >> crispr_refs.bib
# 4. Format and clean the BibTeX file
python scripts/format_bibtex.py crispr_refs.bib \
--deduplicate \
--sort year \
--descending \
--output references.bib
# 5. Validate all citations
python scripts/validate_citations.py references.bib \
--auto-fix \
--report validation.json \
--output final_references.bib
# 6. Review validation report and fix any remaining issues
cat validation.json
# 7. Use in your LaTeX document
# \bibliography{final_references}
与文献综述技能集成
此技能可补充 literature-review 技能:
文献综述技能 → 系统检索与综合 引用管理技能 → 引用的技术处理
组合工作流:
- 使用
literature-review进行全面的多数据库检索 - 使用
citation-management提取并验证所有引用 - 使用
literature-review从主题角度综合研究结果 - 使用
citation-management核实最终参考文献列表的准确性
# After completing literature review
# Verify all citations in the review document
python scripts/validate_citations.py my_review_references.bib --report review_validation.json
# Format for specific citation style if needed
python scripts/format_bibtex.py my_review_references.bib \
--style nature \
--output formatted_refs.bib
搜索策略
Google Scholar 最佳实践
查找开创性和高影响力论文(关键):
始终优先考虑引用次数、期刊质量和作者声誉:
引用次数阈值:
| 论文年龄 | 引用次数 | 分类 |
|---|---|---|
| 0-3 年 | 20+ | 值得关注 |
| 0-3 年 | 100+ | 影响力极高 |
| 3-7 年 | 100+ | 重要 |
| 3-7 年 | 500+ | 里程碑论文 |
| 7 年以上 | 500+ | 开创性研究 |
| 7 年以上 | 1000+ | 奠基性研究 |
期刊质量等级:
- Tier 1(优先): Nature、Science、Cell、NEJM、Lancet、JAMA、PNAS
- Tier 2(高度优先): 影响因子 >10,顶级会议(NeurIPS、ICML、ICLR)
- Tier 3(良好): 专业期刊(影响因子 5-10)
- Tier 4(少量采用): 影响力较低的同行评审期刊或会议
作者声誉指标:
- h-index >40 的资深研究人员
- 在 Tier-1 期刊或会议上发表过多篇论文
- 在知名机构担任领导职务
- 获得奖项并担任编辑职务
查找高影响力论文的搜索策略:
- 按引用次数排序(被引最多的排在前面)
- 查找 Tier-1 期刊上的综述文章,了解概况
- 查看“Cited by”,评估影响力并查找近期后续研究
- 使用引用提醒,追踪关键论文的新引用
- 使用
source:Nature或source:Science按顶级期刊筛选 - 使用
author:LastName搜索知名领域领军人物的论文
高级运算符(完整列表见 references/google_scholar_search.md):
"exact phrase" # Exact phrase matching
author:lastname # Search by author
intitle:keyword # Search in title only
source:journal # Search specific journal
-exclude # Exclude terms
OR # Alternative terms
2020..2024 # Year range
搜索示例:
# Find recent reviews on a topic
"CRISPR" intitle:review 2023..2024
# Find papers by specific author on topic
author:Church "synthetic biology"
# Find highly cited foundational work
"deep learning" 2012..2015 sort:citations
# Exclude surveys and focus on methods
"protein folding" -survey -review intitle:method
PubMed 最佳实践
使用 MeSH 术语: MeSH(医学主题词)提供受控词汇,便于精准检索。
- 查找 MeSH 术语,访问 https://meshb.nlm.nih.gov/search
- 在查询中使用:
"Diabetes Mellitus, Type 2"[MeSH] - 与关键词结合,实现全面检索
字段标签:
[Title] # Search in title only
[Title/Abstract] # Search in title or abstract
[Author] # Search by author name
[Journal] # Search specific journal
[Publication Date] # Date range
[Publication Type] # Article type
[MeSH] # MeSH term
构建复杂查询:
# Clinical trials on diabetes treatment published recently
"Diabetes Mellitus, Type 2"[MeSH] AND "Drug Therapy"[MeSH]
AND "Clinical Trial"[Publication Type] AND 2020:2024[Publication Date]
# Reviews on CRISPR in specific journal
"CRISPR-Cas Systems"[MeSH] AND "Nature"[Journal] AND "Review"[Publication Type]
# Specific author's recent work
"Smith AB"[Author] AND cancer[Title/Abstract] AND 2022:2024[Publication Date]
用于自动化的 E-utilities: 这些脚本使用 NCBI E-utilities API 进行程序化访问:
- ESearch:搜索并检索 PMID
- EFetch:检索完整元数据
- ESummary:获取摘要信息
- ELink:查找相关文章
完整 API 文档请参阅 references/pubmed_search.md。
工具和脚本
search_google_scholar.py
搜索 Google Scholar 并导出结果。
功能:
- 支持带速率限制的自动搜索
- 支持分页
- 按年份范围筛选
- 导出为 JSON 或 BibTeX
- 提供引用次数信息
用法:
# Basic search
python scripts/search_google_scholar.py "quantum computing"
# Advanced search with filters
python scripts/search_google_scholar.py "quantum computing" \
--year-start 2020 \
--year-end 2024 \
--limit 100 \
--sort-by citations \
--output quantum_papers.json
# Export directly to BibTeX
python scripts/search_google_scholar.py "machine learning" \
--limit 50 \
--format bibtex \
--output ml_papers.bib
search_pubmed.py
使用 E-utilities API 搜索 PubMed。
功能:
- 支持复杂查询(MeSH、字段标签、布尔运算)
- 按日期范围筛选
- 按出版物类型筛选
- 批量检索元数据
- 导出为 JSON 或 BibTeX
用法:
# Simple keyword search
python scripts/search_pubmed.py "CRISPR gene editing"
# Complex query with filters
python scripts/search_pubmed.py \
--query '"CRISPR-Cas Systems"[MeSH] AND "therapeutic"[Title/Abstract]' \
--date-start 2020-01-01 \
--date-end 2024-12-31 \
--publication-types "Clinical Trial,Review" \
--limit 200 \
--output crispr_therapeutic.json
# Export to BibTeX
python scripts/search_pubmed.py "Alzheimer's disease" \
--limit 100 \
--format bibtex \
--output alzheimers.bib
extract_metadata.py
从论文标识符中提取完整元数据。
功能:
- 支持 DOI、PMID、arXiv ID、URL
- 查询 CrossRef、PubMed、arXiv API
- 处理多种标识符类型
- 批量处理
- 支持多种输出格式
用法:
# Single DOI
python scripts/extract_metadata.py --doi 10.1038/s41586-021-03819-2
# Single PMID
python scripts/extract_metadata.py --pmid 34265844
# Single arXiv ID
python scripts/extract_metadata.py --arxiv 2103.14030
# From URL
python scripts/extract_metadata.py \
--url "https://www.nature.com/articles/s41586-021-03819-2"
# Batch processing (file with one identifier per line)
python scripts/extract_metadata.py \
--input paper_ids.txt \
--output references.bib
# Different output formats
python scripts/extract_metadata.py \
--doi 10.1038/nature12345 \
--format json # or bibtex, yaml
validate_citations.py
验证 BibTeX 条目的准确性、完整性、引用次数是否符合标准,以及与稿件的集成情况。
功能:
- 通过 doi.org 和 CrossRef 验证 DOI
- 检查必填字段
- 检测重复项
- 验证格式
- 出版标准引用次数检查:根据指定期刊或会议(Nature、NeurIPS、综述等)或自定义阈值进行检查。
- 写作后的强制检查:将稿件引用(Markdown 或 LaTeX)与定义的 BibTeX 条目进行匹配,以检测未解析、缺失或未使用的参考文献。
- 详细报告
用法:
# Basic validation
python scripts/validate_citations.py references.bib
# Validate against a venue standard (e.g., Nature, NeurIPS, Literature Review)
python scripts/validate_citations.py references.bib --venue nature
python scripts/validate_citations.py references.bib --venue neurips
python scripts/validate_citations.py references.bib --venue review
# Validate with custom minimum citation count
python scripts/validate_citations.py references.bib --min-count 40
# Check references against a written manuscript file (detect missing or unused citations)
python scripts/validate_citations.py references.bib --manuscript paper.md
# Combined full validation
python scripts/validate_citations.py references.bib \
--venue nature \
--manuscript paper.md \
--report validation_report.json \
--verbose
format_bibtex.py
格式化并清理 BibTeX 文件。
功能:
- 统一格式
- 对条目排序(按键、年份、作者)
- 删除重复项
- 验证语法
- 修正常见错误
- 强制执行引用键规范
用法:
# Basic formatting
python scripts/format_bibtex.py references.bib
# Sort by year (newest first)
python scripts/format_bibtex.py references.bib \
--sort year \
--descending \
--output sorted_refs.bib
# Remove duplicates
python scripts/format_bibtex.py references.bib \
--deduplicate \
--output clean_refs.bib
# Complete cleanup
python scripts/format_bibtex.py references.bib \
--deduplicate \
--sort year \
--validate \
--auto-fix \
--output final_refs.bib
doi_to_bibtex.py
快速将 DOI 转换为 BibTeX。
功能:
- 快速转换单个 DOI
- 批量处理
- 多种输出格式
- 剪贴板支持
用法:
# Single DOI
python scripts/doi_to_bibtex.py 10.1038/s41586-021-03819-2
# Multiple DOIs
python scripts/doi_to_bibtex.py \
10.1038/nature12345 \
10.1126/science.abc1234 \
10.1016/j.cell.2023.01.001
# From file (one DOI per line)
python scripts/doi_to_bibtex.py --input dois.txt --output references.bib
# Copy to clipboard
python scripts/doi_to_bibtex.py 10.1038/nature12345 --clipboard
最佳实践
搜索策略
-
先广泛搜索,再逐步缩小范围:
- 先用通用术语了解该领域
- 再用具体关键词和筛选条件细化搜索
- 使用同义词和相关术语
-
使用多个来源:
- Google Scholar,覆盖面广
- PubMed,侧重生物医学
- arXiv,查找预印本
- 合并结果,确保完整性
-
善用引文:
- 查看“被引用次数”,查找开创性论文
- 查看重要论文的参考文献
- 利用引文网络发现相关研究
-
记录搜索过程:
- 保存搜索查询和日期
- 记录结果数量
- 记下使用的筛选条件或限制
元数据提取
-
有 DOI 时始终使用 DOI:
- 最可靠的标识符
- 指向出版物的永久链接
- 通过 CrossRef 获取最佳元数据来源
-
核实提取的元数据:
- 检查作者姓名是否正确
- 核实期刊/会议名称
- 确认出版年份
- 核对页码和卷号
-
处理特殊情况:
- 预印本:注明存储库和 ID
- 后续正式发表的预印本:使用正式发表版本
- 会议论文:注明会议名称和地点
- 书籍章节:注明书名和编者
-
保持一致性:
- 统一作者姓名格式
- 规范期刊缩写
- 统一 DOI 格式(优先使用 URL)
BibTeX 质量
-
遵循规范:
- 使用有意义的引用键(FirstAuthor2024keyword)
- 使用 {} 保护标题中的大写字母
- 页码范围使用 --(而非单个连字符)
- 为所有现代出版物添加 DOI 字段
-
保持整洁:
- 删除不必要的字段
- 避免冗余信息
- 保持格式一致
- 定期验证语法
-
系统化整理:
- 按年份或主题排序
- 将相关论文分组
- 不同项目使用单独的文件
- 合并时仔细检查,避免重复
验证
-
尽早并经常验证:
- 添加引用时检查
- 提交前验证完整的参考文献列表
- 手动编辑后重新验证
-
及时修复问题:
- DOI 无效:查找正确的标识符
- 字段缺失:从原始来源提取
- 重复条目:选择最佳版本,删除其他版本
- 格式错误:在安全的情况下使用自动修复
-
人工审查重要引用:
- 确认重要论文的引用信息正确
- 检查作者姓名是否与出版物一致
- 核对页码和卷号
- 确保 URL 仍然有效
常见误区
-
单一来源偏见:只使用 Google Scholar 或 PubMed
- 解决方案:搜索多个数据库,以实现全面覆盖
-
盲目接受元数据:不核验提取的信息
- 解决方案:抽查提取的元数据,并与原始来源进行比对
-
忽略 DOI 错误:参考文献中的 DOI 已失效或不正确
- 解决方案:在最终提交前运行验证
-
格式不一致:引用键样式和格式混杂
- 解决方案:使用 format_bibtex.py 统一格式
-
条目重复:同一篇论文使用不同的键被引用多次
- 解决方案:在验证时使用重复项检测
-
缺少必填字段:BibTeX 条目不完整(缺少卷号、页码或 DOI)
- 解决方案:运行 Phase 2.5 元数据补充,在继续之前通过网络搜索补齐每个缺失字段。绝不要让 @article 条目缺少卷号、页码和 DOI。
-
预印本过时:在论文已有正式发表版本时仍引用预印本
- 解决方案:检查预印本是否已发表,并更新为期刊版本
-
特殊字符问题:字符导致 LaTeX 编译失败
- 解决方案:在 BibTeX 中使用正确的转义方式或 Unicode
-
提交前未验证:提交时仍有引用错误
- 解决方案:务必在最后进行验证
-
手动编写 BibTeX 条目:手工输入条目
- 解决方案:务必使用脚本从元数据来源提取
工作流示例
示例 1:为论文编制参考文献
# Step 1: Find key papers on your topic
python scripts/search_google_scholar.py "transformer neural networks" \
--year-start 2017 \
--limit 50 \
--output transformers_gs.json
python scripts/search_pubmed.py "deep learning medical imaging" \
--date-start 2020 \
--limit 50 \
--output medical_dl_pm.json
# Step 2: Extract metadata from search results
python scripts/extract_metadata.py \
--input transformers_gs.json \
--output transformers.bib
python scripts/extract_metadata.py \
--input medical_dl_pm.json \
--output medical.bib
# Step 3: Add specific papers you already know
python scripts/doi_to_bibtex.py 10.1038/s41586-021-03819-2 >> specific.bib
python scripts/doi_to_bibtex.py 10.1126/science.aam9317 >> specific.bib
# Step 4: Combine all BibTeX files
cat transformers.bib medical.bib specific.bib > combined.bib
# Step 5: Format and deduplicate
python scripts/format_bibtex.py combined.bib \
--deduplicate \
--sort year \
--descending \
--output formatted.bib
# Step 6: Validate
python scripts/validate_citations.py formatted.bib \
--auto-fix \
--report validation.json \
--output final_references.bib
# Step 7: Review any issues
cat validation.json | grep -A 3 '"errors"'
# Step 8: Use in LaTeX
# \bibliography{final_references}
示例 2:转换 DOI 列表
# You have a text file with DOIs (one per line)
# dois.txt contains:
# 10.1038/s41586-021-03819-2
# 10.1126/science.aam9317
# 10.1016/j.cell.2023.01.001
# Convert all to BibTeX
python scripts/doi_to_bibtex.py --input dois.txt --output references.bib
# Validate the result
python scripts/validate_citations.py references.bib --verbose
示例 3:清理现有的 BibTeX 文件
# You have a messy BibTeX file from various sources
# Clean it up systematically
# Step 1: Format and standardize
python scripts/format_bibtex.py messy_references.bib \
--output step1_formatted.bib
# Step 2: Remove duplicates
python scripts/format_bibtex.py step1_formatted.bib \
--deduplicate \
--output step2_deduplicated.bib
# Step 3: Validate and auto-fix
python scripts/validate_citations.py step2_deduplicated.bib \
--auto-fix \
--output step3_validated.bib
# Step 4: Sort by year
python scripts/format_bibtex.py step3_validated.bib \
--sort year \
--descending \
--output clean_references.bib
# Step 5: Final validation report
python scripts/validate_citations.py clean_references.bib \
--report final_validation.json \
--verbose
# Review report
cat final_validation.json
示例 4:查找并引用奠基性论文
# Find highly cited papers on a topic
python scripts/search_google_scholar.py "AlphaFold protein structure" \
--year-start 2020 \
--year-end 2024 \
--sort-by citations \
--limit 20 \
--output alphafold_seminal.json
# Extract the top 10 by citation count
# (script will have included citation counts in JSON)
# Convert to BibTeX
python scripts/extract_metadata.py \
--input alphafold_seminal.json \
--output alphafold_refs.bib
# The BibTeX file now contains the most influential papers
与其他技能集成
文献综述技能
引文管理为文献综述提供技术基础设施:
- 文献综述:跨多个数据库的系统性搜索与综合
- 引文管理:元数据提取与验证
组合工作流:
- 使用 literature-review 进行系统性搜索
- 使用 citation-management 提取并验证引文
- 使用 literature-review 综合研究结果
- 使用 citation-management 确保参考文献准确无误
科学写作技能
引文管理确保科学写作中的参考文献准确无误:
- 导出经过验证的 BibTeX,以便在 LaTeX 手稿中使用
- 核实引文是否符合出版标准
- 按照期刊要求格式化参考文献
会议模板技能
引文管理与会议模板配合使用,制作可直接提交的手稿:
- 不同会议要求不同的引用样式
- 生成格式正确的参考文献
- 验证引文是否符合会议要求
资源
随附资源
参考资料(位于 references/):
google_scholar_search.md:Google Scholar 完整搜索指南pubmed_search.md:PubMed 和 E-utilities API 文档metadata_extraction.md:元数据来源和字段要求citation_validation.md:验证标准和质量检查bibtex_formatting.md:BibTeX 条目类型和格式规则
脚本(位于 scripts/):
search_google_scholar.py:Google Scholar 搜索自动化search_pubmed.py:PubMed E-utilities API 客户端extract_metadata.py:通用元数据提取器validate_citations.py:引文验证与核验format_bibtex.py:BibTeX 格式化与清理工具doi_to_bibtex.py:快速将 DOI 转换为 BibTeX 的工具
资源文件(位于 assets/):
bibtex_template.bib:涵盖所有类型的 BibTeX 条目示例citation_checklist.md:质量保证清单
外部资源
搜索引擎:
- Google Scholar:https://scholar.google.com/
- PubMed:https://pubmed.ncbi.nlm.nih.gov/
- PubMed 高级搜索:https://pubmed.ncbi.nlm.nih.gov/advanced/
元数据 API:
- CrossRef API:https://api.crossref.org/
- PubMed E-utilities:https://www.ncbi.nlm.nih.gov/books/NBK25501/
- arXiv API:https://arxiv.org/help/api/
- DataCite API:https://api.datacite.org/
工具与验证器:
- MeSH 浏览器:https://meshb.nlm.nih.gov/search
- DOI 解析器:https://doi.org/
- BibTeX 格式:http://www.bibtex.org/Format/
引用格式:
- BibTeX 文档:http://www.bibtex.org/
- LaTeX 参考文献管理:https://www.overleaf.com/learn/latex/Bibliography_management
依赖项
必需的 Python 包
# Core dependencies
pip install requests # HTTP requests for APIs
pip install bibtexparser # BibTeX parsing and formatting
pip install biopython # PubMed E-utilities access
# Optional (for Google Scholar)
pip install scholarly # Google Scholar API wrapper
# or
pip install selenium # For more robust Scholar scraping
可选工具
# For advanced validation
pip install crossref-commons # Enhanced CrossRef API access
pip install pylatexenc # LaTeX special character handling
总结
引用管理技能提供:
- 全面的搜索功能,支持 Google Scholar 和 PubMed
- 自动提取元数据,来源包括 DOI、PMID、arXiv ID 和 URL
- 引用验证,包括 DOI 验证和完整性检查
- BibTeX 格式整理,提供标准化和清理工具
- 质量保证,通过验证和报告实现
- 集成到科学写作工作流中
- 可复现性,通过记录搜索和提取方法实现
使用此技能可在整个研究过程中维护准确、完整的引用,并确保参考文献列表达到可发表的标准。