Agent skill

Matchms

by davila7 in davila7/claude-code-templates

Mass spectrometry analysis. An agent skill from davila7/claude-code-templates.

MITAuto-check passed

Install Matchms

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

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install davila7/claude-code-templates matchms --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/davila7/claude-code-templates.git skills-src && mkdir -p .claude/skills && cp -r skills-src/cli-tool/components/skills/scientific/matchms .claude/skills/matchms && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
matchms
GitHub stars
32k
Used in
12 other repos
Token cost
~1.7k tokens
SKILL.md length
336 words
Files
5 (incl. references)
Skills in repo
477
Repo updated
First seen
Licence
MIT

At a glance

Mass spectrometry analysis. An agent skill from davila7/claude-code-templates.

  • Works in 6 steps: Importing and Exporting Mass… → Spectrum Filtering and Processing → Calculating Spectral Similarities → …
  • SKILL.md covers Overview, Core Capabilities, Common Workflows and Installation, plus 1 more section
  • Calls uv

What it does

Matchms is an agent skill from davila7/claude-code-templates. Mass spectrometry analysis. Process mzML/MGF/MSP, spectral similarity (cosine, modified cosine), metadata harmonization, compound ID, for metabolomics and MS data processing.

Its SKILL.md is about 1.7k tokens, which your agent loads only when the skill is triggered. The skill folder holds 5 other files, including reference files (for example `references/filtering.md`, `references/importing_exporting.md` and `references/similarity.md`).

The repository describes itself as: CLI tool for configuring and monitoring Claude Code. The licence is MIT.

Example prompts

  • “/matchms”

Requirements

  • Python 3

Workflow steps

6 steps, taken from the step headings in SKILL.md.

  1. Importing and Exporting Mass Spectrometry Data
  2. Spectrum Filtering and Processing
  3. Calculating Spectral Similarities
  4. Building Processing Pipelines
  5. Working with Spectrum Objects
  6. Metadata Management

What it can do on your machine

Read from SKILL.md and the folder at commit 14680ec. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Shell commands in SKILL.md call:

    • uv

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use uv, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Matchms loads about 1.7k tokens when it runs, and up to ~16k if it reads all its reference files. Until then it costs about 46 tokens; SKILL.md has 336 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~46
When it runs · the whole SKILL.md, loaded when a task matches
~1.7k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~16k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from davila7/claude-code-templates at commit 14680ec, republished under its MIT licence (© davila7). 336 words, ~1,695 tokens.

Download SKILL.mdSave it as .claude/skills/matchms/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
matchms
description
Mass spectrometry analysis. Process mzML/MGF/MSP, spectral similarity (cosine, modified cosine), metadata harmonization, compound ID, for metabolomics and MS data processing.

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:

python
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

Apply comprehensive filters to standardize metadata and refine peak data:

python
from matchms.filtering import default_filters, normalize_intensities
from matchms.filtering import select_by_relative_intensity, require_minimum_number_of_peaks

# Apply default metadata harmonization filters
spectrum = default_filters(spectrum)

# Normalize peak intensities
spectrum = normalize_intensities(spectrum)

# Filter peaks by relative intensity
spectrum = select_by_relative_intensity(spectrum, intensity_from=0.01, intensity_to=1.0)

# Require minimum peaks
spectrum = require_minimum_number_of_peaks(spectrum, n_required=5)

Filter categories:

  • Metadata processing: Harmonize compound names, derive chemical structures, standardize adducts, correct charges
  • Peak filtering: Normalize intensities, select by m/z or intensity, remove precursor peaks
  • Quality control: Require minimum peaks, validate precursor m/z, ensure metadata completeness
  • Chemical annotation: Add fingerprints, derive InChI/SMILES, repair structural mismatches

Matchms provides 40+ filters. For the complete filter reference, consult references/filtering.md.

3. Calculating Spectral Similarities

Compare spectra using various similarity metrics:

python
from matchms import calculate_scores
from matchms.similarity import CosineGreedy, ModifiedCosine, CosineHungarian

# Calculate cosine similarity (fast, greedy algorithm)
scores = calculate_scores(references=library_spectra,
                         queries=query_spectra,
                         similarity_function=CosineGreedy())

# Calculate modified cosine (accounts for precursor m/z differences)
scores = calculate_scores(references=library_spectra,
                         queries=query_spectra,
                         similarity_function=ModifiedCosine(tolerance=0.1))

# Get best matches
best_matches = scores.scores_by_query(query_spectra[0], sort=True)[:10]

Available similarity functions:

  • CosineGreedy/CosineHungarian: Peak-based cosine similarity with different matching algorithms
  • ModifiedCosine: Cosine similarity accounting for precursor mass differences
  • NeutralLossesCosine: Similarity based on neutral loss patterns
  • FingerprintSimilarity: Molecular structure similarity using fingerprints
  • MetadataMatch: Compare user-defined metadata fields
  • PrecursorMzMatch/ParentMassMatch: Simple mass-based filtering

