aperivue/medsci-skills/search-lit
Claude Code and agent skill by aperivue/medsci-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when finding papers or building a reference list. Searches PubMed, Semantic Scholar and bioRxiv/medRxiv, includes only references verified through an API, and generates BibTeX. Auditing an existing reference list is /verify-refs.
Install
npx vskill@latest install aperivue/medsci-skills/search-litSKILL.md
The same SKILL.md was published earlier as aperivue/medsci-skills/search-lit.
Literature Search Skill
Every reference you produce must come from a live database result — never generate a citation from memory alone, because a recalled citation can look real and not exist.
Search Tools: MCP (Primary) + E-utilities (Fallback)
Primary: MCP Tools (Claude.ai Remote)
| Database | MCP Tool | Purpose | |
|---|---|---|---|
| PubMed | mcp__claude_ai_PubMed__search_articles | Search by query, MeSH terms | |
| PubMed | mcp__claude_ai_PubMed__get_article_metadata | Full metadata for a PMID | |
| PubMed | mcp__claude_ai_PubMed__find_related_articles | Related articles for a PMID | |
| PubMed | mcp__claude_ai_PubMed__lookup_article_by_citation | Verify a citation | |
| PubMed | mcp__claude_ai_PubMed__convert_article_ids | Convert between PMID/DOI/PMCID | |
| Semantic Scholar | mcp__claude_ai_Scholar_Gateway__semanticSearch | Semantic search across all fields | |
| bioRxiv/medRxiv | mcp__claude_ai_bioRxiv__search_preprints | Search preprint servers | |
| bioRxiv/medRxiv | mcp__claude_ai_bioRxiv__get_preprint | Full preprint metadata | |
| CrossRef | WebFetch with https://api.crossref.org/works/{DOI} | DOI verification |
Fallback: NCBI E-utilities (Direct API via Bash)
If any mcp__claude_ai_PubMed__* call returns an error containing "terminated", "not found", "not available", or "not connected", switch ALL subsequent PubMed calls in this session to the bundled E-utilities scripts. Do not retry MCP after a disconnect — it will not recover within the same conversation.
The script sleeps 350 ms between calls (NCBI allows 3 requests/s without an API key, 10/s with NCBI_API_KEY); keep batch calls sequential.
| MCP Tool | E-utilities Command | Parser Mode | |
|---|---|---|---|
search_articles | search <query> [retmax] | esearch | |
get_article_metadata | fetch <pmids> | efetch or bibtex | |
find_related_articles | related <pmid> [retmax] | esummary | |
lookup_article_by_citation | cite_lookup <title> | esearch → fetch | |
convert_article_ids | Not available (use CrossRef DOI lookup) | — |
Workflow
Phase 1: Search Strategy
- Get the research topic, question, or manuscript section that needs references.
- Build the query from the key concepts (Population, Intervention/Exposure, Comparison, Outcome),
with MeSH terms for PubMed: (concept1 OR synonym1) AND (concept2 OR synonym2).
- Set scope: date range (default: last 10 years unless the user specifies), article types, and
language (default: English).
- Present the Boolean query, databases, and filters to the user.
Gate: Wait for user approval before running searches.
Phase 2: Execute Search
- Search PubMed (
search_articles, Boolean query), Semantic Scholar (semanticSearch, natural
language query), and bioRxiv/medRxiv (search_preprints) when preprints are relevant.
- Deduplicate across databases by DOI or title similarity.
- Present the results in this table, and write the same rows to
references/search_results.tsv:
- Ask the user to select which papers to include.
Record what the source said existed, not only what you downloaded
A wrong haul raises no error, and a PRISMA flow built on a wrong number is fiction that nothing downstream contradicts. Check both of these:
- A count that equals a page cap exactly. Every source reports a total:
esearchresult.count, opensearch:totalResults, meta.count. Record `api_total` beside `downloaded`, and fail loudly when `downloaded < api_total`, or when `downloaded` equals a page or loop cap exactly (e.g. a loop's own if start >= 2000: break reporting 2,000 records). Print TRUNCATED and refuse to write the search record.
- A boolean that was never applied. OpenAlex's
search=is a relevance-ranked free-text
parameter that silently ignores AND/OR; filter=title_and_abstract.search: honours them. Run the query once more with one mandatory clause negated. If the hit count does not drop, the boolean is being ignored — the engine is ranking, not filtering.
PubMed via E-utilities is the one place where the naive pattern is safe. Everywhere else, do both.
A DOI in a screening row is not necessarily that row's DOI
When the pipeline filled a doi column (matched against Crossref by title similarity) rather than receiving it with the record, a wrong match is a valid, resolvable DOI for a different paper. Resolve it and read the title back before any decision rests on it:
DOI_NOT_THIS_RECORD is a DOI that resolves to another paper; DOI_IS_CONTAINER resolves to an issue, supplement or proceedings rather than an article; DOI_IS_UPDATE_NOTICE resolves to a correction, erratum or retraction notice (Crossref update-to) rather than to the article it updates; DOI_UNRESOLVED is reported rather than dropped. This runs at screening, where a wrong DOI is still cheap; /verify-refs audits a finished reference list.
Phase 2.5: Citation Searching (Snowballing)
Optional; recommended for systematic reviews and thorough background work (PRISMA item 7, "records identified through citation searching"). Expand a seed set along the citation graph with the Semantic Scholar Graph API helper:
- Directions:
backward(references the seeds cite),forward(papers citing the seeds),
similar (S2 recommendations), or all (default). Dedup is against the --pool and within the harvested set, by DOI and normalized title.
- Trust flag: candidates are written
verified=false+verified_by=semantic_scholar. Run
/verify-refs (or Phase 4 verification) on each before citing it.
- Output contract: appends to
references/library.bibonly; the script hard-refuses
manuscript/_src/refs.bib.
- PRISMA line: the script prints `Records identified through citation searching (snowballing):
N raw (backward=…, forward=…, similar=…); after dedup against existing pool: M new candidates.` Record M in the PRISMA flow's citation-searching box.
- Incomplete runs: when any seed/direction fetch fails, or the source says more records exist
past --limit (a next page), the script prints a FAILED or TRUNCATED line per seed/direction, ends the PRISMA line with INCOMPLETE, and exits 1. Those counts are a lower bound. Do not record them; re-run (or raise --limit) until the run exits 0.
Phase 3: Deep Read
For each selected paper, retrieve full metadata (get_article_metadata for PubMed, get_preprint for bioRxiv) and extract the study design, sample size/dataset, key methods, primary findings (with specific numbers), and the authors' stated limitations. For several papers, present a literature matrix for review:
Phase 4: Citation Management
Verification
- NEVER fabricate a DOI or PMID. If you cannot find one, mark the reference
[UNVERIFIED - NEEDS MANUAL CHECK].
- Cross-check every reference against the API result: first and last author, publication year,
journal, article title (exact, not paraphrased), and volume/pages when available. Flag each field that does not match.
- Confirm each DOI resolves with WebFetch
https://api.crossref.org/works/{DOI}(on CrossRef
errors, follow Error Handling).
BibTeX Generation
Generate an entry for every reference, verified or not, with an explicit verified flag:
verified (required on every entry) | Meaning | |
|---|---|---|
true | DOI or PMID confirmed via PubMed/CrossRef; title, authors, year all match | |
false | Parsed from text, but the API lookup failed or returned a mismatch; the manuscript MUST show [UNVERIFIED - NEEDS MANUAL CHECK] | |
manual | User explicitly added it despite the lookup failure; still unverified |
verified_by lists the confirming sources (pubmed, crossref, semantic_scholar, or a combination); verified_on is the ISO date of the most recent successful verification. No downstream script reads these fields — /verify-refs re-checks every entry — so they record trust rather than grant it.
BibTeX key convention: FirstAuthorLastName_Year_OneWord (e.g., Kim_2024_Validation). The key is provisional: Better BibTeX assigns the citable key when /lit-sync imports the entry into Zotero.
Output
- Append the entries to
references/library.bib(do not overwrite) — the candidate pool
/lit-sync imports into Zotero. NEVER write to manuscript/_src/refs.bib, because /lit-sync (via Better BibTeX) is its sole writer.
- Print a summary with verification status:
Phase 4b: Zotero Library Integration
Importing into Zotero belongs to /lit-sync, which owns Zotero writes and references/zotero_collection.json: hand it references/library.bib. If a Zotero MCP server is connected, you may read from it here — zotero_search_items (by DOI) to mark candidates already in the library, zotero_get_annotations to reference the user's prior reading notes.
Phase 5: Full-Text Retrieval
Delegate to /fulltext-retrieval, the single home of the open-access cascade; do not re-implement OA fetching here. Pass the verified candidate DOIs from references/library.bib:
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/search-lit/SKILL.md
Popularity
- Repository stars
- 315
- Repository forks
- 75
- Repository npm downloads, 7 days
- 1,316
- 7-day trend score
- 47
Stars and forks are for the whole GitHub repository, not this skill alone. Downloads are for the repository's npm package. Refreshed 23 Sep 2026, 2 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/aperivue/medsci-skills/search-lit)