Skip to content

Guide · Agent skill

How to use the RELION cryo-EM refinement checker agent skill

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

The RELION skill gives an AI agent a structured way to check a RELION single-particle cryo-EM project before and during 3D refinement. It is written for extracted particles that already have CTF estimates and an initial 3D reference, and it covers STAR validation, a bounded gold-standard refinement, a diagnostic half-map FSC and soft-mask postprocessing. This guide explains what the skill does, how to install it, how to ask for it in plain language, and where its limits are.

RELION cryo-EM refinement checkerK-Dense-AI/scientific-agent-skills · MIT

Quick start

  1. 1Download and unzip the skill. Download the relion ZIP from this page and unzip it into ~/.claude/skills/ or a project's .claude/skills/ folder, or upload it under Settings → Capabilities → Skills in the Claude apps.
  2. 2Install the requirements. Install Python 3.12 or later with numpy, mrcfile and starfile, and make the RELION 5.0.1 CPU or MPI executables, MPI, OpenMP and FFTW or MKL available.
  3. 3Validate the STAR file. Run validate-star on your particle STAR file with --project pointing to the project directory, and fix any reported stack, optics or index problems.
  4. 4Run a pilot refinement. Use the refine command with your STAR file, initial reference, diameter, symmetry and MPI rank count, writing to a new output directory.
  5. 5Compute the half-map FSC. Run fsc on the two unfiltered half maps from the refinement and read the diagnostic FSC table, remembering that it is unmasked.
  6. 6Postprocess with a soft mask. Run postprocess with both half maps and a soft mask, then inspect the masked FSC near the reported resolution before trusting the result.

What the skill makes the agent do

Once installed, the agent follows the skill's instructions when you work on a RELION project. It checks acquisition and coordinate conventions in the STAR files, confirms that the particle stack agrees with those files, runs bounded refinement and postprocessing commands, and computes a diagnostic Fourier shell correlation (FSC) between two independent half maps.

The skill starts from CTF-annotated extracted particles and an initial 3D reference. It does not replace motion correction, particle picking, 2D or 3D selection, or any biological interpretation of the map.

  • Validates STAR optics and acquisition values, particle indices, box sizes and existing half-set assignments
  • Runs gold-standard refinement through RELION's native executables
  • Computes an unmasked diagnostic FSC between two unfiltered half maps
  • Runs postprocessing with a soft mask and gives restart guidance

Install the skill from a ZIP file or the Claude apps

Download the ZIP for the relion skill from this page. For Claude Code, unzip it into your personal skills folder, ~/.claude/skills/, or into a project's .claude/skills/ folder so that the relion directory containing SKILL.md sits there. Use the personal folder to make the skill available in all your projects, and the project folder to share it with one codebase.

In the Claude apps, you can instead upload the ZIP under Settings → Capabilities → Skills.

  • Personal install: ~/.claude/skills/
  • Project install: .claude/skills/ inside your project
  • Claude apps: Settings → Capabilities → Skills
~/.claude/skills/

Check what you need before you start

The skill's bundled Python checks need Python 3.12 or later with the numpy, mrcfile and starfile packages. The refinement and postprocessing steps need the RELION 5.0.1 CPU or MPI executables: relion_refine_mpi, relion_postprocess and relion_image_handler. You also need MPI, OpenMP and an FFT library (FFTW or MKL). GPU builds need their own accelerator stack.

The refinement steps cannot run without RELION and MPI. The sequential relion_refine executable cannot perform the gold-standard half-set split that this workflow uses. Network access is needed only during installation.

  • Python 3.12 or later with numpy, mrcfile and starfile
  • RELION 5.0.1 CPU/MPI executables: relion_refine_mpi, relion_postprocess, relion_image_handler
  • MPI, OpenMP and FFTW or MKL
  • Odd MPI rank counts of 3 or more for the gold-standard split

Ask for it with natural requests

You do not need to type a command name. Describe the task in plain words and name your project files, and the agent should use the skill when the request matches its scope. Good requests name the stage you are at: validation, refinement, half-map checking or postprocessing.

Be specific about what you already have. Say whether you have the particle STAR file, the stack files, an initial reference and a mask, because the skill checks each of these before it runs anything.

  • Check project/particles.star against its stacks before I refine.
  • Set up a pilot gold-standard refinement from these extracted particles and this initial reference.
  • Compare the two unfiltered half maps and compute a diagnostic FSC.
  • Postprocess my half maps with this soft mask and tell me what to inspect in the masked FSC.
  • My refinement job stopped. What is the safe way to restart it?

