workflow-orchestration-patterns
Offers architectural patterns for state management and fault-tolerant distributed systems using saga implementations.
Install
mkdir -p .claude/skills/workflow-orchestration-patterns && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/85" && unzip -o skill.zip -d .claude/skills/workflow-orchestration-patterns && rm skill.zipInstalls to .claude/skills/workflow-orchestration-patterns
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
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.Key capabilities
- →Separate workflow logic from activity execution
- →Implement saga patterns for distributed transactions
- →Manage long-running process state persistence
- →Configure activity timeouts and retries
- →Design idempotent background operations
How it works
Uses Temporal architectural principles to guide the separation of business logic (workflows) from side-effect-heavy tasks (activities).
Inputs & outputs
When to use workflow-orchestration-patterns
- →Orchestrate microservices via Temporal
- →Implement saga patterns for transactions
- →Design resilient long-running background tasks
About this skill
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
- Keep workflows focused - Single responsibility per workflow
- Small workflows - Use child workflows for scalability
- Clear boundaries - Workflow orchestrates, activities execute
- Test locally - Use time-skipping test environment
Activity Design
- Idempotent operations - Safe to retry
- Short-lived - Seconds to minutes, not hours
- Timeout configuration - Always set timeouts
- Heartbeat for long tasks - Report progress
- Error handling - Distinguish retryable vs non-retryable
Common Pitfalls
Workflow Violations:
- Using
datetime.now()instead ofworkflow.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:
- Workflows = orchestration, Activities = external calls
- Determinism is non-negotiable for workflows
- Idempotency is critical for activities
- State preservation is automatic
- Design for failure and recovery
When not to use it
- →Standard stateless request/response APIs
- →Simple data processing pipelines
Prerequisites
Limitations
- →High architectural complexity
- →Requires external infrastructure (Temporal server)
- →Strict determinism constraints for workflows
How it compares
It focuses on distributed system durability and state management rather than basic API implementation.
Compared to similar skills
workflow-orchestration-patterns side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| workflow-orchestration-patterns (this skill) | 10 | 2mo | No flags | Advanced |
| architecture-patterns | 55 | 2mo | No flags | Advanced |
| backend-expert | 0 | 1mo | No flags | Advanced |
| temporal | 0 | 3mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by wshobson
View all by wshobson →You might also like
architecture-patterns
wshobson
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use when architecting complex backend systems or refactoring existing applications for better maintainability.
backend-expert
FlavioProgramador
Advanced backend engineering guidelines focusing on clean architecture, API standards, performance, asynchronous jobs, and clean code principles.
temporal
TerminalSkills
>-
agentscope-java
agentscope-ai
Expert Java developer skill for AgentScope Java framework - a reactive, message-driven multi-agent system built on Project Reactor. Use when working with reactive programming, LLM integration, agent orchestration, multi-agent systems, or when the user mentions AgentScope, ReActAgent, Mono/Flux, Project Reactor, or Java agent development. Specializes in non-blocking code, tool integration, hooks, pipelines, and production-ready agent applications.
managing-api-cache
jeremylongshore
Implement intelligent API response caching with Redis, Memcached, and CDN integration. Use when optimizing API performance with caching. Trigger with phrases like "add caching", "optimize API performance", or "implement cache layer".
generating-grpc-services
jeremylongshore
Generate gRPC service definitions, stubs, and implementations from Protocol Buffers. Use when creating high-performance gRPC services. Trigger with phrases like "generate gRPC service", "create gRPC API", or "build gRPC server".