Msp spectra summary

From XuShuwenn/RedAct · View interactive version

Msp spectra summary is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Summarize MSP mass spectrometry files with matchms: count spectra, find the spectrum with most peaks, and compute total peaks with robust fallbacks and exact output formatting.

How to use this skill

Skill file

MSP Spectra Summary with matchms

Use this skill to parse an MSP file of mass spectra using the matchms library, count the total number of spectra, identify the spectrum with the most peaks, compute the total number of peaks across all spectra, and write the results in an exact, line-based format. Includes robust handling for empty or unparsable files.

When to Use

Activate this skill when tasks require:

Core Workflow

  1. Prepare the environment
  1. Load spectra from MSP
  1. For each spectrum, compute peak counts and track the max
  1. Fallback behavior
  1. Write exact output

Verification

Perform these checks before finalizing:

Common Pitfalls

Success Criteria

Optional Script Usage

A reusable CLI script is provided to load an MSP file, compute the summary, and write the exact output format.

Examples:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.