Introduction¶
When writing reviews, editing AI-generated drafts, or maintaining knowledge bases with PMIDs, a common practice is to open PubMed item by item to check if the IDs exist. This only covers half the problem: many “seemingly valid” citations have PMIDs that actually exist in the database but point to a different paper from the same year and field—simple existence checks let all such mismatches slip through.
Below is an introduction to the Batch Verification of PubMed Literature Citations (pubmed-verifier) on SkillHub. It triggers batch verification via natural language within Agent conversations. The underlying mechanism uses pure Python standard library scripts to interface with public academic APIs like NCBI, generating audit reports locally without pulling in third-party runtime dependencies.
What is this¶
One-sentence positioning: Batch verify whether citations like PMID / DOI / arXiv are real, and determine if the ID matches the specific literature you claim; when there is a mismatch, it can recommend a more likely PMID and supports formatted reference export.
This Skill is published on SkillHub, and the official entry is:
https://api.skillhub.cn/user_481397b5/pubmed-verifier
The public page displays the category as professional, with a rating of 93097 and 1855 downloads (subject to SkillHub display). The description page for similar skills (e.g., @indiv-sorsor/pubmed-verifier) summarizes the capabilities as: five-state judgment, citation context parsing and cross-comparison, retraction detection, arXiv and plain text reference list parsing, export in formats like GB/T 7714 / Vancouver / APA / AMA, and multi-data source support including NCBI, Europe PMC, Crossref, and OpenAlex; when the network is unreachable, it marks the status as “Undetermined” rather than falsely reporting it as “Non-existent”. The license is MIT-0, the core implementation is a single-file CLI scripts/verify_pmids.py, featuring zero dependencies and purely local execution (requires internet access to academic registries).
Core Features¶
Five-State Judgment¶
Unlike tools that simply return “Yes/No”, verification results are divided into five categories (meanings consistent with Skill documentation):
| Verdict | Meaning |
|---|---|
| Correct | The PMID exists and matches the claimed title, authors, journal, year, etc. |
| Mismatch | The PMID exists but points to a different piece of literature (common in AI hallucinated citations). |
| Partial | Some metadata matches (e.g., authors and journal are correct but title differs). |
| Invalid | The PMID does not exist in PubMed. |
| Unknown | Insufficient claimed information for cross-comparison, or data sources are temporarily unreachable. |
Input and Cross-Comparison¶
- Scans
.html,.md,.txt,.jsonetc. in the project directory for PMIDs / PubMed links and heuristically parses the surrounding reference context. - Supports Word (
.docx), PowerPoint (.pptx), exported HTML, BibTeX / RIS, and pasted reference lists (--parse-text/--stdin). - Optional
--claims-file(JSON or CSV) to pass expected titles and authors for deterministic five-state judgment; optional--verify-doi,--suggest(retrieve candidate PMIDs on mismatch), retraction, and DOI concatenation detection. - Outputs terminal summaries, HTML dashboards, JSON, CSV, as well as formatted results via
--format-references.
Agent-Side Triggering¶
After installing the Skill in compatible environments like Cursor, it can be invoked using Chinese or English trigger words, such as: Verify PMID, Reference Check, Citation Verification, Retraction Check, Literature Formatting, verify PMIDs, citation audit, AI Hallucination Detection, etc. The Skill description emphasizes: Only performs authenticity verification and formatting; it does not polish, translate, or generate references out of thin air.
Installation and Enablement¶
- Open the SkillHub official address (see above) in a browser and follow the page instructions to install the Skill to the Agent currently in use (e.g., Cursor). Specific menus or commands for each client depend on the SkillHub display at the time; this article does not list installation commands that cannot be verified from public materials.
- After installation, the skill package typically contains
scripts/verify_pmids.pyandSKILL.md. Apart from conversational triggers, the CLI can also be called directly in the skill directory for batch processing or CI.
Optional environment variables (used for NCBI rate limiting and identity identification, not mandatory):
export NCBI_API_KEY="your_NCBI_API_Key"
export PUBMED_VERIFIER_MAILTO="you@lab.org"
For network environments in mainland China, refer to the Skill documentation: use HTTPS_PROXY / HTTP_PROXY, execute --check-net first, or use parameters like --meta-source europepmc; Skill packages on mirrors like ModelScope only alleviate installation friction, while verification still accesses academic registries.
Typical Usage¶
The following examples are from the public pubmed-verifier Skill documentation. Please replace the path with scripts/verify_pmids.py in your local skill directory.
Quick full check before submission (refresh cache, DOI cross-validation, mismatch suggestions):
python3 scripts/verify_pmids.py --source /path/to/draft --quick --output report.html
Verify specified PMIDs:
python3 scripts/verify_pmids.py --pmids 31018962,22213727
Paste reference list (no need to save file first):
python3 scripts/verify_pmids.py --parse-text references.txt --no-cache
# Or read from pipe
cat references.txt | python3 scripts/verify_pmids.py --stdin
CSV with claimed metadata, and provide PMID suggestions for mismatches:
python3 scripts/verify_pmids.py --claims-file claims.csv --suggest --output report.html
claims.csv needs to contain columns like pmid, title, etc.; if title is missing, the judgment can only reach “partial” at best. You can validate offline first:
python3 scripts/verify_pmids.py --lint-claims claims.csv
Invoke in Python (point sys.path to the scripts directory within the skill):
import sys
sys.path.insert(0, "/path/to/pubmed-verifier/scripts")
import verify_pmids as vp
info = vp.fetch_summaries(["31018962"], batch_size=1)["31018962"]
cross = vp.cross_check_citation(
{"claimed_title": "Classification criteria for autoinflammatory recurrent fevers",
"claimed_year": "2019"},
{"title": info["title"], "authors": info["authors"],
"journal": info["journal"], "pubdate": info["pubdate"]})
print(cross["verdict"], round(cross["confidence"], 2))
Use Cases and Notes¶
Who is it for
- Self-checking references before submitting systematic reviews and meta-analyses.
- Auditing PMID / DOI lists in AI-generated manuscripts.
- Citation QA for medical popular science, teaching materials, and internal knowledge bases.
Usage Notes
- When
--pmidsis used solely for existence checks, it is not equivalent to “citation correct”; to determine mismatch, claims such as title must be provided (--claims-fileor parsed context). - Before the final draft, it is recommended to add
--no-cacheto avoid being misled by old caches regarding newly indexed or retracted statuses. - For large batches (hundreds of entries),
--verify-doiand--suggestwill significantly increase request counts; it is advisable to do a sweep first, then deep-verify flagged entries. - Citation context parsing is heuristic; unconventional formatting may lead to incorrect parsing; use structured claims for precise scenarios.
- The tool connects to official APIs such as
eutils.ncbi.nlm.nih.gov,www.ebi.ac.uk,api.crossref.org,api.openalex.org,export.arxiv.org; reports and caches are written locally (default cache directory~/.cache/pubmed-verifier/, can be disabled with--no-cache).
Conclusion¶
Batch Verification of PubMed Literature Citations advances the check from “Does the PMID exist?” to “Does it point to the correct paper?” With five-state results and exportable HTML / JSON reports, it is suitable for initiating tasks via natural language in Agents, as well as for pre-submission batch processing using the same CLI. Official address:
https://api.skillhub.cn/user_481397b5/pubmed-verifier