Skip to content

Mass Spectrometry Matching with matchms

Clean, compare and search tandem mass spectra (MS/MS) against reference libraries

Stars
55,780
Licence
MIT
Files
8 files

What it does

When installed, the agent knows how to use the matchms Python library to load mass spectrometry data files, standardise and clean the spectra, and score how similar unknown spectra are to reference spectra. It also guides the agent to follow current API names, report scoring settings, and avoid common mistakes from older tutorials. It explicitly says similarity scores are evidence rather than proof of a compound's identity, and that LC-MS feature detection or proteomics work should go to pyopenms instead.

Great for

  • Metabolomics or chemistry researchers running MS/MS library searches on MGF, MSP or mzML files
  • Developers building spectral similarity or molecular-network pipelines in Python
  • Students learning how spectral matching and cosine scoring work

Skip it if

  • Compound identification for regulatory or clinical decisions, since similarity scores are not validated identification (the skill itself warns of this)
  • LC-MS feature detection, alignment or proteomics, which the skill says to route to pyopenms
  • Converting vendor raw files directly, which must first be exported to mzML or mzXML

Try asking

  • “Search my unknown MGF spectra against an MSP reference library and give the top 5 matches per query with scores”
  • “Clean and harmonise the metadata of these mzML files, then filter low-peak spectra”
  • “Build a cosine score matrix between two spectral sets and export the top hits to CSV”
  • “Create a molecular-similarity network from these MS/MS spectra”
Step-by-step guide: how to use Mass Spectrometry Matching with matchmsInstall, first run, examples, tips and FAQs

Install in 3 steps

  1. 1

    Download the skill

    The ZIP contains the 8 original files, the MIT licence and an attribution note.

    matchms.zip
  2. 2

    Add it to your agent

    Claude Code (all projects)

    mkdir -p ~/.claude/skills && unzip matchms.zip -d ~/.claude/skills/

    Claude Code / Agent SDK (this project only)

    mkdir -p .claude/skills && unzip matchms.zip -d .claude/skills/

    Claude apps (web/desktop): Settings → Capabilities → Skills → Upload skill, and choose the ZIP.

  3. 3

    Ask for the task

    No special command needed — the agent reads the skill's description and loads it when your request matches. Try one of the prompts above.

Get better results

  • Set the tolerance in Da (absolute m/z), not ppm, and state the units in every report
  • Run scripts/library_search.py with --max-pairs set, since the reference-by-query product can grow very large
  • Never load pickle files from untrusted sources, as unpickling can execute code; the bundled script refuses them

What's inside

  • references/filtering.md
  • references/importing_exporting.md
  • references/migration.md
  • references/similarity.md
  • references/sources.md
  • references/workflows.md
  • scripts/library_search.py
  • SKILL.md

Redistributed unmodified from K-Dense-AI/scientific-agent-skills under the MIT licence. The assessment was drafted with AI from the skill's files on 2026-10-29. Skills can instruct your agent to run code — read SKILL.md and any scripts before installing.