Skip to content

Guide · Agent skill

How to use the nmrglue NMR 1D processing agent skill

Updated · written with AI from the project's own documentation and checked against our catalogue data

The nmrglue skill lets an AI agent process a raw one-dimensional NMR free-induction decay (FID) into a frequency spectrum with a ppm axis, then list peak candidates and signed integrals for regions you choose. It is aimed at chemists, students and researchers who already have calibrated 1D NMR data and want a repeatable processing run. After this guide you will know how to install the skill, how to ask for processing in plain language, and what the outputs do and do not mean.

NMR 1D Spectrum ProcessingK-Dense-AI/scientific-agent-skills · MIT

Quick start

  1. 1Download the ZIP. Download the skill ZIP from this page.
  2. 2Unzip into a skills folder. Unzip it into ~/.claude/skills/ for personal use, or into .claude/skills/ inside a project. Alternatively, upload it in the Claude apps under Settings → Capabilities → Skills.
  3. 3Prepare the input. Save your FID as an .npz file with one complex fid array, or use a canonical 1D NMRPipe FID with matching header values.
  4. 4Fill in the settings. Copy assets/processing.json and replace the synthetic example values with your measured spectral width, observation frequency, carrier and processing choices.
  5. 5Run the helper. Run the documented uv command with a new output directory name, so that earlier results are kept.
  6. 6Check the phase and axis. Inspect the real and imaginary spectra and the peak positions against a known reference, then adjust phase if needed.
  7. 7Review the report. Open report.json to confirm the input hash, settings and package versions, then read the peak candidates and signed region areas.

What the skill makes the agent do

An agent skill is a folder of instructions and helper scripts that an AI agent can load when a task matches the skill's description. This one covers processing of calibrated one-dimensional complex NMR FIDs with nmrglue. The skill's description lists the typical jobs: raw 1D NMR processing, ppm-axis verification, apodization, Fourier transformation, manual phasing, baseline correction and reproducible spectral integration.

The skill does not identify compounds or assign resonances. Its output is a processed spectrum, a list of positive peak candidates and signed areas for regions you specify. Interpreting those peaks remains your job.

  • Accepts a NumPy .npz file containing exactly one complex fid array, or a canonical 1D complex time-domain NMRPipe file.
  • Applies exponential line broadening, zero filling, Fourier transformation and manual phase angles.
  • Optionally fits a linear baseline, but only across ppm regions you mark as signal-free.
  • Writes spectrum.csv (descending ppm, real and imaginary spectra, fitted baseline) and report.json (input hash, settings, package versions, peak candidates, region areas).

Install the skill

Download the skill ZIP from this page. Then choose one of two routes depending on how you use your agent.

For Claude Code, unzip the file into your user skills folder at ~/.claude/skills/, or into a project-specific .claude/skills/ folder inside the project you are working in. A project folder keeps the skill with that project only.

In the Claude apps, open Settings, go to Capabilities, and upload the skill under Skills instead.

  • Option 1, personal: unzip into ~/.claude/skills/
  • Option 2, single project: unzip into .claude/skills/ inside the project folder
  • Option 3, Claude apps: Settings → Capabilities → Skills, then upload the ZIP

Check what you need before processing

The skill needs Python, nmrglue, NumPy and SciPy. The compatibility note in the skill sets the minimum Python version. The run command uses uv to fetch the packages, so you also need network access for installation. Processing itself is local and needs no credentials.

Before you start, gather the acquisition facts. The skill will not guess them. You need the spectral width in Hz, the positive observation frequency in MHz, the carrier position in ppm, the observed nucleus, and the sign convention of the data. You also need to know whether digital-filter or group-delay removal has already been applied.

  • Spectral width (Hz) and observation frequency (MHz)
  • Carrier position (ppm) and observed nucleus
  • Complex frequency sign convention and whether digital filtering was already removed
  • Input as .npz with one complex fid array, or a canonical 1D NMRPipe FID

Run the processing and read the outputs

Copy the supplied processing settings file, assets/processing.json, and replace its example values with your measured parameters and chosen processing options. The skill's documented run command is shown below. Paths assume the skill folder sits at the collection root, so adjust them if you installed it elsewhere. The output directory must be new, which keeps earlier runs reviewable.

