agentleFS
nextflow-ionextflow-io/agent-skills/skills/migrate-nextflow-code/SKILL.md

migrate-nextflow-code

Skill21 starsChanged 4 months agoApache-2.0View on GitHub

Migrate Nextflow pipeline code to newer language requirements. Use when fixing strict syntax errors, replacing versions channels with topic channels, migrating from `publishDir` to workflow outputs (the `output {}` block), or adding static typing (typed processes/workflows, records, typed params).

The file

We split this skill into the rules it gives an agent

2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    If the request matches no row, tell the user which migrations are currently supported rather than improvising.

    line 26
  2. Distinctive:

    If the request covers multiple migrations, recommend performing only the first matching migration in the table.

    line 28

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Migrate Nextflow Code

Migrate Nextflow pipeline code to satisfy newer language requirements. Each migration is detection-driven: a tool reports what must change, you apply behavior-preserving fixes, then re-run the tool until it is clean.

Requires Nextflow 26.04 or later (for the nextflow lint command and the strict syntax parser, which is the default from 26.04 onward).

nf-core pipelines — check the template version before starting. If the pipeline has a .nf-core.yml, check which version of nf-core/tools last generated its template. If nf_core_version is unspecified or less than 3.0.0, stop. Tell the user to upgrade their template first (nf-core pipelines sync) before attempting any code migrations. This will resolve syntax errors in the template code and provide a cleaner baseline.

How to use this skill

This SKILL.md is an index. Identify which migration the user needs from the table below, then read the matching reference file for the full detect → fix → verify procedure before doing any work. Each reference file is self-contained.

MigrationUse when the user…Read this file
Strict syntax…has strict syntax errors, or asks to run nextflow lint to find and fix errorsreferences/strict-syntax.md
Topic channels…wants to replace the ch_versions plumbing (or another channel threaded through every workflow) with a topic channelreferences/topic-channels.md
Static typing…wants to add static types — typed process/workflow inputs and outputs, records (replacing tuples), or typed paramsreferences/static-typing.md
Workflow outputs…wants to replace publishDir directives with workflow outputs — a top-level output {} block and a publish: section in the entry workflowreferences/workflow-outputs.md

If the request matches no row, tell the user which migrations are currently supported rather than improvising.

If the request covers multiple migrations, recommend performing only the first matching migration in the table. The order is also a dependency order: strict syntax -> topic channels -> static typing -> workflow outputs. Do not try to perform multiple migrations at the same time.

Critical Rules

These hold regardless of which reference file you load. Each reference file adds its own migration-specific rules.

  1. Detect before editing — follow the reference guidelines to determine what needs changing. Never guess.
  2. Preserve behavior — a migration adapts code to new language requirements; it is not a refactor. Apply the smallest change that resolves each issue and leave unrelated logic alone.
  3. Verify — run the project's tests (nf-test test, or nextflow run . -profile test,docker -resume) to confirm behavior is unchanged before declaring the migration done.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.