Claude skill · cast

validate-galaxy-step

Run gxwf validation on the just-implemented Galaxy step and route failures back to step implementation.

← All cast skills · Source mold →

Install

/plugin marketplace add jmchilton/foundry
/plugin install foundry-skills@galaxy-workflow-foundry

Then invoke as:

/foundry-skills:validate-galaxy-step

Skill Bundle

/ packaged cast
attached files
2
upfront
0
on demand
2
cast rev
n/a
validated
0

Attached Files

/ runtime references

Load on demand

cli-command

gxwf validate

packaged

Validate a partial gxformat2 workflow while implementing one Galaxy step at a time.

Trigger: After a Galaxy step is implemented or modified inside the per-step loop.

on-demand runtime sidecar hypothesis deterministic 1.6 KB
bundle
references/cli/validate.json
source
content/cli/gxwf/validate.md
Preview json
{
  "type": "cli-command",
  "tool": "gxwf",
  "command": "validate",
  "summary": "Validate Galaxy workflow structure, tool state, and optional connection compatibility before runtime execution.",
  "source_path": "content/cli/gxwf/validate.md",
  "source_revision": 3,
  "body": "# `gxwf validate`\n\nValidate a Galaxy workflow source file before attempting runtime execution. Use this as the design-time guardrail after step implementation and again after final workflow assembly.\n\n## Output\n\nDefault output is human-readable diagnostics. JSON output should be treated as the preferred cast-skill interface; free-text diagnostics are a fallback for humans.\n\n## Examples\n\n```bash\ngxwf validate workflow.ga\ngxwf validate workflow.gxwf.yml --json\ngxwf validate workflow.gxwf.yml --json --connections --strict\ngxwf validate workflow.ga --mode json-schema --tool-schema-dir ./tool-schemas --json\n```\n\n## Gotchas\n\n- Validation is design-time structure checking. It does not prove that a workflow test will pass under Planemo.\n- Run after each generated Galaxy step when the harness can still attribute failures to the fresh step.\n- Run again after assembly to catch cross-step or workflow-level issues before runtime testing.\n- Prefer `--json` whenever a cast skill or harness needs to classify diagnostics.\n- Use `--connections` when tool cache metadata is available and data-shape compatibility matters, especially around collections and map-over.\n- `--no-tool-state` weakens validation. If used, record why tool metadata was unavailable and rerun without it before final runtime testing."
}
research

galaxy-tool-job-failure-reference

packaged

Keep static step validation findings distinct from wrapper-defined runtime failure semantics.

Trigger: When a selected tool can validate structurally but may fail at runtime due to stdio rules, exit-code handling, dynamic outputs, or datatype behavior.

on-demand runtime verbatim corpus-observed deterministic 7.3 KB
bundle
references/notes/galaxy-tool-job-failure-reference.md
source
content/research/galaxy-tool-job-failure-reference.md
Preview md
---
type: research
subtype: component
title: "Galaxy tool and job failure reference"
tags:
  - research/component
  - target/galaxy
status: draft
created: 2026-05-02
revised: 2026-05-02
revision: 1
ai_generated: true
related_notes:
  - "[[galaxy-workflow-invocation-failure-reference]]"
  - "[[planemo-workflow-test-architecture]]"
  - "[[galaxy-collection-semantics]]"
related_molds:
  - "[[implement-galaxy-tool-step]]"
  - "[[debug-galaxy-workflow-output]]"
sources:
  - "~/projects/repositories/galaxy/lib/galaxy/tools/__init__.py"
  - "~/projects/repositories/galaxy/lib/galaxy/tool_util/parser/xml.py"
  - "~/projects/repositories/galaxy/lib/galaxy/tool_util/output_checker.py"
  - "~/projects/repositories/galaxy/lib/galaxy/jobs"
  - "~/projects/repositories/galaxy/lib/galaxy/webapps/galaxy/api/jobs.py"
summary: "Reference for Galaxy tool stdio rules, job failure detection, job states, and job API failure surfaces."
---

# Galaxy Tool And Job Failure Reference

This is reference material, not a debug recipe. Use it to understand what Galaxy can know about a failed tool job and which API surfaces preserve that evidence.

## Model

Galaxy tool failure handling is layered:

- The tool wrapper defines expected failure semantics through `detect_errors`, `<stdio>`, exit-code checks, regex checks, and command strictness.
- The job runner executes the command and captures exit code plus tool/job stdout and stderr streams.
- Galaxy evaluates configured failure rules and records structured `job_messages`.
- The job reaches a terminal state, output datasets may become `error`, and dependent jobs may pause or fail later.
- Workflow invocation APIs summarize those jobs, but job APIs preserve the most detailed tool-level evidence.

## Tool Wrapper Failure Controls

Important wrapper con
...

SKILL.md


# validate-galaxy-step

Follow the procedure below and use the artifact/reference sections as the runtime contract.

## When To Use

- Run gxwf validation on the just-implemented Galaxy step and route failures back to step implementation.

## Inputs

- No upstream artifact inputs declared. See the procedure for user-supplied runtime inputs.

## Outputs

- None declared.

## Required Tools

- **`gxwf`** (gxwf). `npm install -g @galaxy-tool-util/cli`.
  Ephemeral run: `npx --package @galaxy-tool-util/cli gxwf`.
  Check: `gxwf --version`.
  Docs: https://github.com/jmchilton/galaxy-tool-util-ts/tree/main/packages/cli

## Load Upfront

- None declared.

## Load On Demand

- `references/cli/validate.json`: CLI command reference packaged as a sidecar. Validate a partial gxformat2 workflow while implementing one Galaxy step at a time. Use when: after a Galaxy step is implemented or modified inside the per-step loop.
- `references/notes/galaxy-tool-job-failure-reference.md`: Research note copied verbatim into the bundle. Keep static step validation findings distinct from wrapper-defined runtime failure semantics. Use when: a selected tool can validate structurally but may fail at runtime due to stdio rules, exit-code handling, dynamic outputs, or datatype behavior.

## Validation

- None declared.

## Procedure

Validate the Galaxy workflow fragment after one step has been implemented. The skill owns the inline validation loop: run gxwf validate, classify diagnostics that are local to the new step, and route failures back to implement-galaxy-tool-step or author-galaxy-tool-wrapper as appropriate.

This is separate from validate-galaxy-workflow because the harness behavior differs: step validation runs inside the per-step loop and should preserve local context about the step that just changed.

## Runtime Notes

- Do not read Foundry source files at runtime; use only files packaged in this skill bundle and user-supplied artifacts.
- Preserve declared artifact filenames unless the user or harness supplies explicit paths.
- Carry unresolved assumptions into the output artifact instead of silently inventing missing source evidence.