بنقرة واحدة
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 المهني
| 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.
references/PEGASUS.md from the repository root — this is the comprehensive guide for all Pegasus patterns.assets/templates/workflow_generator_template.py — your starting point for the workflow generator.assets/templates/wrapper_template.py" and assets/templates/wrapper_template.sh — starting points for wrappers.assets/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 |
| Fork-join topology, complex branching, PLINK bioinformatics | examples/workflow_generator_gwas_qc.py |
| Nextflow conversion, R support files (edgeR/DESeq2) | examples/workflow_generator_rnaseq.py |
| CondorIO for caches/databases, GPU jobs, batch inference | examples/workflow_generator_proteinfold.py + Pegasus.md "Transferring Data Directories via CondorIO" |
| Image tiling, split→parallel→merge, GPU U-Net training | examples/workflow_generator_s2_segmentation.py |
| Federated learning with SubWorkflows, FL rounds as sub-DAGs | examples/workflow_generator_medical_imaging_fl.py + examples/fl_round.py |
| Time-window splitting, parallel observation data harvesting | examples/workflow_generator_obs_harvest.py |
| Hierarchical merge tree, DAGMan rate limiting, inline submit | examples/workflow_generator_sra_search.py |
Read the selected reference workflow before generating code.
Create the following files in {pipeline-name}-workflow/:
workflow_generator.pyStart from assets/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 assets/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 assets/templates/wrapper_template.sh.
Docker/{Name}_DockerfileStart from assets/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 assets/templates/README_template.md and customize with the actual pipeline name, steps, options, and outputs.
run_manual.shStart from assets/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/:
Convert a Snakemake or Nextflow pipeline to a Pegasus workflow
Show available Pegasus workflow skills and which one to use
Review a Pegasus workflow for common pitfalls and best practices
Generate a wrapper script for a single Pegasus pipeline step
Generate a Kiso experiment.yml configuration file for running Pegasus workflows or shell experiments on cloud/edge/local testbeds. Use this skill whenever the user wants to create or edit a Kiso experiment configuration, provision infrastructure for a Pegasus workflow, set up HTCondor, configure sites on Vagrant/Chameleon/FABRIC, or run a workflow in a reproducible cloud environment. Trigger on: "create experiment.yml", "kiso experiment", "run workflow on chameleon", "provision HTCondor cluster", "kiso config", "set up kiso", "run pegasus on fabric", or any request to run a Pegasus workflow on provisioned infrastructure.
Generate a Dockerfile for a Pegasus workflow's tool stack