Skip to content

Python library for mass spectrometry spectra: import, filter, score similarity, and build pipelines.

CCM score
65 of 100
skills.sh installs
214
GitHub stars
34.3K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers spectrum import and export for mzML, MGF, MSP, JSON, and Pickle, plus metabolomics-USI references
  • Includes peak and metadata filters for harmonizing names, deriving InChI and SMILES, and normalizing intensities
  • Provides cosine, modified cosine, neutral-loss, fingerprint, and metadata similarity scoring through calculate_scores
  • Designed for metabolomics workflows that match unknown spectra against reference libraries and cluster by similarity

Install

$ npx -y skills add davila7/claude-code-templates --skill matchms -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

Matchms

Overview

Matchms is an open-source Python library for mass spectrometry data processing and analysis. Import spectra from various formats, standardize metadata, filter peaks, calculate spectral similarities, and build reproducible analytical workflows.

Core Capabilities

1. Importing and Exporting Mass Spectrometry Data

Load spectra from multiple file formats and export processed data:

from matchms.importing import load_from_mgf, load_from_mzml, load_from_msp, load_from_json
from matchms.exporting import save_as_mgf, save_as_msp, save_as_json

# Import spectra
spectra = list(load_from_mgf("spectra.mgf"))
spectra = list(load_from_mzml("data.mzML"))
spectra = list(load_from_msp("library.msp"))

# Export processed spectra
save_as_mgf(spectra, "output.mgf")
save_as_json(spectra, "output.json")

Supported formats:

  • mzML and mzXML (raw mass spectrometry formats)
  • MGF (Mascot Generic Format)
  • MSP (spectral library format)
  • JSON (GNPS-compatible)
  • metabolomics-USI references
  • Pickle (Python serialization)

For detailed importing/exporting documentation, consult references/importing_exporting.md.

2. Spectrum Filtering and Processing

Details

Repository
github.com/davila7/claude-code-templates
Categories
Data Science & Analytics, Research & Academic
First seen
Jun 3, 2026

Questions

What does the matchms skill do?

The matchms skill processes mass spectrometry data in Python. It imports mzML, MGF, MSP and JSON spectra, standardizes metadata, filters peaks, and calculates spectral similarities such as cosine and modified cosine for metabolomics work.

How do I install the matchms skill?

Run npx -y skills add davila7/claude-code-templates --skill matchms -y in a project to install it. Once installed, the matchms skill lets the agent load spectra, apply filters and compare spectra against reference libraries.

Who is the matchms skill for?

The matchms skill is for developers and researchers working with mass spectrometry and metabolomics data. It covers spectral similarity, metadata harmonization and compound identification for MS data processing pipelines.

What does the matchms skill need to run?

The matchms skill relies on the matchms Python library, installed with uv pip install matchms. For SMILES and InChI processing, the chemistry extra is installed with uv pip install matchms[chemistry].

Which category does the matchms skill belong to?

The matchms skill sits in the Data Science and Analytics category. Its own focus is spectral similarity scoring, peak filtering and metadata harmonization for mass spectrometry files.

More from davila7/claude-code-templates

All 398