For detailed similarity function documentation, consult references/similarity.md.

4. Building Processing Pipelines

Create reproducible, multi-step analysis workflows:

python
from matchms import SpectrumProcessor
from matchms.filtering import default_filters, normalize_intensities
from matchms.filtering import select_by_relative_intensity, remove_peaks_around_precursor_mz

# Define a processing pipeline
processor = SpectrumProcessor([
    default_filters,
    normalize_intensities,
    lambda s: select_by_relative_intensity(s, intensity_from=0.01),
    lambda s: remove_peaks_around_precursor_mz(s, mz_tolerance=17)
])

# Apply to all spectra
processed_spectra = [processor(s) for s in spectra]
5. Working with Spectrum Objects

The core Spectrum class contains mass spectral data:

python
from matchms import Spectrum
import numpy as np

# Create a spectrum
mz = np.array([100.0, 150.0, 200.0, 250.0])
intensities = np.array([0.1, 0.5, 0.9, 0.3])
metadata = {"precursor_mz": 250.5, "ionmode": "positive"}

spectrum = Spectrum(mz=mz, intensities=intensities, metadata=metadata)

# Access spectrum properties
print(spectrum.peaks.mz)           # m/z values
print(spectrum.peaks.intensities)  # Intensity values
print(spectrum.get("precursor_mz")) # Metadata field

# Visualize spectra
spectrum.plot()
spectrum.plot_against(reference_spectrum)
6. Metadata Management

Standardize and harmonize spectrum metadata:

python
# Metadata is automatically harmonized
spectrum.set("Precursor_mz", 250.5)  # Gets harmonized to lowercase key
print(spectrum.get("precursor_mz"))   # Returns 250.5

# Derive chemical information
from matchms.filtering import derive_inchi_from_smiles, derive_inchikey_from_inchi
from matchms.filtering import add_fingerprint

spectrum = derive_inchi_from_smiles(spectrum)
spectrum = derive_inchikey_from_inchi(spectrum)
spectrum = add_fingerprint(spectrum, fingerprint_type="morgan", nbits=2048)

Common Workflows

For typical mass spectrometry analysis workflows, including:

  • Loading and preprocessing spectral libraries
  • Matching unknown spectra against reference libraries
  • Quality filtering and data cleaning
  • Large-scale similarity comparisons
  • Network-based spectral clustering

Consult references/workflows.md for detailed examples.

Installation

bash
uv pip install matchms

For molecular structure processing (SMILES, InChI):

bash
uv pip install matchms[chemistry]

Reference Documentation

Detailed reference documentation is available in the references/ directory:

  • filtering.md - Complete filter function reference with descriptions
  • similarity.md - All similarity metrics and when to use them
  • importing_exporting.md - File format details and I/O operations
  • workflows.md - Common analysis patterns and examples

Load these references as needed for detailed information about specific matchms capabilities.

© davila7, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (references) in cli-tool/components/skills/scientific/matchms of davila7/claude-code-templates.

  • SKILL.md
  • references/filtering.md
  • references/importing_exporting.md
  • references/similarity.md
  • references/workflows.md

Open the folder on GitHubat commit 14680ec

Used in 12 other repositories

We found 34 copies of this SKILL.md (exact, near-identical or edited) in other folders, from 12 other GitHub owners. This page covers the copy in davila7/claude-code-templates, which our catalogue first saw on October 7, 2026.

Compare with similar skills

Matchms next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Matchms compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Matchms this skilldavila7/claude-code-templates32k12 repos~1.7kAutomated safety check: PassMIT
MatchmsK-Dense-AI/scientific-agent-skills48k1 repos~3.2kAutomated safety check: NotesApache-2.0
Matchmsaipoch/medical-research-skills2k—~1.7kAutomated safety check: PassMIT
Matchms Spectral Matchingjaechang-hits/SciAgent-Skills3701 repos~6.3kAutomated safety check: PassApache-2.0
Pyopenms Mass Spectrometryjaechang-hits/SciAgent-Skills3701 repos~5.9kAutomated safety check: PassBSD-3-Clause
Mass-ULW Workflow Runscode-yeongyu/oh-my-openagent70k—~2.4kAutomated safety check: PassCustom licence

