Citation management

From findscripter/everything-skills · View interactive version

Citation management is an AI agent skill from the GitHub repository findscripter/everything-skills. 当撰写论文/学位论文需要系统管理参考文献时使用;做学术检索、元数据提取、引文校验并产出规范 BibTeX 与校验报告;不适用于正文叙事写作或非学术文档排版。触发词:BibTeX、DOI、引文管理、参考文献、PubMed

How to use this skill

Skill file

何时使用

在研究与写作全过程中系统化管理引文时使用,典型场景:

不该用的边界:

步骤

引文管理遵循五阶段流程:

  1. 检索发现:用 Google Scholar(跨学科覆盖最广)或 PubMed(生物医学,3500 万+ 条目)按主题、作者、年份、刊物检索,导出 JSON/BibTeX。
  2. 元数据提取:把论文标识符转为完整准确元数据。优先用 DOI(最可靠),经 CrossRef / PubMed E-utilities / arXiv / DataCite 等 API 拉取。
  3. BibTeX 格式化:生成干净、字段顺序统一、标题大小写用 {} 保护、页码用 -- 的条目。
  4. 引文校验:核验 DOI 可解析、必填字段齐全、数据一致(年份 4 位、卷期为数字、页码格式正确)、无重复、语法合规。
  5. 写作集成:合并、去重、排序、校验后导出最终 .bib,在 LaTeX 中 \bibliography{final_references} 引用。

指令

检索(Google Scholar / PubMed):

# 主题检索 + 年份过滤
python scripts/search_google_scholar.py "machine learning protein folding" \
  --year-start 2020 --year-end 2024 --limit 100 --output ml.json

# 按被引量排序找奠基性论文
python scripts/search_google_scholar.py "AlphaFold protein structure" \
  --sort-by citations --limit 20 --output seminal.json

# PubMed 用 MeSH 词 + 文献类型过滤
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 trials.json

元数据提取与 DOI 转换:

# 通用提取:支持 --doi / --pmid / --arxiv / --url
python scripts/extract_metadata.py --doi 10.1038/s41586-021-03819-2
python scripts/extract_metadata.py --pmid 34265844
python scripts/extract_metadata.py --arxiv 2103.14030

# 批量(文件混合标识符,每行一个)
python scripts/extract_metadata.py --input ids.txt --output citations.bib

# 快速 DOI 转 BibTeX
python scripts/doi_to_bibtex.py 10.1038/s41586-021-03819-2
python scripts/doi_to_bibtex.py --input dois.txt --output references.bib

格式化与校验:

# 去重 + 按年份倒序排序
python scripts/format_bibtex.py refs.bib \
  --deduplicate --sort year --descending --output sorted.bib

# 校验并自动修复,输出报告
python scripts/validate_citations.py refs.bib \
  --auto-fix --report validation.json --output final_references.bib

Google Scholar 高级算符:"exact phrase"、author:lastname、intitle:keyword、source:Nature、-exclude、OR、2020..2024。

PubMed 字段标签:[Title]、[Title/Abstract]、[Author]、[Journal]、[Publication Date]、[Publication Type]、[MeSH]。

BibTeX 常见条目类型:@article(期刊)、@book、@inproceedings(会议)、@incollection(书章)、@phdthesis、@misc(预印本/软件/数据集)。期刊条目必填示例:

@article{Author2024keyword,
  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}
}

示例

为一篇论文构建参考文献库的端到端流程:

# 1. 检索主题论文
python scripts/search_pubmed.py \
  '"CRISPR-Cas Systems"[MeSH] AND "Gene Editing"[MeSH]' \
  --date-start 2020 --limit 200 --output crispr.json

# 2. 从结果提取元数据为 BibTeX
python scripts/extract_metadata.py --input crispr.json --output crispr_refs.bib

# 3. 追加已知关键论文
python scripts/doi_to_bibtex.py 10.1038/nature12345 >> crispr_refs.bib

# 4. 去重 + 排序
python scripts/format_bibtex.py crispr_refs.bib \
  --deduplicate --sort year --descending --output references.bib

# 5. 校验 + 自动修复
python scripts/validate_citations.py references.bib \
  --auto-fix --report validation.json --output final_references.bib

# 6. 审阅报告并在 LaTeX 中引用 \bibliography{final_references}

校验报告(JSON)会按 errors(如缺字段 missing_field、无效 DOI invalid_doi)与 warnings(如疑似重复 possible_duplicate)分级输出,便于定位修复。

注意事项

互见


采编自 sickn33/antigravity-awesome-skills(MIT License),原作者 K-Dense Inc.。

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.