Communitygithub.com

PubMedデータベース

PubMedおよびNCBI E-utilitiesの検索ワークフローを直接実行し、生物医学文献、MeSHクエリ、PMID検索、引用情報取得、APIベースの文献モニタリングを実現します。一般のウェブ検索ではなく生物医学文献が必要なタスクに使用します。

PubMedデータベース とは?

このスキルは、PubMedおよびNCBI E-utilitiesを活用した生物医学文献検索の専門的なワークフローを提供します。MeSH用語、フィールドタグ、日付範囲、論文タイプなどを駆使したクエリ構築、PMIDのルックアップ、抄録や出版メタデータの取得、関連引用情報の検索をサポートします。特に系統的レビューやメタアナリシスといった再現性が求められる検索パスにおいて、正確な検索文字列の記録とAPIベースの自動化を重視しています。PythonやシェルからのE-utilities直接呼び出しにも対応し、環境変数によるAPIキー管理やレート制限の遵守を推奨します。出力管理では検索日、フィルタ、結果件数などをテーブル形式で記録し、再現性を確保します。Claude CodeやCursor、CodexなどのAIエージェント環境で、一般ウェブ検索ではなくPubMed固有の生物医学文献が必要なタスクに最適です。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/scientific-db-pubmed-database

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

PubMedデータベース は何をしますか?

このスキルは、一般のウェブ検索ではなく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)

バッチ処理では、URL経由で非常に長いPMIDリストを渡す代わりに、NCBIヒストリーサーバーパラメータ(usehistory=y、WebEnv、query_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以外の応答を適切に処理していますか?
  • レート制限は尊重されていますか?

参考文献

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

関連スキル