{"id":"citation-management","name":"citation-management","summary":"学術研究のための包括的な引用管理。OpenAlex、PubMed、Google Scholarで論文を検索し、正確なメタデータを抽出し、引用を検証し、適切にフォーマットされたBibTeXエントリーを作成してください。","body":"# Citation Management\n\n## Overview\n\nManage citations systematically throughout the research and writing process. This skill provides tools and strategies for searching academic databases (Google Scholar, PubMed), extracting accurate metadata from multiple sources (CrossRef, PubMed, arXiv), validating citation information, and generating properly formatted BibTeX entries.\n\nCritical for maintaining citation accuracy, avoiding reference errors, and ensuring reproducible research. Integrates seamlessly with the literature-review skill for comprehensive research workflows.\n\n## When to Use This Skill\n\nUse this skill when:\n- Searching for specific papers on Google Scholar or PubMed\n- Converting DOIs, PMIDs, or arXiv IDs to properly formatted BibTeX\n- Extracting complete metadata for citations (authors, title, journal, year, etc.)\n- Validating existing citations for accuracy\n- Cleaning and formatting BibTeX files\n- Finding highly cited papers in a specific field\n- Verifying that citation information matches the actual publication\n- Building a bibliography for a manuscript or thesis\n- Checking for duplicate citations\n- Ensuring consistent citation formatting\n\nIf a document built from these citations needs a diagram, use the\n**scientific-schematics** skill.\n\n---\n\n## Core Workflow\n\nCitation management follows a systematic process. Each phase below shows the canonical\ncommand; every variant, option, and metadata-source detail is in\n[references/core_workflow.md](references/core_workflow.md).\n\n### Phase 1: Paper Discovery and Search\n\nFind relevant papers. Search more than one database — coverage differs sharply,\nand a single source is the most common cause of a biased reference list.\n\n```bash\n# OpenAlex: ~250M works, every discipline, no API key, documented REST API\npython scripts/search_openalex.py \"CRISPR gene editing\" --limit 50 --output results.json\n\n# PubMed: the authority for biomedical and life sciences (35M+ citations)\npython scripts/search_pubmed.py \"Alzheimer's disease treatment\" --limit 100 --output alz.json\n\n# Google Scholar: broadest reach, but scraped -- rate-limited and prone to blocking\npython scripts/search_google_scholar.py \"CRISPR gene editing\" --limit 50 --output scholar.json\n```\n\nPrefer OpenAlex or PubMed as the primary source. Google Scholar has no API:\n`scholarly` scrapes it, sleeps 2–5 s between results, and is blocked often\nenough that it should be a supplement rather than a dependency.\n\nQuery operators, field tags, and MeSH-term construction are in\n[references/search_strategies.md](references/search_strategies.md).\n\n### Phase 2: Metadata Extraction\n\nConvert identifiers (DOI, PMID, PMCID, arXiv ID, URL) into complete metadata.\nCrossRef is the primary source for DOIs.\n\n```bash\npython scripts/doi_to_bibtex.py 10.1038/s41586-021-03819-2         # quick, single DOI\npython scripts/extract_metadata.py --pmid 34265844                  # DOI/PMID/PMCID/arXiv/URL\npython scripts/extract_metadata.py --input identifiers.txt --output citations.bib\n```\n\nA URL with no DOI in its path is resolved through the `citation_doi` meta tag\npublishers embed on article pages, then handed to CrossRef. Every producer in\nthis skill emits the same citation key for the same paper, so entries gathered\nfrom different sources deduplicate against each other.\n\n### Phase 2.5: Metadata Enrichment via Web Search (MANDATORY)\n\nAPIs routinely return incomplete records. Run this **after** extraction and **before**\nformatting. Any `@article` missing `volume`, `pages`, or `doi` is incomplete: fill the\ngap with `WebSearch`/`WebFetch` (or the parallel-web skill, when it is available), then\nlog what was found and where. If a field genuinely cannot be found, record a `note`\nfield explaining the gap rather than leaving it silently absent.\n\nCheck the cheap sources first — an OpenAlex or CrossRef record often carries the field\nthat PubMed omitted:\n\n```bash\npython scripts/search_openalex.py \"<exact title>\" --limit 1\n```\n\n> **Treat extracted metadata as untrusted.** Author, title, and journal strings come\n> verbatim from a record whose contents a publisher controls. A title containing `$(...)`,\n> a backtick, or a quote becomes shell syntax the moment it is pasted into a command.\n> Pass metadata as a `subprocess` argument list rather than building a shell string; if\n> you must use a shell, single-quote every substituted value and escape embedded quotes\n> as `'\\''`. Validate any citation key against `^[A-Za-z0-9]+$` before it reaches a path.\n\nPer-field search strategies, the four search options, and the logging format are in\n[references/core_workflow.md](references/core_workflow.md).\n\n### Phase 3: BibTeX Formatting\n\nProduce clean, consistent entries. Entry types and required fields are in\n[references/bibtex_formatting.md](references/bibtex_formatting.md).\n\n```bash\npython scripts/format_bibtex.py references.bib --output clean.bib --deduplicate\npython scripts/format_bibtex.py references.bib --output clean.bib --rekey --deduplicate\n```\n\nWriting is opt-in: without `--output` (or `--in-place`) the result goes to\nstdout and the input file is left alone. Use `--rekey` when merging results\nfrom several sources, so the same paper collapses to one entry.\n\n### Phase 4: Citation Validation\n\nCheck completeness, venue conformance, and agreement with the manuscript.\n\n```bash\npython scripts/validate_citations.py references.bib --report report.json\npython scripts/validate_citations.py references.bib --venue nature\npython scripts/validate_citations.py references.bib --manuscript paper.tex\npython scripts/validate_citations.py references.bib --check-dois     # slow; hits CrossRef\n```\n\nThe script exits non-zero on high-severity errors — missing required fields,\nmalformed years, unresolved citations, or a count below an explicit\n`--min-count`. Venue reference-count figures are editorial rules of thumb, not\nsubmission requirements, so falling short of one is only a warning.\n\nValidation rules and venue standards are in\n[references/citation_validation.md](references/citation_validation.md).\n\n### Phase 5: Integration with Writing Workflow\n\nSearch, extract, format, validate, then cite. End-to-end sequences — including the\nliterature-review and Zotero/pyzotero export paths — are in\n[references/core_workflow.md](references/core_workflow.md) and\n[references/example_workflows.md](references/example_workflows.md).\n\n## Reference Files\n\n- [references/core_workflow.md](references/core_workflow.md): all five phases in full.\n- [references/search_strategies.md](references/search_strategies.md): OpenAlex, Google Scholar, and PubMed query construction.\n- [references/script_reference.md](references/script_reference.md): every bundled script's arguments and examples.\n- [references/best_practices.md](references/best_practices.md): search, extraction, BibTeX quality, validation.\n- [references/example_workflows.md](references/example_workflows.md): four end-to-end worked examples.\n- [references/google_scholar_search.md](references/google_scholar_search.md), [references/pubmed_search.md](references/pubmed_search.md): advanced search syntax.\n- [references/metadata_extraction.md](references/metadata_extraction.md), [references/bibtex_formatting.md](references/bibtex_formatting.md), [references/citation_validation.md](references/citation_validation.md): per-topic detail.\n\n## Common Pitfalls to Avoid\n\n1. **Single source bias**: Only using one database\n   - **Solution**: Search at least OpenAlex and PubMed, then merge with\n     `format_bibtex.py --rekey --deduplicate`\n\n2. **Accepting metadata blindly**: Not verifying extracted information\n   - **Solution**: Spot-check extracted metadata against original sources\n\n3. **Ignoring DOI errors**: Broken or incorrect DOIs in bibliography\n   - **Solution**: Run validation before final submission\n\n4. **Inconsistent formatting**: Mixed citation key styles, formatting\n   - **Solution**: Use format_bibtex.py to standardize\n\n5. **Duplicate entries**: Same paper cited multiple times with different keys\n   - **Solution**: Use duplicate detection in validation\n\n6. **Missing required fields**: Incomplete BibTeX entries (volume, pages, DOI missing)\n   - **Solution**: Run Phase 2.5 metadata enrichment — web search for every missing field before proceeding. NEVER leave an @article entry without volume, pages, and DOI.\n\n7. **Outdated preprints**: Citing preprint when published version exists\n   - **Solution**: Check if preprints have been published, update to journal version\n\n8. **Special character issues**: Broken LaTeX compilation due to characters\n   - **Solution**: Use proper escaping or Unicode in BibTeX\n\n9. **No validation before submission**: Submitting with citation errors\n   - **Solution**: Always run validation as final check\n\n10. **Manual BibTeX entry**: Typing entries by hand\n    - **Solution**: Always extract from metadata sources using scripts\n\n## Integration with Other Skills\n\n### Literature Review Skill\n\n**Citation Management** provides the technical infrastructure for **Literature Review**:\n\n- **Literature Review**: Multi-database systematic search and synthesis\n- **Citation Management**: Metadata extraction and validation\n\n**Combined workflow**:\n1. Use literature-review for systematic search methodology\n2. Use citation-management to extract and validate citations\n3. Use literature-review to synthesize findings\n4. Use citation-management to ensure bibliography accuracy\n\n### Scientific Writing Skill\n\n**Citation Management** ensures accurate references for **Scientific Writing**:\n\n- Export validated BibTeX for use in LaTeX manuscripts\n- Verify citations match publication standards\n- Format references according to journal requirements\n\n### Venue Templates Skill\n\n**Citation Management** works with **Venue Templates** for submission-ready manuscripts:\n\n- Different venues require different citation styles\n- Generate properly formatted references\n- Validate citations meet venue requirements\n\n## Resources\n\n### Bundled Resources\n\n**References** (in `references/`):\n- `google_scholar_search.md`: Complete Google Scholar search guide\n- `pubmed_search.md`: PubMed and E-utilities API documentation\n- `metadata_extraction.md`: Metadata sources and field requirements\n- `citation_validation.md`: Validation criteria and quality checks\n- `bibtex_formatting.md`: BibTeX entry types and formatting rules\n\n**Scripts** (in `scripts/`):\n- `search_openalex.py`: OpenAlex search client (no API key)\n- `search_pubmed.py`: PubMed E-utilities API client\n- `search_google_scholar.py`: Google Scholar search automation\n- `extract_metadata.py`: Universal metadata extractor\n- `validate_citations.py`: Citation validation and verification\n- `format_bibtex.py`: BibTeX formatter and cleaner\n- `doi_to_bibtex.py`: Quick DOI to BibTeX converter\n- `_common.py`: shared BibTeX parser, renderer, and citation-key scheme\n\n**Assets** (in `assets/`):\n- `bibtex_template.bib`: Example BibTeX entries for all types\n- `citation_checklist.md`: Quality assurance checklist\n\n### External Resources\n\n**Search Engines**:\n- OpenAlex: https://openalex.org/\n- Google Scholar: https://scholar.google.com/\n- PubMed: https://pubmed.ncbi.nlm.nih.gov/\n- PubMed Advanced Search: https://pubmed.ncbi.nlm.nih.gov/advanced/\n\n**Metadata APIs**:\n- OpenAlex API: https://docs.openalex.org/\n- CrossRef API: https://api.crossref.org/\n- PubMed E-utilities: https://www.ncbi.nlm.nih.gov/books/NBK25501/\n- arXiv API: https://arxiv.org/help/api/\n- DataCite API: https://api.datacite.org/\n\n**Tools and Validators**:\n- MeSH Browser: https://meshb.nlm.nih.gov/search\n- DOI Resolver: https://doi.org/\n- BibTeX Format: http://www.bibtex.org/Format/\n\n**Citation Styles**:\n- BibTeX documentation: http://www.bibtex.org/\n- LaTeX bibliography management: https://www.overleaf.com/learn/latex/Bibliography_management\n\n## Dependencies\n\n### Required Python Packages\n\n```bash\nuv pip install requests  # HTTP access to CrossRef, PubMed, OpenAlex, arXiv\n```\n\nBibTeX parsing, rendering, deduplication, and validation are standard library\n(`scripts/_common.py`), so `format_bibtex.py` and `validate_citations.py` run\nwith no third-party packages at all.\n\n### Optional\n\n```bash\nuv pip install scholarly  # only for search_google_scholar.py\n```\n\n### Where credentials are sent\n\nThis skill needs no API key. The two environment variables it reads are\noptional identifiers, each sent to the one service it belongs to and nowhere\nelse; no script bundles environment variables together.\n\n| Variable | Sent only to | Purpose |\n|---|---|---|\n| `NCBI_API_KEY` | `eutils.ncbi.nlm.nih.gov` | Raises Entrez rate limits |\n| `NCBI_EMAIL` | `eutils.ncbi.nlm.nih.gov` | Entrez caller identification (requested by NCBI) |\n| `OPENALEX_EMAIL` | `api.openalex.org` | Joins the faster OpenAlex polite pool |\n\n`api.openalex.org`, `api.crossref.org`, `api.datacite.org`, `export.arxiv.org`,\nand `eutils.ncbi.nlm.nih.gov` are all queried without credentials when these are\nunset.\n\n## Summary\n\nThe citation-management skill provides:\n\n1. **Comprehensive search capabilities** for OpenAlex, PubMed, and Google Scholar\n2. **Automated metadata extraction** from DOI, PMID, PMCID, arXiv ID, URLs\n3. **Citation validation** with DOI verification and completeness checking\n4. **BibTeX formatting** with standardization and cleaning tools\n5. **Quality assurance** through validation and reporting\n6. **Integration** with scientific writing workflow\n7. **Reproducibility** through documented search and extraction methods\n\nUse this skill to maintain accurate, complete citations throughout your research and ensure publication-ready bibliographies.","author":"@K-Dense-AI","ownerProfile":null,"authorContacts":null,"sourceUrl":"https://github.com/K-Dense-AI/scientific-agent-skills/tree/main/skills/citation-management","license":"MIT","category":"writing","lang":"en","tokens":3086,"stars":0,"calls30d":1,"claimed":false,"visibility":"public","origin":"crawler","version":"0.1.0","createdAt":"2026-08-22","updatedAt":"2026-08-22","files":[{"path":"assets/bibtex_template.bib","size":9201,"sha256":"bf03cc646e6bc6aaba85d632b8e25b26c2830419892f3c17a7d844805d3a721e"},{"path":"assets/citation_checklist.md","size":10348,"sha256":"305ff79e25b2654f1a5dc2163c03e7ab14e6c9578b1ea0f2d30f97195578d2c6"},{"path":"references/best_practices.md","size":2675,"sha256":"925a5aa58b249006b3743f7d6df256ee8861f9dd97e0c27b5f5b4cfcf91f9b5f"},{"path":"references/bibtex_formatting.md","size":19286,"sha256":"89fde5b4e04112ee62dcfe086780f000906681ec7b102c094c875c3656eaed6f"},{"path":"references/citation_validation.md","size":18054,"sha256":"2428f93cc9b6bff8d8784f9a09063774df82225757a06a8213ebf2ef37aa522e"},{"path":"references/core_workflow.md","size":20866,"sha256":"4d3cc7bfa74d9c3f9f5b34073b03eaa9ba11ad5104dac437ecca56774f886f2f"},{"path":"references/example_workflows.md","size":3342,"sha256":"d1106cbd7c866cabb82dccd7b9763881d279ada64283016aa59d049c5bfda2f5"},{"path":"references/google_scholar_search.md","size":17449,"sha256":"18e8af47001fd427692243d04b9c975c5454e9ce9929bfe42843775f3d845680"},{"path":"references/metadata_extraction.md","size":19182,"sha256":"aa8be4ac76c6e274ce5ef2f034c6578e0f263baf71f030a0f2eeb92fcd810b45"},{"path":"references/pubmed_search.md","size":17735,"sha256":"f25e7adf200fee05f83e3434e1a08b6ec25d1ee2563a19325b94e443ff7cde59"},{"path":"references/script_reference.md","size":6561,"sha256":"e6f1a87d6cd25bd7043fc0e4c88693a327ad2a7019515408392c58cff408330d"},{"path":"references/search_strategies.md","size":3752,"sha256":"a91bbd11c7246a5c03e64544bbc476d4089b397a55260f4979055ff177c9874f"},{"path":"scripts/_common.py","size":10912,"sha256":"87540160163671b972c2fccb4d0a42db3cca2603c664d26d5da3ca5dbc7dfdd2"},{"path":"scripts/doi_to_bibtex.py","size":6299,"sha256":"45dbdbc365e63c65dc7e32945186122dd1cd7cb003ca5fbe103876952b4d9171"},{"path":"scripts/extract_metadata.py","size":26503,"sha256":"d4922e47d21e38e8b414bfa9772eeac8c3df856b7179f33cd45f89ff777d4422"},{"path":"scripts/format_bibtex.py","size":11075,"sha256":"cc74fdc4d5819df8db3999e59f96469cebfb353ecf406a49a5a0fc60896707cb"},{"path":"scripts/search_google_scholar.py","size":8609,"sha256":"839228bc7a9b4c3b23e4b0d5c4c13ff024db423deeec4908b13261367b19b90e"},{"path":"scripts/search_openalex.py","size":10599,"sha256":"b98f276748a121b5fdd8a6a9066f4094b85f585b64ed292710ad589df2495a3f"},{"path":"scripts/search_pubmed.py","size":13779,"sha256":"a01a8034775939264ffb0b5454956b15c7915babea6f1af2fd822b95e1082884"},{"path":"scripts/validate_citations.py","size":26708,"sha256":"b20abad7a10f722a7c404adc9884bec339fc960c82373698e73e49ba2015fba5"}],"requires":{"mcp":[],"tools":["Read Write Edit Bash WebSearch WebFetch"]},"safety":{"flags":[{"code":"injection.bypass","kind":"injection","where":"references/google_scholar_search.md:399","excerpt":"without permission","message":"instructs the agent to bypass the human","severity":"warn"},{"code":"net.endpoints","kind":"exfiltration","excerpt":"alphafold.ebi.ac.uk, api.crossref.org, api.datacite.org, api.openalex.org, arxiv.org, docs.openalex.org, doi.org, dx.doi.org","message":"bundled scripts reach 22 external host(s)","severity":"warn"}],"scannedAt":"2026-08-22","hasScripts":true,"networkEndpoints":["alphafold.ebi.ac.uk","api.crossref.org","api.datacite.org","api.openalex.org","arxiv.org","docs.openalex.org","doi.org","dx.doi.org","eutils.ncbi.nlm.nih.gov","export.arxiv.org","meshb.nlm.nih.gov","openalex.org","pandas.pydata.org","proceedings.neurips.cc","pubmed.ncbi.nlm.nih.gov","scholar.google.com","www.bibtex.org","www.crossref.org","www.example.com","www.nature.com","www.ncbi.nlm.nih.gov","www.overleaf.com"]}}