Similar skills

  • Matchms

    K-Dense-AI/scientific-agent-skills

    Processes, cleans, compares, and searches tandem mass spectra with matchms.

    48k GitHub starsUsed in 1 repo~3.2k tokens
    Research & ScienceAuto-check: notes
  • Matchms

    aipoch/medical-research-skills

    Process, clean, and compare mass spectrometry (MS/MS) spectra with Matchms; use when you need reproducible spectral filtering and similarity scoring for metabolomics workflows.

    2k GitHub stars~1.7k tokensUpdated 21 days ago
    Data & AnalyticsAuto-check passed
  • Matchms Spectral Matching

    jaechang-hits/SciAgent-Skills

    MS spectral matching and metabolite ID with matchms. An agent skill from jaechang-hits/SciAgent-Skills.

    370 GitHub starsUsed in 1 repo~6.3k tokens
    Research & ScienceAuto-check passed
  • Pyopenms Mass Spectrometry

    jaechang-hits/SciAgent-Skills

    MS data processing with PyOpenMS for LC-MS/MS proteomics and metabolomics — mzML/mzXML I/O, signal processing (smoothing, peak picking, centroiding), feature detection/linking, peptide/protein ID…

    370 GitHub starsUsed in 1 repo~5.9k tokens
    Research & ScienceAuto-check passed
  • Mass-ULW Workflow Runs

    code-yeongyu/oh-my-openagent

    Drives dependency-ordered multi-agent work through the workflow tool, one run per phase, with planning rules and retry, amend and send recovery.

    70k GitHub stars~2.4k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Testing API For Mass Assignment Vulnerability

    mukul975/Anthropic-Cybersecurity-Skills

    Tests APIs for mass assignment (auto-binding), OWASP API3:2023, by identifying writable endpoints, adding undocumented fields to request bodies (role, isAdmin, price, balance), and checking whether…

    34k GitHub stars~4k tokensUpdated 1 mo ago
    SecurityAuto-check passed

More from davila7/claude-code-templates

All 477 skills in this repo
  • Perplexity Web Search

    davila7/claude-code-templates

    Runs web-grounded searches through Perplexity's Sonar models over OpenRouter for current events, recent literature and cited facts beyond the model's training cutoff.

    32k GitHub starsUsed in 12 repos~3.5k tokens
    Auto-check: notes
  • Neuropixels Data Analysis

    davila7/claude-code-templates

    Analyzes Neuropixels recordings from SpikeGLX or Open Ephys through preprocessing, drift correction, Kilosort4 spike sorting, quality metrics and curation.

    32k GitHub starsUsed in 10 repos~2.8k tokens
    Auto-check passed
  • Scientific Venue Templates

    davila7/claude-code-templates

    Supplies LaTeX templates and formatting rules for journals, conferences, posters, and grant proposals, then can check a draft against them.

    32k GitHub starsUsed in 9 repos~5.1k tokens
    Auto-check: notes
  • Brand Voice Content Creator

    davila7/claude-code-templates

    Analyzes a brand's existing writing to lock in a consistent voice, then builds SEO blog posts and platform-specific social content around it.

    32k GitHub starsUsed in 3 repos~1.9k tokens
    Auto-check passed
  • CAPA Officer

    davila7/claude-code-templates

    Guides corrective and preventive action (CAPA) work in a quality management system, from initiation and root cause analysis through effectiveness verification.

    32k GitHub starsUsed in 1 repo~2k tokens
    Auto-check passed
  • Fda Consultant Specialist

    davila7/claude-code-templates

    Senior FDA consultant and specialist for medical device companies including HIPAA compliance and requirement management.

    32k GitHub starsUsed in 1 repo~2.7k tokens
    Auto-check passed

Questions about Matchms

What does Matchms do?

Mass spectrometry analysis. An agent skill from davila7/claude-code-templates. Matchms is an agent skill from davila7/claude-code-templates. Mass spectrometry analysis.

How do I install Matchms in Claude Code?

Run `npx skills add davila7/claude-code-templates --skill matchms -a claude-code`. Or copy the skill folder (cli-tool/components/skills/scientific/matchms in davila7/claude-code-templates) into .claude/skills/matchms in your project. Claude Code loads it when a task matches its description.

How do I install Matchms in Codex?

Run `npx skills add davila7/claude-code-templates --skill matchms -a codex`. Or copy the skill folder (cli-tool/components/skills/scientific/matchms in davila7/claude-code-templates) into .agents/skills/matchms in your project. Codex loads it when a task matches its description.

Can I use Matchms in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add davila7/claude-code-templates --skill matchms -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/matchms, .gemini/skills/matchms, .github/skills/matchms and .opencode/skills/matchms in your project.

What does Matchms need to run?

Going by SKILL.md and its folder, Matchms needs the command-line tools its instructions call (uv). Our summary lists: Python 3.

Does Matchms access the network?

SKILL.md contains no URLs. Its commands use uv, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Matchms safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Matchms use?

Matchms is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Matchms use?

About 1.7k tokens (SKILL.md is roughly 6.8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 14k tokens, read only when the agent opens those files.

What are the alternatives to Matchms?

Skills that share tags, products or a category with Matchms: Matchms (K-Dense-AI/scientific-agent-skills, 48k stars), Matchms (aipoch/medical-research-skills, 2k stars), Matchms Spectral Matching (jaechang-hits/SciAgent-Skills, 370 stars) and Pyopenms Mass Spectrometry (jaechang-hits/SciAgent-Skills, 370 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Matchms?

davila7 (a GitHub user) maintains it in davila7/claude-code-templates, which has 32,463 GitHub stars. The repository holds 477 skills in this directory. The repository was last updated on October 8, 2026.

Source: davila7/claude-code-templates on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.