pm-export

Export PubMed citations and attach PDFs to a local Zotero library.

19|6|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/cookjohn/pm-skills --skill pm-export
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pm-export
Source: https://github.com/cookjohn/pm-skills/tree/main/skills/pm-export
Command: npx skills add https://github.com/cookjohn/pm-skills --skill pm-export

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill automates the tedious process of saving PubMed citations and their full-text PDFs into a local Zotero library or producing MEDLINE/RIS exports, removing manual copy-paste of metadata and one-by-one PDF downloading.

Core Features & Use Cases

  • Fetches PubMed metadata via E-utilities (esummary and efetch) and assembles Zotero-compatible item JSON for journal articles.
  • Supports single-PMID and batch exports from search results, resolves DOI and PMCID, and includes abstracts, authors, keywords, ISSN, and publication types.
  • Pushes metadata to the Zotero Connector using saveItems, downloads PDFs when available with HTTP/content-type checks, and uploads attachments via saveAttachment; uses deterministic session IDs for idempotent saves.
  • Provides a MEDLINE/RIS fallback export for import into other reference managers and includes user-facing troubleshooting messages for Zotero connectivity and read-only libraries.

Quick Start

Export PMID 35641793 to Zotero and attach any available PDFs to the saved item.

Frequently Asked Questions about pm-export

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I export PubMed papers to Zotero with PDFs automatically?

To export PubMed papers to Zotero with PDFs, fetch citation metadata via E-utilities and push it to the Zotero Connector local API, which then downloads available full-text PDFs as attachments. This automates the entire save process for single or batch PMID entries.

Can I save multiple PubMed search results to Zotero at once?

Yes, you can save multiple PubMed search results to Zotero by processing batch PMIDs from your search results. The Skill builds Zotero-compatible items for each entry and uses deterministic session IDs to ensure idempotent saves without creating duplicate library records.

Does exporting PubMed citations to Zotero require the desktop app running?

Exporting PubMed citations to Zotero requires the Zotero Connector local API to be accessible, which typically means the desktop application must be running. The Skill uses saveItems and saveAttachment calls to communicate with the local API and provides troubleshooting messages for connectivity issues.

What citation formats can I export PubMed metadata to besides Zotero?

Besides Zotero, you can export PubMed metadata to MEDLINE or RIS formats. This fallback export allows you to import the citation data, including DOIs, abstracts, and keywords, into other reference managers if you prefer not to use the direct Zotero local API integration.

Why are PDFs missing when I save PubMed entries to my Zotero library?

PDFs are missing when saving PubMed entries to Zotero if no full-text PDF is available or the HTTP retrieval times out. The Skill performs content-type validation and timeout checks during PDF retrieval, only attaching files that successfully pass these HTTP-based content verification checks.

What PubMed metadata fields are included when exporting to Zotero?

When exporting to Zotero, the included PubMed metadata fields are DOIs, PMCIDs, abstracts, authors, keywords, ISSN, and publication types. The Skill fetches this comprehensive metadata via E-utilities esummary and efetch to assemble complete journal article items.