Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
affaan-m avatar

Pubmed Database

  • 1.4k installs
  • 238k repo stars
  • Updated August 5, 2026
  • affaan-m/ecc

This is a copy of pubmed-database by affaan-m - installs and ranking accrue to the original listing.

pubmed-database is a Claude Code skill that queries PubMed and NCBI E-utilities with MeSH terms, field tags, and PMID retrieval for developers who need structured biomedical literature instead of generic web search.

About

pubmed-database is a community skill from affaan-m/ecc that teaches coding agents to search MEDLINE through PubMed and NCBI E-utilities with reproducible Boolean queries. The workflow starts from a research question, splits concepts, and combines synonyms with AND/OR/NOT while applying field tags such as [ti], [ab], [tiab], [au], [ta], and MeSH filters for date or publication type. Developers reach for pubmed-database when they need PMID abstracts, citation metadata, literature monitoring, or systematic-review search paths callable from Python, shell, or any HTTP client. The skill replaces noisy general web search with API-backed biomedical retrieval suitable for life-science tooling, clinical software research, and evidence-backed engineering decisions.

  • Connects Claude, Cursor and other agents directly to the PubMed database
  • Returns structured abstracts, authors, titles, DOIs and publication metadata
  • Enables agents to cite real peer-reviewed papers in research, analysis or medical features
  • 667 developers have installed this integration

Pubmed Database by the numbers

  • 1,402 all-time installs (skills.sh)
  • +85 installs in the week ending Aug 5, 2026 (Skillselion tracking)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/affaan-m/ecc --skill pubmed-database

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs1.4k
repo stars238k
Last updatedAugust 5, 2026
Repositoryaffaan-m/ecc

How do you query PubMed with MeSH and field tags?

Give their coding agent reliable, structured access to biomedical literature from PubMed.

Who is it for?

Developers building life-science tools, evidence reviews, or biomedical agents who need API-grade PubMed access instead of browser search.

Skip if: Developers who only need general programming documentation, non-biomedical news, or paywalled journal PDFs outside PubMed's open metadata.

When should I use this skill?

The user asks to search MEDLINE, construct MeSH queries, fetch PMIDs or abstracts, run systematic-review searches, or call NCBI E-utilities from code.

What you get

Reproducible PubMed search strings, PMID result sets, abstracts, publication metadata, and citation lists ready for monitoring or review pipelines.

  • PubMed query strings
  • PMID result lists
  • abstract and citation metadata

By the numbers

  • Documents 5+ PubMed field tags including [ti], [ab], [tiab], [au], and [ta]

Files

SKILL.mdMarkdownGitHub ↗

PubMed Database

一般的なウェブ検索ではなく PubMed から生物医学文献が必要なタスクにこのスキルを使用します。

使用するタイミング

  • MEDLINE または生命科学文献の検索。
  • MeSH 用語、フィールドタグ、日付、または文献種別を使った PubMed クエリの構築。
  • PMID、アブストラクト、出版メタデータ、または関連引用の検索。
  • 再現可能な検索文字列が必要なシステマティックレビューの検索パスの実行。
  • Python、シェル、または別の HTTP クライアントから直接 NCBI E-utilities を使用。

クエリの構築

研究質問から始め、概念に分割し、ブール演算子で概念を組み合わせます。

concept_1 AND concept_2 AND filter
synonym_a OR synonym_b
NOT exclusion_term

有用な PubMed フィールドタグ:

  • [ti]: タイトル
  • [ab]: アブストラクト
  • [tiab]: タイトルまたはアブストラクト
  • [au]: 著者
  • [ta]: 雑誌タイトル略語
  • [mh]: MeSH 用語
  • [majr]: 主要 MeSH トピック
  • [pt]: 出版種別
  • [dp]: 出版日
  • [la]: 言語

例:

diabetes mellitus[mh] AND treatment[tiab] AND systematic review[pt] AND 2023:2026[dp]
(metformin[nm] OR insulin[nm]) AND diabetes mellitus, type 2[mh] AND randomized controlled trial[pt]
smith ja[au] AND cancer[tiab] AND 2026[dp] AND english[la]

MeSH とサブヘッディング

概念が安定した統制語彙用語を持つ場合は MeSH を優先します。トピックが新しいまたは用語が多様な場合は MeSH とタイトル/アブストラクト用語を組み合わせます。