After the run, inspect the real and imaginary spectra. If the phase looks wrong, adjust phase0_deg and phase1_deg and run again. Phase is applied after the transform, and there is no automatic phase estimate, so manual checking is required.

  • Use nonnegative line broadening in Hz and a zero-filled size at least as large as the acquired FID.
  • Only add a baseline when your baseline regions are truly signal-free, with at least two regions.
  • Negative areas are kept on purpose. They often point to phase or baseline problems.
uv run --no-project --python 3.12 --with nmrglue==0.12 --with numpy==2.5.3 --with scipy==1.18.1 python skills/nmrglue/scripts/process_1d.py fid.npz processing.json nmr-result

Ask the agent for processing in natural language

You do not need to name the skill or its script. Describe the job and the files, and include the facts the skill needs. The skill's description matches requests about raw 1D NMR processing, ppm-axis checks, apodization, Fourier transformation, manual phasing, baseline correction and spectral integration.

Good requests state the input, the settings and the output you want. Vague requests such as 'analyse my NMR' give the agent too little to work with.

  • 'Process fid.npz as a 1D complex FID at 400 MHz with 4000 Hz spectral width and carrier at 5 ppm, using 1 Hz line broadening. Give me the peak list and a report.'
  • 'Check the ppm axis of this NMRPipe FID against its header, then run the processing.'
  • 'Integrate the regions 2.8 to 3.2 ppm and 6.9 to 7.2 ppm and report the signed areas and their ratio.'
  • 'Refine the phase of this spectrum, and tell me if the baseline needs correction in the signal-free regions 9.5 to 10 ppm and 0 to 0.5 ppm.'

Understand the limits and safety notes

The skill runs scripts and uses the network for installation. Read the scripts and settings before running them on data you care about. The skill's own notes state that Bruker, Varian and JEOL import paths are not verified by its test suite. A converted file opening correctly does not prove the original acquisition was decoded correctly.

The skill is not a quantitative NMR tool by itself. For quantitative work you must separately establish relaxation delay, pulse angle, saturation, receiver behaviour and the reference amount. The helper does not calculate concentrations or correct unequal relaxation.

  • Experimental Bruker, Varian and JEOL data: verify the reader and acquisition metadata first.
  • Processed frequency-domain files are rejected by the FID pipeline, but an incorrectly labelled complex spectrum can still pass.
  • Peak prominence is a fraction of the largest positive real intensity, not a noise-based detection limit. Strong solvent peaks can hide weak candidates.

What people use it for

  • Batch processing of calibrated 1D FIDs in a lab that needs the same settings applied to every sample.
  • Producing a traceable processing record with settings and SHA-256 hashes for a thesis or internal audit.
  • Checking that the ppm axis of an NMRPipe FID matches its header before further analysis.
  • Comparing signed integrals of chosen regions to spot phase or baseline problems.
  • Using the script as a tested reference when building your own NMR data-processing tool.

Frequently asked questions

Is the nmrglue NMR skill free to use?

The skill is published under the MIT licence, as stated on this page. Check the licence file in the skill folder for the full terms.

What do I need installed to use the nmrglue skill?

You need Python, nmrglue, NumPy and SciPy, plus uv for the documented run command. The skill's compatibility note sets the minimum Python version, and network access is required to install the packages.

How do I install an agent skill in Claude?

Download the ZIP and unzip it into ~/.claude/skills/ for personal use or .claude/skills/ inside a project. In the Claude apps, you can instead upload it under Settings → Capabilities → Skills.

Can this skill identify my compound or assign peaks?

No. The skill explicitly does not identify compounds or assign resonances. It gives you peak candidates and integrals, and you must interpret them.

Does it work with Bruker, Varian or JEOL files?

Those import paths are not verified by the skill's test suite. Check the reader and acquisition metadata yourself before trusting converted data. The fully tested input paths are .npz files with a complex fid array and canonical 1D NMRPipe FIDs.

Can I use this for quantitative NMR?

Only if you separately establish relaxation delay, pulse angle, saturation and reference amounts. The skill flags these as required but does not check them, and it does not convert areas to concentrations.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Use this skill if you have calibrated raw 1D NMR data and want a reproducible, checkable processing run with a clear settings and hash record. Pick something else if you need compound identification, peak assignment, or validated quantitative NMR, or if your data comes from Bruker, Varian or JEOL instruments and you cannot verify the import yourself.

Download the skill