Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Navigate MeSH vocabulary for precise PubMed and MEDLINE searches
.claude/skills/brycewang-stanford-mesh-terms-guide/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-14 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-17 | ✗→✓ | ▲ Improved | -6% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 26% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 74% | 0% |
| case-06 | ✓→✓ | = Same ✓ | 70% | 0% |
A skill for using Medical Subject Headings (MeSH) to construct precise and comprehensive biomedical literature searches. Covers MeSH tree structure, subheadings, explosion, major topics, and strategies for combining MeSH with free-text terms.
MeSH is a hierarchical controlled vocabulary maintained by the National Library of Medicine. Every article indexed in MEDLINE/PubMed is assigned MeSH terms by trained indexers. Using MeSH ensures you capture articles that discuss a concept even when authors use different terminology.
MeSH terms are organized in a tree with up to 13 hierarchical levels.
Example tree path for "Breast Neoplasms":
Neoplasms [C04]
Neoplasms by Site [C04.588]
Breast Neoplasms [C04.588.180]
Breast Neoplasms, Male [C04.588.180.260]
Inflammatory Breast Neoplasms [C04.588.180.390]
Phyllodes Tumor [C04.588.180.610]
A term can appear in multiple tree branches.
"Diabetes Mellitus, Type 2" appears under both:
- Endocrine System Diseases
- Metabolic Diseases# Exploded search (default in PubMed):
"Breast Neoplasms"[MeSH]
-> Retrieves articles indexed with "Breast Neoplasms"
AND all narrower terms underneath it
# Non-exploded search:
"Breast Neoplasms"[MeSH:NoExp]
-> Retrieves ONLY articles indexed with "Breast Neoplasms" itself
Does NOT include narrower terms like Inflammatory Breast NeoplasmsStep 1: Go to the MeSH Browser (meshb.nlm.nih.gov)
Step 2: Enter your concept (e.g., "heart attack")
Step 3: Review the mapped term: "Myocardial Infarction"
Step 4: Check Entry Terms (synonyms that map to this heading)
Step 5: Examine the tree position and scope note
Step 6: Decide whether to explode or restrictMeSH subheadings refine a concept by specifying an aspect:
pythondef build_mesh_query(mesh_term: str, subheadings: list[str] = None, major_topic: bool = False, explode: bool = True) -> str: """ Build a PubMed MeSH search fragment. Args: mesh_term: The MeSH heading subheadings: List of MeSH subheadings (e.g., 'therapy', 'diagnosis') major_topic: If True, restrict to articles where this is a major topic explode: If False, do not include narrower terms """ field = "MeSH" if major_topic: field = "Majr" if not explode: field += ":NoExp" if subheadings: sub_parts = " OR ".join( f'"{mesh_term}/{sh}"[{field}]' for sh in subheadings ) return f"({sub_parts})" return f'"{mesh_term}"[{field}]' # Example: Diabetes treatment as a major topic print(build_mesh_query( "Diabetes Mellitus, Type 2", subheadings=["drug therapy", "therapy"], major_topic=True ))
| Purpose | Subheadings | |---------|-------------| | Treatment | /therapy, /drug therapy, /surgery, /rehabilitation | | Etiology | /etiology, /complications, /chemically induced | | Diagnosis | /diagnosis, /diagnostic imaging, /pathology | | Prevention | /prevention and control | | Epidemiology | /epidemiology, /mortality, /statistics and numerical data | | Genetics | /genetics, /metabolism |
A robust search combines both MeSH terms and free-text keywords to capture all relevant articles, including those not yet indexed:
# Block 1 - MeSH terms for Concept A
("Myocardial Infarction"[MeSH] OR "Acute Coronary Syndrome"[MeSH])
# Block 2 - Free-text terms for Concept A
("myocardial infarction"[tiab] OR "heart attack"[tiab] OR
"acute coronary"[tiab] OR "STEMI"[tiab] OR "NSTEMI"[tiab])
# Block 3 - Combine with OR
(Block 1 OR Block 2)
# Repeat for Concept B, then AND the concept blocks togetherPubMed articles are often available before MeSH indexing is complete. These articles will not be found by MeSH-only searches. Always include free-text (Title/Abstract) terms alongside MeSH to capture recent publications:
"Diabetes Mellitus, Type 2"[MeSH]
OR
("type 2 diabetes"[tiab] OR "T2DM"[tiab] OR "non-insulin dependent"[tiab])Record the MeSH database version date, all terms used with their tree numbers, explosion status, and subheadings. This allows the search to be replicated exactly at a later date.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | pass→pass | 9,988 | 37,748 | +278% | 1 | 1 | 0% | 1,420 | 2,464 | +74% | 0 | 0 | — |
case-06 | pass→pass | 12,809 | 11,282 | -12% | 1 | 1 | 0% | 1,837 | 3,117 | +70% | 0 | 0 | — |
case-12 | pass→pass | 8,642 | 6,171 | -29% | 1 | 1 | 0% | 1,374 | 2,241 | +63% | 0 | 0 | — |
case-02 | pass→pass | 3,875 | 4,838 | +25% | 1 | 1 | 0% | 673 | 2,050 | +205% | 0 | 0 | — |
case-03 | pass→pass | 4,469 | 5,192 | +16% | 1 | 1 | 0% | 800 | 2,222 | +178% | 0 | 0 | — |
case-04 | pass→pass | 7,483 | 7,345 | -2% | 1 | 1 | 0% | 1,324 | 2,454 | +85% | 0 | 0 | — |
case-05 | pass→pass | 12,783 | 5,785 | -55% | 1 | 1 | 0% | 1,481 | 2,404 | +62% | 0 | 0 | — |
case-07 | pass→pass | 7,646 | 4,544 | -41% | 1 | 1 | 0% | 1,189 | 2,292 | +93% | 0 | 0 | — |
case-08 | pass→pass | 14,729 | 12,689 | -14% | 1 | 1 | 0% | 2,266 | 3,242 | +43% | 0 | 0 | — |
case-09 | pass→pass | 9,581 | 38,419 | +301% | 1 | 1 | 0% | 1,525 | 2,886 | +89% | 0 | 0 | — |
case-10 | pass→pass | 4,163 | 3,915 | -6% | 1 | 1 | 0% | 640 | 1,859 | +190% | 0 | 0 | — |
case-11 | pass→pass | 13,308 | 12,981 | -2% | 1 | 1 | 0% | 2,204 | 3,191 | +45% | 0 | 0 | — |
case-13 | pass→pass | 12,163 | 10,748 | -12% | 1 | 1 | 0% | 2,038 | 3,166 | +55% | 0 | 0 | — |
case-14 | fail→pass | 12,996 | 11,881 | -9% | 1 | 1 | 0% | 2,274 | 3,443 | +51% | 0 | 0 | — |
case-15 | pass→pass | 13,302 | 9,882 | -26% | 1 | 1 | 0% | 2,086 | 3,049 | +46% | 0 | 0 | — |
case-16 | pass→pass | 8,283 | 7,583 | -8% | 1 | 1 | 0% | 1,659 | 2,675 | +61% | 0 | 0 | — |
case-17 | fail→pass | 15,172 | 4,629 | -69% | 1 | 1 | 0% | 2,047 | 1,924 | -6% | 0 | 0 | — |
case-18 | pass→pass | 13,922 | 4,809 | -65% | 1 | 1 | 0% | 1,919 | 2,250 | +17% | 0 | 0 | — |
case-19 | fail→pass | 16,738 | 14,173 | -15% | 1 | 1 | 0% | 2,722 | 3,432 | +26% | 0 | 0 | — |
case-20 | pass→pass | 4,657 | 3,175 | -32% | 1 | 1 | 0% | 737 | 1,854 | +152% | 0 | 0 | — |
case-21 | pass→pass | 14,577 | 4,052 | -72% | 1 | 1 | 0% | 2,839 | 1,850 | -35% | 0 | 0 | — |
case-22 | pass→pass | 7,868 | 10,583 | +35% | 1 | 1 | 0% | 1,869 | 3,061 | +64% | 0 | 0 | — |
case-23 | pass→pass | 14,886 | 19,717 | +32% | 1 | 1 | 0% | 2,917 | 4,965 | +70% | 0 | 0 | — |
case-24 | pass→pass | 25,516 | 31,056 | +22% | 1 | 1 | 0% | 4,870 | 6,495 | +33% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 24 cases were attempted. The headline lift of +13 percentage points is the difference between those two pass rates over the 24 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.