一键导入
find-paper-pdf
Find academic papers by author name, institution, and date range via PubMed, then download available PDFs. Trigger via /find-paper-PDF.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Find academic papers by author name, institution, and date range via PubMed, then download available PDFs. Trigger via /find-paper-PDF.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | find-paper-PDF |
| description | Find academic papers by author name, institution, and date range via PubMed, then download available PDFs. Trigger via /find-paper-PDF. |
| metadata | {"author":"Nightwalkie","version":"1.0.0","requires":{"bins":["python3"]},"commands":["/find-paper-PDF"]} |
Find and download academic papers by author, institution, and date range. Searches PubMed with fuzzy author/institution matching, flags field outliers, downloads PDFs via a bundled paper-fetch engine, and reports failed papers with one-click DOI links.
Type /find-paper-PDF to start.
Execute every step in order. Stop and report if a hard failure occurs (network down, Python missing).
Path definitions for this run:
SKILL_DIR = directory containing this SKILL.mdSCRIPTS = SKILL_DIR/scripts/CWD = the user's current working directory (where they invoked the skill)<CWD>/output/Ask the user directly in your response (do NOT use AskUserQuestion). Ask the questions one at a time — wait for the user's reply before asking the next:
Run the bundled search script:
python3 "<SCRIPTS>/pubmed_search.py" \
--author "<user_author>" \
--institution "<user_institution>" \
--date-from "<date_from or empty>" \
--date-to "<date_to or empty>" \
--out "<CWD>/output"
What it does:
"summary": trueThe script does NOT filter by institution or field — it returns everything. The final summary includes a common_affiliations list showing which affiliation strings appear most frequently across all papers. This is the data you need for the next step.
Read through the paper output lines (everything before the summary line). For each paper, look at its affiliations array.
Institution matching (Claude's judgment):
Read the paper's affiliations and decide if this author-at-this-institution plausibly appears on this paper. Use your language understanding:
The common_affiliations list in the summary is a good reference for spotting the author's true affiliations.
Field outlier detection (Claude's judgment):
Read each paper's title and journal. Determine the author's dominant research area (e.g., ophthalmology, myopia). Flag papers that are clearly in a completely different field. Examples of true outliers:
Do NOT over-flag: a myopia researcher publishing on retinal dopamine or scleral biomechanics is still in the same broad field.
After judging, produce two lists:
Extract DOIs from the KEPT papers only. Write them to a temp batch file:
echo "<doi1>" > "<CWD>/output/dois.txt"
echo "<doi2>" >> "<CWD>/output/dois.txt"
...
Then run paper-fetch in batch mode:
python3 "<SCRIPTS>/paper_fetch.py" \
--batch "<CWD>/output/dois.txt" \
--out "<CWD>/output/papers" \
--format text
Important rules when calling paper-fetch (from learned errors):
--batch with a file--overwrite and delete broken files firstCheck which PDFs are valid:
python3 -c "
import os, glob
out = r'<CWD>/output/papers'
for f in sorted(glob.glob(os.path.join(out, '*.pdf'))):
with open(f, 'rb') as fh:
is_pdf = fh.read(4) == b'%PDF'
size_kb = os.path.getsize(f) / 1024
print(f'[{\"OK\" if is_pdf else \"BROKEN\"}] {os.path.basename(f)} ({size_kb:.0f} KB)')
"
Important: Use fh.read(4) == b'%PDF' (4 bytes), NOT fh.read(5) == b'%PDF' (5 bytes — will always fail).
Delete any files that are NOT valid PDFs (broken downloads).
Present a structured summary to the user.
Downloaded papers table:
| Status | PMID | Date | Journal | Title (truncated) | File |
|---|---|---|---|---|---|
| DOWNLOADED | ... | ... | ... | ... | filename.pdf |
| OUTLIER | ... | ... | ... | ... | filename.pdf |
Failed papers table (for any DOI where no PDF was downloaded):
| PMID | Date | Journal | Title | DOI Link |
|---|---|---|---|---|
| ... | ... | ... | ... | https://doi.org/... |
Format DOI links as clickable markdown: [https://doi.org/10.xxx/yyy](https://doi.org/10.xxx/yyy)
If any failed paper is marked as "is_open_access": true by the search script, add a note: "This paper is open access but the publisher's anti-bot system blocked the download. Opening the DOI link in a browser should work."
Summarize by failure reason categories (paywall, too-new, publisher-anti-bot, etc.).
Remove all temporary files created during the run:
rm -f "<CWD>/output/dois.txt" "<CWD>/output/metadata.json" "<CWD>/output/search_results.jsonl"
Keep the downloaded PDFs in <CWD>/output/papers/.
| File | Purpose |
|---|---|
scripts/pubmed_search.py | PubMed search, institution filtering, field outlier detection, dedup |
scripts/paper_fetch.py | Bundled paper-fetch engine (Unpaywall → Semantic Scholar → arXiv → Europe PMC → PMC → bioRxiv → publisher-direct → Sci-Hub) |
python3 fails, tell the user "Python 3 is required. Install it from https://python.org, then try again." and stop.--overwrite.UNPAYWALL_EMAIL and PAPER_FETCH_INSTITUTIONAL=1 as environment variables yourself.<CWD>/output/ and are cleaned up at the end.