Nextflow debugging
Skill Rebell-Leader/SpatialAI_MCP/.codex/skills/nextflow-debugging
Diagnose a failing Nextflow pipeline run in an OpenProblems benchmark. Use when a `nextflow run` fails, a process errors out, or the user shares a .nextflow.log / .command.err and asks why it broke.From its SKILL.md
npx -y skills add Rebell-Leader/SpatialAI_MCP --skill nextflow-debuggingAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 4 stars4 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
2.1 KB, as published. Nobody here has run it
Nextflow debugging
The server does not yet parse logs for you (analyze_nextflow_log is roadmap), so
triage the logs directly. Be systematic.
Steps
-
Find the failing task. From the run output, note the process name and the work directory hash (
work/ab/cdef...). The per-task files there are the ground truth:.command.sh— the exact command run..command.err/.command.out— stderr/stdout..command.log,.exitcode— exit status.
-
Classify the error by exit code / message:
- 137 / OOM-killed → memory limit. Increase the process
memorydirective or add a dynamic retry (memory { 8.GB * task.attempt }). - 127 / "command not found" → tool missing in the container; fix the component's engine/setup or the image.
- 126 / permission denied → executable bit / entrypoint issue.
- File/path errors → check channel wiring and input staging; confirm the
input file actually exists and matches the expected format
(run
validate_spatial_data). - Config/DSL errors → confirm DSL2 syntax; OpenProblems pipelines are DSL2.
- 137 / OOM-killed → memory limit. Increase the process
-
Add resilience where appropriate:
errorStrategy 'retry',maxRetries, and dynamic resources bytask.attempt. Don't paper over a real bug with retries. -
Reproduce in isolation. Re-run a single component with
viash runon the test data before re-running the whole pipeline. Use-resumeto avoid recomputing successful tasks. -
Validate inputs with
validate_spatial_data/analyze_spatial_metadatawhen the failure looks data-shaped (wrong format, missing elements, raw-vs-normalized mismatch).
Output
Report: the failing process, the root-cause class, the evidence (the log line), and the specific fix — plus whether it's a data problem, an environment problem, or a code problem.