Parse HMDB (Human Metabolome Database) local XML for metabolite info, chemical properties, biological context, disease links, spectra, and cross-DB mapping. No REST API — uses ~6 GB XML download. Use drugbank-database-access for drugs; pubchem-compound-search for live lookups.
SkillScore91Maintained
Automatic
◆Research pack
Last verified 8/24/2026
What it changes
Passed 20 of 22 test cases with the skill, and 14 of 22 without it.
Without skill64%
With skill91%
Checks it passed that the model alone missed
The code filters spectra elements where the type contains 'NMR'.
The code filters spectra elements where the spectrum type contains 'MS'.
The code defines a namespace dictionary mapping 'hmdb' to 'http://www.hmdb.ca'.
and 5 more in the full report
6 fixed14 passed either way2 still failing0 broke
Pass-rate lift
+27 pp
Tokens
+221%
Agent turns
0%
Response time
-31%
Model gemini-3.6-flashMeasured 8/24/2026v120 of 22 cases passed with skill
Tokens, turns and time describe resource use, not a dollar price.
See it in action
One of 6 test cases the skill fixed. Same model, same prompt, with and without the skill.
1 of 6
Prompt
Write a Python function using xml.etree.ElementTree to extract the chemical formula and monoisotopic molecular weight from an HMDB metabolite XML node. The XML file uses the standard HMDB namespace.
What was checked, without and with the skill
Checked
Without skill
With skill
The code defines a namespace dictionary mapping 'hmdb' to 'http://www.hmdb.ca'.
Missed
Passed
The code passes the namespace dictionary as an argument to element search methods.
Missed
Passed
case-02 · gemini-3.6-flash · 8/24/2026 · answers are capped and redacted
What's inside
The instructions your model reads when the skill loads.
SKILL.md548 linessingle file
HMDB Database — Local XML Access
Overview
Query the Human Metabolome Database (HMDB, 220,000+ metabolite entries) by parsing locally downloaded XML with Python's ElementTree. Covers metabolite lookup, chemical properties, biological context (pathways, enzymes, biofluids), disease/biomarker associations, spectral data for metabolite identification, and cross-database ID mapping to KEGG, PubChem, ChEBI, and DrugBank.
When to Use
Looking up metabolite information (description, chemical class, cellular location) by HMDB ID or name
Retrieving chemical properties (molecular weight, formula, SMILES, InChI, logP, PSA) for metabolomics analysis
Finding pathway associations and enzyme links for a set of metabolites
Identifying biofluid/tissue locations of metabolites (blood, urine, CSF, saliva)
Querying disease associations and normal/abnormal concentration ranges for biomarker discovery
Extracting NMR or MS spectral peak lists for metabolite identification
Mapping HMDB IDs to KEGG, PubChem, ChEBI, DrugBank, or other databases
For drug-specific data (interactions, targets, pharmacology) use drugbank-database-access instead
For live compound property queries without downloading use pubchem-compound-search instead
Prerequisites
HMDB XML download: Register at https://hmdb.ca/downloads — download hmdb_metabolites.xml.zip (~6 GB uncompressed)
Python packages: lxml (faster XPath) or standard xml.etree.ElementTree, pandas
No public REST API: HMDB has no programmatic REST API. All access is via local XML parsing or the web interface
R package (optional): hmdbQuery on CRAN provides some query wrappers but is limited and outdated
Rate limits: N/A for local XML parsing. The web interface has no documented rate limits but is not intended for scraping
pip install lxml pandas
Quick Start
import xml.etree.ElementTree as ET
NS = {'hmdb': 'http://www.hmdb.ca'}
tree = ET.parse('hmdb_metabolites.xml') # 60-120s for full XML
root = tree.getroot()