Design durable workflows with Temporal for distributed

Workflow orchestration patterns

by wshobson · MIT license · ★ 39,857 on GitHub · updated Sep 21

Workflow orchestration patterns cover

Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints.

---
name: workflow-orchestration-patterns
description: Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.
---

# Workflow Orchestration Patterns

Master workflow orchestration architecture with Temporal, covering fundamental design decisions, resilience patterns, and best practices for building reliable distributed systems.

## When to Use Workflow Orchestration

### Ideal Use Cases (Source: docs.temporal.io)

- **Multi-step processes** spanning machines/services/databases
- **Distributed transactions** requiring all-or-nothing semantics
- **Long-running workflows** (hours to years) with automatic state persistence
- **Failure recovery** that must resume from last successful step
- **Business processes**: bookings, orders, campaigns, approvals

Overview

Master workflow orchestration architecture with Temporal, covering fundamental design decisions, resilience patterns, and best practices for building reliable distributed systems.

Manual install (npx, ZIP)
Claude Codenpx skills add wshobson/agents --skill workflow-orchestration-patterns -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/wshobson/agents/tar.gz/4236bb91f839 \ | tar -xz -C ~/.claude/skills --strip-components=4 agents-4236bb91f839/plugins/backend-development/skills/workflow-orchestration-patterns
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/f0dd99ca05c778f8986b/workflow-orchestration-patterns.zip" -OutFile "$env:TEMP\workflow-orchestration-patterns.zip"; Expand-Archive "$env:TEMP\workflow-orchestration-patterns.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md3.4 KB
  • references/1 file · 5.8 KB
Read the files here
wshobson/4236bb92 files
SKILL.md
Show the full text99 lines

Workflow Orchestration Patterns

Master workflow orchestration architecture with Temporal, covering fundamental design decisions, resilience patterns, and best practices for building reliable distributed systems.

When to Use Workflow Orchestration

Ideal Use Cases (Source: docs.temporal.io)
  • Multi-step processes spanning machines/services/databases
  • Distributed transactions requiring all-or-nothing semantics
  • Long-running workflows (hours to years) with automatic state persistence
  • Failure recovery that must resume from last successful step
  • Business processes: bookings, orders, campaigns, approvals
  • Entity lifecycle management: inventory tracking, account management, cart workflows
  • Infrastructure automation: CI/CD pipelines, provisioning, deployments
  • Human-in-the-loop systems requiring timeouts and escalations
When NOT to Use
  • Simple CRUD operations (use direct API calls)
  • Pure data processing pipelines (use Airflow, batch processing)
  • Stateless request/response (use standard APIs)
  • Real-time streaming (use Kafka, event processors)

Detailed patterns and worked examples

Detailed pattern documentation lives in references/details.md. Read that file when the navigation tier above is insufficient.

Best Practices

Workflow Design
  1. Keep workflows focused - Single responsibility per workflow
  2. Small workflows - Use child workflows for scalability
  3. Clear boundaries - Workflow orchestrates, activities execute
  4. Test locally - Use time-skipping test environment
Activity Design
  1. Idempotent operations - Safe to retry
  2. Short-lived - Seconds to minutes, not hours
  3. Timeout configuration - Always set timeouts
  4. Heartbeat for long tasks - Report progress
  5. Error handling - Distinguish retryable vs non-retryable
Common Pitfalls

Workflow Violations:

  • Using datetime.now() instead of workflow.now()
  • Threading or async operations in workflow code
  • Calling external APIs directly from workflow
  • Non-deterministic logic in workflows

