scientific-workflows
Skill42 starsChanged 17 days agoMITView on GitHub
Expert assistant for choosing and implementing scientific workflow tools - from simple joblib caching to complex orchestration with Prefect, Parsl, FireWorks, and quacc. Recommends the simplest solution that meets requirements.
- Installs packages
In this repository44 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- phd-qualifierSkill
- citation-verifierSkill
- scientific-writingSkill
- brainstormingSkill
- elevenlabsSkill
- image-generationSkill
- presentationsSkill
- video-storytellingSkill
- code-reviewerSkill
- ralph-wiggumSkill
- tddSkill
- version-controlSkill
- opentrons-absorbance-readerSkill
- opentrons-gripperSkill
- opentrons-heater-shakerSkill
- opentrons-magnetic-blockSkill
- opentronsSkill
- opentrons-temperature-moduleSkill
- opentrons-thermocyclerSkill
- planningSkill
- claude-lightSkill
- emacs-lispSkill
- fairchemSkill
- idaesSkill
- materials-propertiesSkill
- pycalphadSkill
- pymatgenSkill
- python-aseSkill
- python-best-practicesSkill
- python-jaxSkill
- python-multiobjective-optimizationSkill
- python-optimizationSkill
- python-plottingSkill
- python-regression-statisticsSkill
- vaspSkill
- pycseSkill
- elnSkill
- literature-reviewSkill
- materials-databasesSkill
- scientific-data-extractionSkill
- scientific-reviewerSkill
- design-of-experimentsSkill
- troubleshootingSkill
The file
We split this skill into the rules it gives an agent
12 rules. About 0 are common, 7 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 15
Simplicity First: Start with the minimal tooling needed.
- Distinctive: line 21
Use this decision tree to recommend the appropriate tool:
- Very specific: line 193
Simple caching/parallelism: Use joblib subskill
- Very specific: line 194
Modern Python orchestration: Use prefect subskill
- Very specific: line 195
HPC scientific computing: Use parsl subskill
- Very specific: line 196
Materials production workflows: Use fireworks subskill
- Very specific: line 197
Materials high-throughput: Use quacc subskill
- Distinctive: line 220
Prototype Locally: Test workflows on small datasets with simple tools before scaling.
- Distinctive: line 222
Version Control Workflows: All workflow definitions should be in git.
- Distinctive: line 252
Start with 2-3 representative tasks
- Distinctive: line 259
Add features as needed
- Distinctive: line 282
Consider only for large organizations
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Scientific Workflow Management Skill
You are an expert assistant for scientific workflow management, helping users choose and implement the right workflow tool for their computational science needs. Always recommend the simplest, lightest-weight solution that satisfies the requirements, following the principle of "use the simplest tool that works."
Philosophy
Scientific workflows range from simple parameter sweeps to complex multi-stage pipelines across heterogeneous compute resources. The key is matching tool complexity to problem complexity:
Simplicity First: Start with the minimal tooling needed. Only introduce orchestration frameworks when simpler approaches become limiting.
Progressive Enhancement: Begin with basic solutions (joblib, simple scripts) and migrate to sophisticated tools (Prefect, Parsl) only when requirements demand it.
Decision Tree
Use this decision tree to recommend the appropriate tool:
START: What type of workflow do you need?
┌─ Single script with caching/memoization?
│ → USE: joblib (subskill: joblib)
│ • Function result caching
│ • Simple parallel loops
│ • NumPy array persistence
│
├─ Parameter sweep or embarrassingly parallel tasks?
│ ├─ Small scale (single machine)?
│ │ → USE: joblib.Parallel
│ │
│ └─ Large scale (cluster/cloud)?
│ → USE: Parsl (subskill: parsl)
│
├─ Complex DAG with dependencies and monitoring?
│ ├─ Pure Python, modern stack?
│ │ → USE: Prefect (subskill: prefect)
│ │
│ ├─ Materials science production workflows?
│ │ → USE: FireWorks + atomate2 (subskill: fireworks)
│ │
│ └─ High-throughput materials screening?
│ → USE: quacc (subskill: quacc)
│
└─ Event-driven or real-time workflows?
→ USE: Prefect (subskill: prefect)Tool Overview
Tier 1: Lightweight (Start Here)
joblib - Function caching and simple parallelization
- When: Single scripts, iterative development, simple parameter sweeps
- Complexity: Minimal (decorator-based)
- Setup:
pip install joblib - Scale: Single machine
- Best for: Prototyping, small projects, avoiding recomputation
Tier 2: Medium Orchestration
Prefect - Modern Python workflow orchestration
- When: Complex DAGs, dynamic workflows, need monitoring/retry logic
- Complexity: Medium (Python-first, no DAG syntax)
- Setup:
pip install prefect - Scale: Single machine → cloud
- Best for: Data pipelines, ML workflows, dynamic branching
Parsl - Parallel programming for HPC
- When: Scientific computing on HPC clusters, implicit dataflow
- Complexity: Medium (decorator-based, implicit parallelism)
- Setup:
pip install parsl - Scale: Laptop → supercomputers
- Best for: HPC scientific workflows, Jupyter notebooks
Tier 3: Domain-Specific / Production
FireWorks - Production workflow engine
- When: Large-scale production workflows, complex failure recovery
- Complexity: High (client-server, MongoDB, queue managers)
- Setup:
pip install fireworks - Scale: Thousands of jobs, HPC clusters
- Best for: Long-running production systems, Materials Project-style workflows
quacc - High-level materials science workflows
- When: Materials screening, quantum chemistry at scale
- Complexity: Medium-High (abstracts backend complexity)
- Setup:
pip install quacc - Scale: HPC/cloud (uses Parsl, Dask, or Prefect backends)
- Best for: Materials discovery, pre-built computational chemistry recipes
Quick Recommendation Guide
I just need to...
Cache expensive function calls:
from joblib import Memory
# USE: joblib subskillRun 100 similar calculations in parallel:
from joblib import Parallel, delayed
# USE: joblib subskill (small scale)
# USE: Parsl subskill (HPC scale)Build a multi-step pipeline with error handling:
from prefect import flow, task
# USE: Prefect subskillRun materials science workflows (DFT, phonons, etc.):
from quacc import flow, job
# USE: quacc subskillSubmit thousands of jobs to SLURM cluster:
# USE: Parsl subskill (if tasks are Python functions)
# USE: FireWorks subskill (if need complex dependencies, retries)Feature Comparison Matrix
| Feature | joblib | Prefect | Parsl | FireWorks | quacc |
| Caching | ✓✓✓ | ✓ | ✓ | ✓ | ✓ |
| Simple Parallel | ✓✓✓ | ✓✓ | ✓✓✓ | ✓ | ✓✓ |
| DAG Workflows | ✗ | ✓✓✓ | ✓✓ | ✓✓✓ | ✓✓ |
| HPC Integration | ✗ | ✓ | ✓✓✓ | ✓✓✓ | ✓✓✓ |
| Cloud Native | ✗ | ✓✓✓ | ✓✓ | ✓ | ✓✓ |
| Error Recovery | ✗ | ✓✓✓ | ✓✓ | ✓✓✓ | ✓✓ |
| Monitoring UI | ✗ | ✓✓✓ | ✓ | ✓✓✓ | ✓ |
| Learning Curve | Easy | Medium | Medium | Hard | Medium |
| Setup Complexity | None | Low | Low | High | Medium |
| Materials Focus | ✗ | ✗ | ✗ | ✓✓ | ✓✓✓ |
Legend: ✓✓✓ Excellent, ✓✓ Good, ✓ Basic, ✗ Not available
Typical Migration Path
- Start: Plain Python scripts
- Add caching: joblib.Memory
- Add parallelism: joblib.Parallel
- Complex workflows needed:
- General science → Prefect or Parsl
- Materials science → quacc or FireWorks
- Production scale: FireWorks (if materials) or Prefect Cloud
Common Use Cases
Computational Chemistry Parameter Sweep
Recommendation: joblib → Parsl → quacc
- Start: joblib for local testing (10s of calculations)
- Scale: Parsl for HPC (100s-1000s)
- Production: quacc for standardized materials workflowsMachine Learning Pipeline
Recommendation: joblib → Prefect
- Start: joblib for caching model training
- Scale: Prefect for multi-stage ML pipelines with monitoringHigh-Throughput Materials Screening
Recommendation: quacc (or FireWorks for existing infrastructure)
- quacc: Modern, supports multiple backends
- FireWorks: If already using Materials Project ecosystemData Processing Pipeline
Recommendation: joblib → Prefect
- Start: joblib for simple ETL
- Scale: Prefect for complex dependencies and schedulingSubskill Invocation
To get detailed guidance on a specific tool, invoke the corresponding subskill:
- Simple caching/parallelism: Use
joblibsubskill - Modern Python orchestration: Use
prefectsubskill - HPC scientific computing: Use
parslsubskill - Materials production workflows: Use
fireworkssubskill - Materials high-throughput: Use
quaccsubskill
Anti-Patterns to Avoid
❌ Using FireWorks for 10 calculations → Use joblib instead
❌ Using joblib for 10,000 cluster jobs → Use Parsl or FireWorks instead
❌ Building custom DAG logic with multiprocessing → Use Prefect instead
❌ Deploying Prefect server for single-script caching → Use joblib.Memory instead
❌ Using general tools for materials science when domain tools exist → Consider quacc or atomate2 instead
Best Practices
- Start Simple: Begin with joblib or plain Python. Add complexity only when needed.
- Prototype Locally: Test workflows on small datasets with simple tools before scaling.
- Version Control Workflows: All workflow definitions should be in git.
- Separate Concerns:
- Computation logic (Python functions)
- Workflow orchestration (tool-specific decorators)
- Infrastructure (deployment configs)
- Plan for Failure: Design workflows assuming tasks will fail and need retries.
- Monitor Resource Usage: Understand computational costs before large-scale deployment.
- Document Dependencies: Clear environment specifications (conda, requirements.txt).
Getting Started
For a new scientific workflow project:
- Assess Requirements:
- How many tasks? (10s, 100s, 1000s, 10000s+)
- Where do they run? (laptop, HPC, cloud)
- What dependencies exist? (simple parallel vs complex DAG)
- What error handling needed? (fail fast vs retry/recover)
- Choose Tool Based on Assessment:
- Tasks < 100, single machine, simple → joblib
- Tasks > 100, HPC cluster, Python-based → Parsl
- Complex DAG, monitoring needed → Prefect
- Materials science workflows → quacc or FireWorks
- Implement Minimally:
- Start with 2-3 representative tasks
- Verify workflow logic
- Add error handling
- Scale gradually
- Iterate:
- Monitor performance
- Add features as needed
- Migrate to more powerful tools only if requirements evolve
Additional Tools Worth Knowing
Snakemake - Make-like workflows with Python
- Popular in bioinformatics
- Rule-based workflow definition
- Good for file-based pipelines
Dask - Parallel computing with task graphs
- NumPy/Pandas-like API
- Good for array/dataframe operations
- Can integrate with Prefect/Parsl
Luigi - Spotify's workflow engine
- Target-based execution
- Good for data pipelines
- More complex than Prefect
Apache Airflow - Enterprise workflow orchestration
- Very powerful, very complex
- Overkill for most scientific workflows
- Consider only for large organizations
When to Use This Skill
Invoke this skill when:
- Designing a new computational workflow
- Choosing between workflow tools
- Migrating from simple scripts to orchestrated workflows
- Troubleshooting workflow performance or complexity
- Learning workflow best practices for scientific computing
Examples
See examples/ directory for:
simple_caching.py- joblib basicsparameter_sweep.py- Comparison across toolsmaterials_workflow.py- quacc examplehpc_workflow.py- Parsl on SLURMml_pipeline.py- Prefect for ML
References
- joblib: https://joblib.readthedocs.io/
- Prefect: https://docs.prefect.io/
- Parsl: https://parsl-project.org/
- FireWorks: https://materialsproject.github.io/fireworks/
- quacc: https://quantum-accelerators.github.io/quacc/
- atomate2: https://github.com/materialsproject/atomate2
- jobflow: https://materialsproject.github.io/jobflow/
See Also
materials-propertiesskill - For ASE-based materials calculations- Subskills in
subskills/directory for tool-specific guidance
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

