All skills
dianel555 avatar

/literature-searcher

@f2b1e79
by dianeldianel555/dskills65 stars
8

Search CrossRef, OpenAlex, PubMed, Semantic Scholar, and optional Scopus; deduplicate results, download open-access PDFs by DOI, classify papers, monitor new results, and analyze coverage. Use when asked to search literature, monitor a topic, download an open-access paper, classify papers, or analyze literature gaps.

Use this Skill: https://skilld.dev/gh/dianel555/dskills/literature-searcher

This session only. Nothing lands on disk.

README.md

≈954 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Literature Searcher

用于检索学术文献、下载开放获取 PDF,以及按关键词和期刊对论文分类的 Python 标准库工具包。

功能

  • 跨平台检索:CrossRef、OpenAlex、PubMed、Semantic Scholar,以及需要 Elsevier 密钥的 Scopus
  • 结果去重:优先按 DOI,否则按标题
  • PDF 下载:通过 Unpaywall 获取开放获取版本;scihub-cli 回退需显式启用
  • 论文分类:PaperClassifier 接受 Paper 对象或字典
  • 增量监控:记录已见论文、输出新增论文及分类报告
  • 洞察分析:统计搜索结果的来源、年份和分类覆盖度

运行

此工具仅使用 Python 标准库。在技能目录中运行:

cd skills/literature-searcher
python -m literature_searcher.searcher search "ionogel flexible sensor" --limit 10
python -m literature_searcher.searcher download --doi 10.1016/j.cej.2022.135593

配置并运行监控:

New-Item -ItemType Directory -Force data | Out-Null
Copy-Item monitor_config.json.template data/monitor_config.json

在 data/monitor_config.json 填写 queries 后:

python -m literature_searcher.monitor --config data/monitor_config.json
python -m literature_searcher.insight --input data/monitor_results.json

搜索时可重复传入 --platform,并可使用 --year-from 和 --year-to 限制年份:

python -m literature_searcher.searcher search "solid electrolyte" \
  --platform openalex --platform semantic_scholar --year-from 2020

默认只尝试 Unpaywall。需要启用可选的 scihub-cli 回退时,显式传入:

python -m literature_searcher.searcher download --doi 10.1016/j.cej.2022.135593 \
  --scihub-fallback auto

配置

复制 .env.example 为 .env 并填写需要的变量。包会在初始化时从技能目录加载 .env,但不会覆盖已经由 shell 导出的环境变量:

Variable Required Purpose
LITERATURE_EMAIL Recommended CrossRef、OpenAlex 与 Unpaywall 使用的联系邮箱
OPENALEX_EMAIL Optional 覆盖 OpenAlex 的联系邮箱
OPENALEX_API_KEY Optional OpenAlex API key
SEMANTIC_SCHOLAR_API_KEY Optional Semantic Scholar API key
ELSEVIER_API_KEY Scopus only Scopus API key
DEEPLX_ENDPOINT Monitor default translation User-provided HTTPS DeepLX endpoint
LOCAL_LLM_BASE_URL Local-LLM translation OpenAI-compatible local API base URL
LOCAL_LLM_MODEL Local-LLM translation Model name exposed by the local service

PowerShell 也可以临时覆盖 .env 中的配置:

$env:LITERATURE_EMAIL = "you@example.com"
$env:OPENALEX_API_KEY = "..."
$env:DEEPLX_ENDPOINT = "https://translate.example.com/translate"

监控默认使用无需 DeepL key 的在线 DeepLX。设置 DEEPLX_ENDPOINT 为在线 HTTPS 端点即可。也可设置 LOCAL_LLM_BASE_URL 与 LOCAL_LLM_MODEL,并传入 --translator local_llm 使用本机 OpenAI 兼容服务;翻译失败不会终止检索,错误会记录在监控 JSON 输出中。

Python API

from literature_searcher.classifier import PaperClassifier
from literature_searcher.searcher import merge_and_deduplicate, search_papers

results = search_papers("ionogel sensor", platforms=["crossref", "openalex"], limit=10)
papers = merge_and_deduplicate(results)
classification = PaperClassifier().classify({"title": papers[0].title})

布局

literature_searcher/
├── __init__.py
├── searcher.py
├── crossref_searcher.py
├── openalex_searcher.py
├── pubmed_searcher.py
├── semantic_scholar_searcher.py
├── scopus_searcher.py
├── downloader.py
├── monitor.py
├── classifier.py
└── insight.py

Source: SKILL.md on GitHub

1 warning18d3 checks · Risk SAFE
  • Gen Agent Trust Hub18d

    The skill is safe to use and follows security best practices, such as sanitizing filenames and using controlled command execution. It has an inherent attack surface for indirect prompt injection as it processes external academic literature data and supports automated translation.

  • Socket18d

    No alerts

  • Snyk18d

    Risk: MEDIUM · 1 issue

Signed by skilld at f2b1e79. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub last week.

Activeupdated 2 months ago

README badge

README badge for dianel555/dskills/literature-searcher