Activity Mistakes:

  • Non-idempotent operations (can't handle retries)
  • Missing timeouts (activities run forever)
  • No error classification (retry validation errors)
  • Ignoring payload limits (2MB per argument)
Operational Considerations

Monitoring:

  • Workflow execution duration
  • Activity failure rates
  • Retry attempts and backoff
  • Pending workflow counts

Scalability:

  • Horizontal scaling with workers
  • Task queue partitioning
  • Child workflow decomposition
  • Activity batching when appropriate

Additional Resources

Official Documentation:

  • Temporal Core Concepts: docs.temporal.io/workflows
  • Workflow Patterns: docs.temporal.io/evaluate/use-cases-design-patterns
  • Best Practices: docs.temporal.io/develop/best-practices
  • Saga Pattern: temporal.io/blog/saga-pattern-made-easy

Key Principles:

  1. Workflows = orchestration, Activities = external calls
  2. Determinism is non-negotiable for workflows
  3. Idempotency is critical for activities
  4. State preservation is automatic
  5. Design for failure and recovery
1---
2name: workflow-orchestration-patterns
3description: Design durable workflows with Temporal for distributed systems. Covers workflow vs activity separation, saga patterns, state management, and determinism constraints. Use when building long-running processes, distributed transactions, or microservice orchestration.
4---
5 
6# Workflow Orchestration Patterns
7 
8Master workflow orchestration architecture with Temporal, covering fundamental design decisions, resilience patterns, and best practices for building reliable distributed systems.
9 
10## When to Use Workflow Orchestration
11 
12### Ideal Use Cases (Source: docs.temporal.io)
13 
14- **Multi-step processes** spanning machines/services/databases
15- **Distributed transactions** requiring all-or-nothing semantics
16- **Long-running workflows** (hours to years) with automatic state persistence
17- **Failure recovery** that must resume from last successful step
18- **Business processes**: bookings, orders, campaigns, approvals
19- **Entity lifecycle management**: inventory tracking, account management, cart workflows
20- **Infrastructure automation**: CI/CD pipelines, provisioning, deployments
21- **Human-in-the-loop** systems requiring timeouts and escalations
22 
23### When NOT to Use
24 
25- Simple CRUD operations (use direct API calls)
26- Pure data processing pipelines (use Airflow, batch processing)
27- Stateless request/response (use standard APIs)
28- Real-time streaming (use Kafka, event processors)
29 
30## Detailed patterns and worked examples
31 
32Detailed pattern documentation lives in `references/details.md`. Read that file when the navigation tier above is insufficient.
33 
34## Best Practices
35 
36### Workflow Design
37 
381. **Keep workflows focused** - Single responsibility per workflow
392. **Small workflows** - Use child workflows for scalability
403. **Clear boundaries** - Workflow orchestrates, activities execute
414. **Test locally** - Use time-skipping test environment
42 
43### Activity Design
44 
451. **Idempotent operations** - Safe to retry
462. **Short-lived** - Seconds to minutes, not hours
473. **Timeout configuration** - Always set timeouts
484. **Heartbeat for long tasks** - Report progress
495. **Error handling** - Distinguish retryable vs non-retryable
50 
51### Common Pitfalls
52 
53**Workflow Violations**:
54 
55- Using `datetime.now()` instead of `workflow.now()`
56- Threading or async operations in workflow code
57- Calling external APIs directly from workflow
58- Non-deterministic logic in workflows
59 
60**Activity Mistakes**:
61 
62- Non-idempotent operations (can't handle retries)
63- Missing timeouts (activities run forever)
64- No error classification (retry validation errors)
65- Ignoring payload limits (2MB per argument)
66 
67### Operational Considerations
68 
69**Monitoring**:
70 
71- Workflow execution duration
72- Activity failure rates
73- Retry attempts and backoff
74- Pending workflow counts
75 
76**Scalability**:
77 
78- Horizontal scaling with workers
79- Task queue partitioning
80- Child workflow decomposition
81- Activity batching when appropriate
82 
83## Additional Resources
84 
85**Official Documentation**:
86 
87- Temporal Core Concepts: docs.temporal.io/workflows
88- Workflow Patterns: docs.temporal.io/evaluate/use-cases-design-patterns
89- Best Practices: docs.temporal.io/develop/best-practices
90- Saga Pattern: temporal.io/blog/saga-pattern-made-easy
91 
92**Key Principles**:
93 
941. Workflows = orchestration, Activities = external calls
952. Determinism is non-negotiable for workflows
963. Idempotency is critical for activities
974. State preservation is automatic
985. Design for failure and recovery
99 
View all files on GitHub →

Details

Updated
Sep 21, 2026
License
MIT
Stars on the repo
★ 39,857
Checked
Source
wshobson/agents ↗
Creator
wshobson · 179 listings
View creator

Similar skills

See all →
SkillWeb browser automation with AI-optimized snapshotsBrowser Automation Skillruvnet/RuView · by ruvnetWeb browser automation with AI-optimized snapshots for claude-flow agents★ 94.7k GitHub starsSkillDeepEval evaluation workflow for AI agentsconfident-ai/deepeval · by confident-aiDeepEval evaluation workflow for AI agents and LLM applications. TRIGGER when the user wants to evaluate or improve an AI agent, tool-using workflow, multi-turn chatbot, RAG pipeline, or LLM app; add evals; generate datasets or goldens; use deepeval generate; use deepeval test run; send results to Confident AI; monitor production; run online evals; inspect traces; or iterate on prompts, tools, retrieval, or agent behavior from eval failures. AI agents are the primary use case. Covers Python SDK, pytest eval suites, CLI generation, traced evals, Confident AI reporting, and agent-driven improvement loops. DO NOT TRIGGER for unrelated generic pytest, non-AI test setup, or non-DeepEval observability work unless the user asks to compare or migrate to DeepEval; for instrumenting an app with DeepEval tracing, @observe, or framework integrations (use the `deepeval-tracing` skill); or for raw OpenTelemetry / OTLP export without the deepeval package (use the `deepeval-otel` skill).★ 18.7k GitHub starsSkillBrowser automation with persistent named pagesDev browserSawyerHood/dev-browser · by SawyerHoodBrowser automation with persistent named pages via the dev-browser CLI. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, log into sites, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", "open the browser", or any browser interaction request.★ 6.7k GitHub starsSkillTurn visible project context, a proven thread, skillTurn into appBuilderIO/skills · by BuilderIOTurn visible project context, a proven thread, skill, or workflow into a runnable Agent-Native app with simple buttons, visible agent steps, preview, and deployment handoff. Use when a user invokes `/turn-into-app` or asks to make a workflow into an app, including from Claude or ChatGPT on the web, including when the source is a spreadsheet link or upload.★ 4.5k GitHub starsSkillComplete browser automation with PlaywrightPlaywright Browser Automationlackeyjb/playwright-skill · by lackeyjbComplete browser automation with Playwright. Auto-detects dev servers, writes reusable test scripts, and supports screenshots, responsive checks, UX validation, login flows, link checks, and arbitrary browser automation. Use when the user wants to test a website, automate browser interactions, validate web functionality, or perform browser-based testing.★ 3.2k GitHub starsSkillUse TinyFish for web search, fetching URLs, reading pagesTinyFish CLItinyfish-io/tinyfish-cookbook · by tinyfish-ioUse TinyFish for web search, fetching URLs, reading pages, current information, source-backed answers, research, docs, pricing/product pages, extraction, scraping, and browser automation. Use whenever the user asks to search, find, look up, research, compare, get information from the web, summarize a URL, fetch page content, or automate a website.★ 2.2k GitHub stars

More from wshobson

SkillMaster C/.NET backend development patterns for buildingwshobson/agents · by wshobsonMaster C#/.NET backend development patterns for building robust APIs, MCP servers, and enterprise applications. Covers async/await, dependency injection, Entity Framework Core, Dapper, configuration, caching, and testing with xUnit. Use when developing .NET backends, reviewing C# code, or designing API architectures.★ 39.9k GitHub starsSkillImplement WCAG 2.2 compliant interfaces with mobileAccessibility compliancewshobson/agents · by wshobsonImplement WCAG 2.2 compliant interfaces with mobile accessibility, inclusive design patterns, and assistive technology support. Use when auditing accessibility, implementing ARIA patterns, building for screen readers, or ensuring inclusive user experiences.★ 39.9k GitHub starsSkillMaster Material Design 3 and Jetpack Compose patternsAndroid Mobile Designwshobson/agents · by wshobsonMaster Material Design 3 and Jetpack Compose patterns for building native Android apps. Use when designing Android interfaces, implementing Compose UI, or following Google's Material Design guidelines.★ 39.9k GitHub starsSkillMigrate from AngularJS to Angular using hybrid modeAngular migrationwshobson/agents · by wshobsonMigrate from AngularJS to Angular using hybrid mode, incremental component rewriting, and dependency injection updates. Use when upgrading AngularJS applications, planning framework migrations, or modernizing legacy Angular code.★ 39.9k GitHub starsSkillUnderstand anti-reversing, obfuscationAnti reversing techniqueswshobson/agents · by wshobsonUnderstand anti-reversing, obfuscation, and protection techniques encountered during software analysis. Use this skill when analyzing malware evasion techniques, when implementing anti-debugging protections for CTF challenges, when reverse engineering packed binaries, or when building security research tools that need to detect virtualized environments.★ 39.9k GitHub starsSkillBuild production Apache Airflow DAGs with best practicesApache Airflow DAG Patternswshobson/agents · by wshobsonBuild production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. Use when creating data pipelines, orchestrating workflows, or scheduling batch jobs.★ 39.9k GitHub stars