Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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.
.claude/skills/microck-workflow-orchestration-patterns/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-07 | ✗→✓ | ▲ Improved | 48% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 75% | 0% |
| case-19 | ✗→✓ | ▲ Improved | 96% | 0% |
| case-03 | ✓→✓ | = Same ✓ | 57% | 0% |
| case-01 | ✓→✓ | = Same ✓ | 81% | 0% |
Master workflow orchestration architecture with Temporal, covering fundamental design decisions, resilience patterns, and best practices for building reliable distributed systems.
The Fundamental Rule (Source: temporal.io/blog/workflow-engine-principles):
Characteristics:
Example workflow tasks:
Characteristics:
Example activity tasks:
Does it touch external systems? → Activity
Is it orchestration/decision logic? → WorkflowPurpose: Implement distributed transactions with rollback capability
Pattern (Source: temporal.io/blog/compensating-actions-part-of-a-complete-breakfast-with-sagas):
For each step:
1. Register compensation BEFORE executing
2. Execute the step (via activity)
3. On failure, run all compensations in reverse order (LIFO)Example: Payment Workflow
Critical Requirements:
Purpose: Long-lived workflow representing single entity instance
Pattern (Source: docs.temporal.io/evaluate/use-cases-design-patterns):
Example Use Cases:
Benefits:
Purpose: Execute multiple tasks in parallel, aggregate results
Pattern:
Scaling Rule (Source: temporal.io/blog/workflow-engine-principles):
Purpose: Wait for external event or human approval
Pattern:
Use Cases:
How Temporal Works (Source: docs.temporal.io/workflows):
Workflows Execute as State Machines:
Prohibited in Workflows (Source: docs.temporal.io/workflows):
random())datetime.now())Allowed in Workflows:
workflow.now() (deterministic time)workflow.random() (deterministic random)Challenge: Changing workflow code while old executions still running
Solutions:
workflow.get_version() for safe changesDefault Behavior: Temporal retries activities forever
Configure Retry:
Non-Retryable Errors:
Why Critical (Source: docs.temporal.io/activities):
Implementation Strategies:
Purpose: Detect stalled long-running activities
Pattern:
Workflow Violations:
datetime.now() instead of workflow.now()Activity Mistakes:
Monitoring:
Scalability:
Official Documentation:
Key Principles:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | pass→pass | 14,797 | 11,696 | -21% | 1 | 1 | 0% | 2,393 | 3,766 | +57% | 0 | 0 | — |
case-01 | pass→pass | 15,300 | 15,585 | +2% | 1 | 1 | 0% | 2,479 | 4,491 | +81% | 0 | 0 | — |
case-02 | pass→pass | 16,432 | 11,387 | -31% | 1 | 1 | 0% | 2,404 | 3,679 | +53% | 0 | 0 | — |
case-04 | pass→pass | 11,480 | 5,746 | -50% | 1 | 1 | 0% | 1,678 | 2,853 | +70% | 0 | 0 | — |
case-05 | pass→pass | 9,549 | 5,428 | -43% | 1 | 1 | 0% | 1,581 | 2,778 | +76% | 0 | 0 | — |
case-06 | pass→pass | 11,483 | 8,790 | -23% | 1 | 1 | 0% | 1,926 | 3,399 | +76% | 0 | 0 | — |
case-07 | fail→pass | 10,514 | 5,833 | -45% | 1 | 1 | 0% | 1,878 | 2,782 | +48% | 0 | 0 | — |
case-08 | pass→pass | 4,217 | 3,892 | -8% | 1 | 1 | 0% | 678 | 2,536 | +274% | 0 | 0 | — |
case-09 | fail→pass | 17,758 | 19,364 | +9% | 1 | 1 | 0% | 2,954 | 5,176 | +75% | 0 | 0 | — |
case-10 | pass→pass | 15,327 | 16,419 | +7% | 1 | 1 | 0% | 2,431 | 4,566 | +88% | 0 | 0 | — |
case-11 | pass→pass | 10,990 | 13,036 | +19% | 1 | 1 | 0% | 1,658 | 3,833 | +131% | 0 | 0 | — |
case-12 | pass→pass | 14,270 | 16,052 | +12% | 1 | 1 | 0% | 2,269 | 4,646 | +105% | 0 | 0 | — |
case-13 | pass→pass | 8,680 | 4,729 | -46% | 1 | 1 | 0% | 1,328 | 2,720 | +105% | 0 | 0 | — |
case-14 | pass→pass | 15,167 | 8,153 | -46% | 1 | 1 | 0% | 1,695 | 3,231 | +91% | 0 | 0 | — |
case-15 | pass→pass | 12,188 | 9,674 | -21% | 1 | 1 | 0% | 2,079 | 3,525 | +70% | 0 | 0 | — |
case-16 | pass→pass | 14,364 | 14,295 | -0% | 1 | 1 | 0% | 2,207 | 4,343 | +97% | 0 | 0 | — |
case-17 | pass→pass | 10,769 | 9,715 | -10% | 1 | 1 | 0% | 1,647 | 3,427 | +108% | 0 | 0 | — |
case-18 | pass→pass | 11,080 | 9,941 | -10% | 1 | 1 | 0% | 1,622 | 3,378 | +108% | 0 | 0 | — |
case-19 | fail→pass | 9,871 | 6,139 | -38% | 1 | 1 | 0% | 1,416 | 2,777 | +96% | 0 | 0 | — |
case-20 | pass→pass | 7,781 | 4,824 | -38% | 1 | 1 | 0% | 1,060 | 2,674 | +152% | 0 | 0 | — |
case-21 | pass→pass | 11,752 | 6,954 | -41% | 1 | 1 | 0% | 1,818 | 2,926 | +61% | 0 | 0 | — |
case-22 | pass→pass | 9,141 | 7,962 | -13% | 1 | 1 | 0% | 1,480 | 3,312 | +124% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +14 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.