正しいサブヘッディング構文では、サブヘッディングをフィールドタグの前に置きます:

diabetes mellitus, type 2/drug therapy[mh]
cardiovascular diseases/prevention & control[mh]

[majr] は論文の中心的なトピックである必要がある場合にのみ使用します。精度は向上しますが、関連する研究を見逃す可能性があります。

フィルター

出版種別:

  • clinical trial[pt]
  • meta-analysis[pt]
  • randomized controlled trial[pt]
  • review[pt]
  • systematic review[pt]
  • guideline[pt]

日付フィルター:

2026[dp]
2020:2026[dp]
2026/03/15[dp]

利用可能性フィルター:

free full text[sb]
hasabstract[text]

E-utilities ワークフロー

NCBI E-utilities は再現可能な API ワークフローをサポートします:

1. esearch.fcgi: 検索して PMID を返す。 2. esummary.fcgi: 軽量な記事メタデータを返す。 3. efetch.fcgi: XML、MEDLINE、またはテキストでアブストラクトまたはフルレコードを取得。 4. elink.fcgi: 関連記事とリンクされたリソースを検索。

本番スクリプトにはメールアドレスと API キーを使用します。API キーは環境変数に保存し、コミットされたファイルやコマンド履歴には絶対に入れないでください。

import os
import time
import requests

BASE = "https://eutils.ncbi.nlm.nih.gov/entrez/eutils"


def esearch(query: str, retmax: int = 20) -> list[str]:
    params = {
        "db": "pubmed",
        "term": query,
        "retmode": "json",
        "retmax": retmax,
        "tool": "ecc-pubmed-search",
        "email": os.environ.get("NCBI_EMAIL", ""),
    }
    api_key = os.environ.get("NCBI_API_KEY")
    if api_key:
        params["api_key"] = api_key

    response = requests.get(f"{BASE}/esearch.fcgi", params=params, timeout=30)
    response.raise_for_status()
    time.sleep(0.35)
    return response.json()["esearchresult"]["idlist"]


pmids = esearch("hypertension[mh] AND randomized controlled trial[pt] AND 2024:2026[dp]")
print(pmids)

バッチの場合、非常に長い PMID リストを URL に渡す代わりに、NCBI ヒストリーサーバーパラメーター(usehistory=yWebEnvquery_key)を優先します。

出力の記録

各検索パスについて以下を記録します:

  • 正確な検索文字列
  • 検索したデータベース
  • 検索日
  • 使用したフィルター
  • 結果件数
  • エクスポート形式
  • 手動除外

例:

| データベース | 検索日 | クエリ | フィルター | 結果 |
| --- | --- | --- | --- | ---: |
| PubMed | 2026-05-11 | `sickle cell disease[mh] AND CRISPR[tiab]` | 2020:2026[dp], English | 42 |

レビューチェックリスト

  • フィールドタグは有効な PubMed タグか?
  • 新しいトピックについて MeSH 用語は自由テキストの同義語とペアになっているか?
  • 日付範囲は明示的で適切か?
  • 検索ログにクエリを再現するのに十分な詳細が含まれているか?
  • API キーは環境から読み込まれているか?
  • HTTP コードは解析前に raise_for_status() を呼び出しているか、または 200 以外のレスポンスを処理しているか?
  • レート制限は守られているか?

参考文献

Related skills

How it compares

Choose pubmed-database over generic search skills when queries must target MEDLINE with MeSH, PMIDs, and reproducible Boolean search strings.

FAQ

When should developers use pubmed-database instead of web search?

pubmed-database is for biomedical literature tasks where MEDLINE precision matters, such as MeSH queries, PMID lookups, abstracts, and reproducible systematic-review searches. General web search lacks PubMed field tags and NCBI E-utilities structure.

Which PubMed field tags does pubmed-database document?

pubmed-database documents common PubMed field tags including [ti] for title, [ab] for abstract, [tiab] for title or abstract, [au] for author, and [ta] for journal title abbreviation, combined with Boolean operators and MeSH filters.

Can pubmed-database call NCBI E-utilities from application code?

pubmed-database supports direct NCBI E-utilities usage from Python, shell, or another HTTP client, enabling PMID retrieval, citation metadata, and literature monitoring inside automated research workflows.

AI & Agent Buildingagentsresearchautomation

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.