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

Pm Advanced Search

  • 5 installs
  • 17 repo stars
  • Updated March 13, 2026
  • cookjohn/pm-skills

Builds and runs advanced PubMed queries with field qualifiers for author, title, journal, MeSH, date range, and article type.

About

Constructs precise PubMed queries from natural language using field qualifiers and boolean operators. A developer uses it for filtered biomedical literature searches.

  • Translates natural language into PubMed field-qualified query syntax
  • Supports MeSH, date range, and article-type filters

Pm Advanced Search by the numbers

  • 5 all-time installs (skills.sh)
  • Ranked #1,723 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
  • Data as of Jul 29, 2026 (Skillselion catalog sync)
npx skills add https://github.com/cookjohn/pm-skills --skill pm-advanced-search

Add your badge

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

Listed on Skillselion
Installs5
repo stars17
Last updatedMarch 13, 2026
Repositorycookjohn/pm-skills

What it does

Builds and runs advanced PubMed queries with field qualifiers for author, title, journal, MeSH, date range, and article type.

Files

SKILL.mdMarkdownGitHub ↗

PubMed Advanced Search

Construct and execute a PubMed query using field qualifiers, boolean operators, and filters based on the user's natural language description.

Arguments

$ARGUMENTS is a natural language description of the search criteria, e.g.:

  • "搜索 Zhang Wei 在 Nature 上发表的关于 CRISPR 的综述"
  • "Find reviews about CAR-T therapy published after 2020 with IF>10"
  • "Search for clinical trials on COVID-19 vaccines in 2023-2024"

Step 1: Parse search criteria into PubMed query syntax

Map the user's intent to PubMed field tags:

FieldTagExample
Author[AU]Zhang W[AU]
First Author[1AU]Smith J[1AU]
Title words[TI]CRISPR[TI]
Title/Abstract[TIAB]machine learning[TIAB]
Journal[TA]Nature[TA]
MeSH term[MESH]Neoplasms[MESH]
Date range[DP]2020/01:2025/12[DP]
Publication type[PT]Review[PT], Clinical Trial[PT], Meta-Analysis[PT], Systematic Review[PT], Randomized Controlled Trial[PT]
Affiliation[AD]Harvard[AD]
Language[LA]English[LA]
All fields[ALL]cancer[ALL]

Boolean operators: AND, OR, NOT (must be uppercase).

Examples:

  • "Zhang Wei 在 Nature 上的 CRISPR 综述" → Zhang W[AU] AND CRISPR[TI] AND Nature[TA] AND Review[PT]
  • "2020年以后关于 COVID-19 疫苗的临床试验" → COVID-19 vaccine[TIAB] AND Clinical Trial[PT] AND 2020:2026[DP]
  • "IF>10 的癌症免疫治疗系统综述" → cancer immunotherapy[TIAB] AND Systematic Review[PT]

Note: PubMed does not have a built-in impact factor filter. For IF filtering, search first and then the user can check journal IF manually.

Step 2: Navigate

Use mcp__chrome-devtools__navigate_page:

  • url: https://pubmed.ncbi.nlm.nih.gov/?term={URL_ENCODED_QUERY}&size=20

Replace {URL_ENCODED_QUERY} with the constructed query string, URL-encoded.

Step 3: Search + extract (evaluate_script)

Same pattern as pm-search, using the constructed query:

async () => {
  const query = "CONSTRUCTED_QUERY";
  const page = 1, size = 20;
  const retstart = (page - 1) * size;

  const searchResp = await fetch(
    `https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=${encodeURIComponent(query)}&retmax=${size}&retstart=${retstart}&retmode=json&sort=relevance`
  );
  const searchData = await searchResp.json();
  const ids = searchData.esearchresult?.idlist || [];
  const total = parseInt(searchData.esearchresult?.count || '0');
  const queryTranslation = searchData.esearchresult?.querytranslation || '';

  if (ids.length === 0) return { query, queryTranslation, total: 0, results: [] };

  const sumResp = await fetch(
    `https://eutils.ncbi.nlm.nih.gov/entrez/eutils/esummary.fcgi?db=pubmed&id=${ids.join(',')}&retmode=json`
  );
  const sumData = await sumResp.json();

  const results = ids.map((id, i) => {
    const r = sumData.result?.[id] || {};
    const doi = (r.articleids || []).find(a => a.idtype === 'doi')?.value || '';
    return {
      n: retstart + i + 1,
      pmid: id,
      title: r.title || '',
      authors: (r.authors || []).map(a => a.name).join(', '),
      journal: r.fulljournalname || '',
      source: r.source || '',
      pubdate: r.pubdate || '',
      doi,
      pubtype: (r.pubtype || []).join(', ')
    };
  });

  return { query, queryTranslation, total, page, size, results };
}

Step 4: Report

Advanced search: {query}
PubMed translated query: {queryTranslation}
Found {total} results (page {page}):

1. {title}
   PMID: {pmid} | DOI: {doi}
   Authors: {authors}
   Journal: {journal} ({pubdate}) | Type: {pubtype}

2. ...

Always show the queryTranslation so the user can see how PubMed interpreted the query.

Common Publication Types

ChineseEnglishPubMed tag
综述ReviewReview[PT]
系统综述Systematic ReviewSystematic Review[PT]
Meta分析Meta-AnalysisMeta-Analysis[PT]
临床试验Clinical TrialClinical Trial[PT]
随机对照试验RCTRandomized Controlled Trial[PT]
病例报告Case ReportCase Reports[PT]

Notes

  • This skill uses 2 tool calls: navigate_page + evaluate_script
  • The key difference from pm-search is query construction — this skill translates natural language to PubMed syntax
  • queryTranslation in the response shows how PubMed actually interprets the query (MeSH expansion, etc.)

Related skills

This week in AI coding

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

unsubscribe anytime.