Run the bundled validation, refinement and postprocessing commands

The skill's runner is scripts/spa_workflow.py. Run it from the skill directory against your real project. Validation opens the referenced stacks and checks optics membership, finite acquisition and CTF values, indices, box sizes, duplicate particle references and existing half-set assignments. Use the metadata-only option only when the stacks are genuinely unavailable; the JSON output then records that stack checks were not performed.

The refine command runs mpirun with relion_refine_mpi using auto-refinement, random half splitting, CTF correction and a low-pass starting reference. The diameter and low-pass values in the example are illustrative Å values, so replace them with values suited to your specimen. The runner keeps the command, the RELION version and the log in a new output directory, and it stops on process failure.

  • validate-star checks a STAR file against its stacks
  • refine runs a pilot gold-standard refinement with a fixed random seed (default 1)
  • fsc writes a diagnostic FSC table from two unfiltered half maps
  • postprocess runs relion_postprocess with a soft mask and writes postprocess.star
python scripts/spa_workflow.py validate-star project/particles.star --project project

Read the results and know the limits

The skill reports a 0.143 FSC crossing with linear interpolation. A null value means no downward crossing was detected, not infinite resolution. The Python FSC is unmasked, so it is a diagnostic and does not replace a mask-corrected FSC. For larger maps, the skill points you to RELION's native relion_image_handler --fsc command. The bounded postprocess command leaves the B-factor at zero, so sharpening is a separate decision.

Physical-range warnings are prompts for review, not proof that your microscope settings are wrong. The skill also does not scan every particle pixel for corruption.

  • Do not present the diagnostic FSC as a publication-grade resolution claim
  • Inspect the masked FSC near the reported resolution; residual correlation suggests a smoother or wider mask
  • Use the original job's optimiser files for restarts rather than starting a new random split

Safety notes on scripts and network

The skill runs scripts, so read SKILL.md and the scripts/spa_workflow.py file before you rely on it in your own environment. The skill's own metadata says it uses no network access during normal use; network access is needed only during installation. Its tested native workflows depend on a RELION build that you install separately, following the official RELION installation instructions for your platform.

The runner does not automatically retry expensive jobs or silently discard failed-job artifacts. Keep the optimiser STAR file, model and sampling STAR files and referenced particle paths so that a job can be restarted.

  • Runs scripts: yes, from the skill's scripts folder
  • Uses network: no, apart from installation
  • Keep _optimiser.star and related STAR files for restarts

What people use it for

  • Checking a STAR file and particle stack for optics, index and box-size problems before spending time on refinement
  • Running a bounded pilot gold-standard refinement on a selected particle subset
  • Comparing two independently refined unfiltered half maps with a diagnostic FSC and noting anisotropy or local resolution for review
  • Postprocessing half maps with a soft mask and deciding whether the mask needs to be smoother or wider
  • Getting restart guidance for a RELION job that stopped partway through

Frequently asked questions

How do I install the RELION agent skill?

Download the ZIP from this page and unzip it into ~/.claude/skills/ for personal use, or into a project's .claude/skills/ folder. In the Claude apps, you can upload the ZIP under Settings → Capabilities → Skills.

What do I need to run the RELION skill?

You need Python 3.12 or later with numpy, mrcfile and starfile for the bundled checks. Refinement and postprocessing also need the RELION 5.0.1 CPU or MPI executables, MPI, OpenMP and FFTW or MKL, and GPU builds need their own accelerator stack.

Is the RELION skill free to use?

The skill is released under the MIT licence, as stated on its listing. RELION and the other tools it calls are separate installs, so check their own licences and installation instructions.

Does the RELION skill work on tomography or helical data?

No. The skill says tomography, helical reconstruction, Blush and heterogeneous-state modelling need other upstream workflows. It is aimed at single-particle projects that start from extracted particles with CTF estimates and an initial reference.

Can I use the skill's FSC as my final resolution?

No. The Python FSC is unmasked and is a diagnostic only. The skill says it does not replace a mask-corrected FSC, so use that for any resolution you report.

Why does the skill need MPI for refinement?

Gold-standard refinement splits particles into two independent half sets, and the skill's refinement uses relion_refine_mpi for this. The plain sequential relion_refine executable cannot perform that split, so the refinement steps cannot run without MPI.

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 are a structural biology student or lab member running RELION single-particle pilot refinements on extracted particles, and you want an agent to check your STAR files, half maps and postprocessing. Pick something else for tomography, helical reconstruction, heterogeneous modelling, publication-grade resolution claims, or biological interpretation of the map, since the skill is explicitly limited in those areas.

Download the skill