Pmc official download

From aipoch/medical-research-skills · View interactive version

Pmc official download is an AI agent skill from the GitHub repository aipoch/medical-research-skills. Download PubMed/PMC literature using officially permitted PMC methods. Whenever the user wants to download PMC full text, batch-retrieve PMC Open Access Subset articles, save full text corresponding to PMID/PMCID locally, or needs to determine whether a PubMed article can be l...

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

PMC Official Literature Download Skill

Skill Objective

Converge "download PubMed literature" requests into a single legal, traceable PMC workflow:

The core of this skill is not "get any full text as fast as possible" but rather "only obtain legally accessible PMC content through officially permitted methods."

Trigger Scenarios

Use this skill first when the user has requests like:

If the user mentions Sci-Hub, mirror sites, bulk web scraping, bypassing restrictions, or similar approaches, refuse those paths directly and explain feasible alternatives using official PMC methods.

Permitted Official Channels

Only use the following official PMC channels:

These are services explicitly permitted by PMC for automated retrieval or downloading. Do not use any other automated scraping methods.

Workflow

Step 1: Confirm What the User Actually Needs

First confirm three things:

If the user only provides a PMID, first map it to a PMCID, because whether it can be legally downloaded from PMC depends on whether the article exists in the PMC accessible collection.

Step 2: Determine Whether Legal Download is Possible

First determine whether the article belongs to a PMC accessible collection:

If not in these collections, do not attempt to bypass restrictions or look for unofficial sites.

State directly:

Step 3: Select the Official Method

Choose the most appropriate official channel by scenario:

Notes:

Step 4: Leave an Audit Trail When Saving Locally

When downloading, save the following information whenever possible:

Recommended output directory:

pmc-downloads/<identifier>/

If writing JSON metadata, use UTF-8 encoding and preserve original Chinese text — do not force-escape Chinese characters.

Recommended Single-Article Download Method

If the user wants full text for a single PMID / PMCID and accepts XML or JSON, prefer the helper script bundled with this skill:

python scripts/download_pmc_bioc.py

This script only uses the official PMC BioC API and is suitable for downloading the machine-readable version of a single publicly accessible full-text article.

Recommended Batch Download Method

If the user wants to batch-pull PMC public collections, follow these principles:

Output Format

When answering the user, include the following information whenever possible:

Prohibited Actions

Failure Handling

If an official channel does not return content, troubleshoot in the following order:

  1. Check if the identifier is incorrect
  2. Check if the article is not in the PMC accessible collection at all
  3. Check if the target format is not supported by that service
  4. Check if the current article has license restrictions

If still failing, honestly inform the user of the reason it cannot be downloaded and provide official alternative paths.

Practical Pitfalls

These are the most common gotchas with this skill — pay special attention when handling:

Command Line Usage

Prefer the unified entry point — do not rely on modifying constants at the top of scripts, and do not make yourself remember two script names:

python scripts/download_pmc.py --pmcid PMC13011518 --pmcid PMC11656652 --pmcid PMC11787101
python scripts/download_pmc.py --identifier PMC11787101

If the user has already provided a set of PMCIDs, PMIDs, or download directory, pass them directly to download_pmc.py rather than temporarily modifying code. Only fall back to the underlying scripts when you explicitly need to debug BioC or PDF details separately.

When to Use

When Not to Use

Required Inputs

| Field | Required | Format/Source | Example | If Missing |

|---|---|---|---|---|

| User task description | Yes | Text | Research question, writing goal, analysis objective | Stop and ask user to provide |

| Primary input material | Depends on task | Text, file path, ID, table, or literature | PMID, PDF, CSV, DOCX, keywords, etc. | Specify which material type is missing |

| Output preference | No | Text | Language, format, target journal, template | Use skill default format |

Output Contract

Failure Handling

User Checkpoints

Input Validation

This skill accepts requests that match the documented purpose of pmc-official-download and include enough context to complete the workflow safely.

Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:

pmc-official-download only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.

Quick Validation

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.