This skill helps you create, validate, and optimize Galaxy .ga workflows following IWC standards for reliable reproducibility.
npx playbooks add skill delphine-l/claude_global --skill workflow-development
You are an expert in Galaxy workflow development, testing, and best practices based on the Intergalactic Workflow Commission (IWC) standards.
Galaxy workflows are JSON files with .ga extension containing:
{
"a_galaxy_workflow": "true",
"annotation": "Detailed description of workflow purpose and functionality",
"creator": [
{
"class": "Person",
"identifier": "https://orcid.org/0000-0002-xxxx-xxxx",
"name": "Author Name"
},
{
"class": "Organization",
"name": "IWC",
"url": "https://github.com/galaxyproject/iwc"
}
],
"format-version": "0.1",
"license": "MIT",
"release": "0.1.1",
"name": "Human-Readable Workflow Name",
"tags": ["domain-tag", "method-tag"],
"uuid": "unique-identifier",
"version": 1
}
Steps are numbered sequentially and define:
type: "data_input" - Single file inputtype: "data_collection_input" - Collection of filesannotation and labeltype: "parameter_input"type: "tool"tool_id and content_id reference Galaxy ToolShedtool_shed_repository includes owner, name, changeset_revisioninput_connections link to previous step outputstool_state contains parameter values (JSON-encoded)workflow_outputs arraylabel (human-readable name)hide: truetype: "text" steps for documentationwhen field for conditional stepscompose_text_param, map_param_value, pick_value, param_value_from_fileGalaxy parameter tools have limited comparison capabilities:
when conditionals.awk '{if ($1 >= 10000000000) print "true"; else print "false"}', then feed the text output to a map_param_value or pick_value to drive conditional branches.map_param_value step with empty mappings and unmapped: {"on_unmapped": "input"} passes the input value through. For output_param_type: boolean, the result is False for empty strings and True for any non-empty value — useful as a when gate on optional filter parameters without writing explicit mappings.changeset_revision; document in CHANGELOGworkflow-name.ga -> workflow-name-tests.ymltest-data/; files >= 100KB on Zenodo with SHA-1 hashworkflow_lint for .ga files (not lint, which is for tool XML)# Lint workflow — argument is the workflow DIRECTORY (planemo walks it for .ga files)
# NOT the .ga filename. Passing a file fails with "ValueError: Directory not found".
planemo workflow_lint --iwc .
# Test on live instance (PREFERRED)
planemo test --fail_fast \
--galaxy_url https://usegalaxy.org \
--galaxy_user_key "$API_KEY" \
workflow.ga
# Test locally (slower, use only when needed)
planemo test workflow.ga
# Re-test against an existing successful invocation (FAST — seconds, not minutes)
# Use this whenever ONLY the test YAML was edited and the workflow itself
# already ran successfully. Skip the full planemo test re-run.
planemo workflow_test_on_invocation \
--galaxy_url https://usegalaxy.org \
--galaxy_user_key "$API_KEY" \
--test_index 1 \
workflow-tests.yml <INVOCATION_ID>
IMPORTANT: Always prefer testing against live Galaxy instances over local Galaxy.
Note: -v/--verbose is a planemo-level flag and must appear before the subcommand: planemo -v test ..., not planemo test -v .... The latter fails with "Invalid value for 'TOOL_PATH'".
Decision rule — which planemo command to use:
planemo test (full re-run, 10-30+ min)planemo workflow_test_on_invocation <invocation_id> (re-verifies the test YAML against cached invocation outputs in seconds, no recompute)Extract the invocation ID from prior planemo test output: look for Invocation <ID> in the progress bar of the top-level invocation panel (the outer panel, not nested subworkflow panels). See testing-guide.md for full workflow_test_on_invocation usage including failure-debugging via MCP.
| Issue | Solution |
|-------|----------|
| Test "output not found" | Check output label matches exactly (case-sensitive) |
| Large test files in repo | Upload to Zenodo, reference by URL with hash |
| Workflow not generic | Replace hardcoded values with parameter inputs |
| Tool update breaks workflow | Pin exact version in changeset_revision |
| Tests pass locally, fail in CI | Check reference data availability on CVMFS |
| Re-exported .ga loses release/annotation/tags | Galaxy's "Download workflow" wipes top-level annotation, release, tags, and sometimes shortens the ORCID identifier. Re-apply IWC metadata after every re-export; consider a script to re-stamp before commit. |
| Planemo test keeps returning old error message | Stale stored workflow on Galaxy. Delete it via DELETE /api/workflows/<id> before re-running. See testing-guide.md Troubleshooting. |
| Lint warnings | Run planemo workflow_lint --iwc . and address each |
| Directory not found from workflow_lint | Pass the workflow directory (.), not a .ga filename — the lint command takes a path it walks for workflow files |
| Cannot push to planemo-autoupdate branches | Edit via GitHub web UI, or push to own fork |
| Tool version revert no effect | Disable use_cached_job in Galaxy preferences |
When updating a workflow:
release field in .ga fileAfter PR merge: Tests pass -> RO-Crate metadata generated -> Deployed to iwc-workflows -> Registered on Dockstore -> Registered on WorkflowHub -> Auto-installed on usegalaxy.* servers
---
${Species Name} only works in RenameDatasetAction, not in workflow_outputs[].label. Use static text for output labels.pick_value intermediary — Optional inputs cannot be plugged directly into non-optional tool inputs like export_remote. Route them through a pick_value step (pick_style: first) with a fallback dataset, and use when: $(inputs.when) on the export step to gate execution.A typical VGP export workflow follows this structure:
---
Detailed guidance is split into the following files in this directory:
galaxy-workflow-viz/SKILL.md and galaxy-workflow-viz/examples/ for style reference.---
---
When helping with Galaxy workflow development:
Always prioritize:
Weekly roundup of top Claude Code skills, MCP servers, and AI coding tips.