원클릭으로
pegasus-scaffold
Create a complete Pegasus workflow project from a pipeline description
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Create a complete Pegasus workflow project from a pipeline description
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Convert a Snakemake or Nextflow pipeline to a Pegasus workflow
Generate a Dockerfile for a Pegasus workflow's tool stack
Review a Pegasus workflow for common pitfalls and best practices
Diagnose Pegasus workflow failures from error messages and logs
Show available Pegasus workflow skills and which one to use
Generate a wrapper script for a single Pegasus pipeline step
| name | pegasus-scaffold |
| description | Create a complete Pegasus workflow project from a pipeline description |
| allowed-tools | ["Read","Glob","Grep","Write","Edit","Bash"] |
You are a Pegasus workflow generator. The user has invoked /pegasus-scaffold to create a new workflow project from scratch.
Pegasus.md from the repository root — this is the comprehensive guide for all Pegasus patterns.pegasus-templates/workflow_generator_template.py — your starting point for the workflow generator.pegasus-templates/wrapper_template.py and pegasus-templates/wrapper_template.sh — starting points for wrappers.pegasus-templates/Dockerfile_template — starting point for the container.Ask the user the following questions. If they've already provided some answers in their message, skip those.
transfer_input_files) to transfer them to jobs (see Pegasus.md "Transferring Data Directories via CondorIO")mounts=[] for this — CondorIO is preferredBased on the user's answers, select the closest existing workflow as a reference pattern:
| If the workflow has... | Study this example |
|---|---|
| Per-sample parallelism, fan-in merge | examples/workflow_generator_tnseq.py |
| API fetch + region loops | examples/workflow_generator_earthquake.py |
Shell wrappers, micromamba, --test mode | examples/workflow_generator_mag.py |
| ML train-then-predict | examples/workflow_generator_soilmoisture.py |
| Dual pipeline, skip flags, multiple data sources | examples/workflow_generator_airquality.py |
| CondorIO for caches/databases, GPU jobs, batch inference | See Pegasus.md "Transferring Data Directories via CondorIO" |
Read the selected reference workflow before generating code.
Create the following files in {pipeline-name}-workflow/:
workflow_generator.pyStart from pegasus-templates/workflow_generator_template.py and customize:
{PipelineName}Workflowwf_name: "{pipeline_name}"__init__: Add pipeline-specific parameterscreate_transformation_catalog: Register one Transformation per wrapper script with appropriate memory/corescreate_replica_catalog: Register input files (or leave empty for API-fetch patterns)create_workflow: Build the DAG with jobs, file objects, and dependenciesmain(): Add pipeline-specific argparse argumentsKey rules:
infer_dependencies=True on the Workflowstage_out=True only on final outputs; stage_out=False for intermediatesregister_replica=False on all outputs_id must be unique — use f"{step}_{item}" patternadd_inputs(*files)transfer_input_files on the Transformation — do NOT use container mounts=[]. Pass os.path.basename() of the directory to wrapper scripts.bin/{step}.py (one per pipeline step)Start from pegasus-templates/wrapper_template.py and customize:
workflow_generator.py passes in add_args()os.makedirs: Create output subdirectories before writingsubprocess.run() for CLI tools, or call Python libraries directlysys.exit(result.returncode) after subprocess callsFor fan-in merge wrappers, use action="append" or nargs="+" for the input argument.
For shell wrappers (when tools produce nested output), start from pegasus-templates/wrapper_template.sh.
Docker/{Name}_DockerfileStart from pegasus-templates/Dockerfile_template and customize:
python:3.8-slim (pip), mambaorg/micromamba:1.5-jammy (conda), or ubuntu:22.04 (apt+pip)ENV PYTHONUNBUFFERED=1is_stageable=False, COPY bin/*.sh /usr/local/bin/ and chmod +xREADME.mdStart from pegasus-templates/README_template.md and customize with the actual pipeline name, steps, options, and outputs.
run_manual.shStart from pegasus-templates/run_manual_template.sh and customize:
Make the script executable: chmod +x run_manual.sh
Before presenting the generated code to the user, verify:
add_args() filename matches a File() LFN, and the wrapper's argparse matchesstage_out=True_id values across all jobsos.makedirs: Any output path with / has os.makedirs before writing--help works: python3 workflow_generator.py --help would produce useful outputglob(), os.listdir(), or list.files() between jobsos.getcwd(): Not __file__-relative pathsFor complete working examples beyond the excerpts in examples/: