workflow-orchestration-patterns
Design reliable distributed workflows with Temporal patterns
こちらからも入手できます: wshobson
Building reliable distributed systems is challenging due to failures, timeouts, and state management complexity. This skill provides proven workflow orchestration patterns from Tempotal that handle failures automatically, preserve state across crashes, and scale horizontally.
スキルZIPをダウンロード
Claudeでアップロード
設定 → 機能 → スキル → スキルをアップロードへ移動
オンにして利用開始
テストする
「workflow-orchestration-patterns」を使用しています。 Design a payment workflow with inventory reservation, charge, and fulfillment steps
期待される結果:
Here is a saga pattern design: 1) ReserveInventoryActivity (compensation: ReleaseInventoryActivity), 2) ChargePaymentActivity (compensation: RefundPaymentActivity), 3) FulfillOrderActivity (compensation: CancelFulfillmentActivity). Register each compensation before execution. On any failure, run compensations in LIFO order. All activities must be idempotent.
「workflow-orchestration-patterns」を使用しています。 Why can't I use datetime.now() in my workflow?
期待される結果:
Workflows must be deterministic for replay. datetime.now() returns different values each time, breaking determinism. Use workflow.now() instead, which provides deterministic time based on workflow clock time. The same principle applies to random() - use workflow.random() for deterministic random numbers.
「workflow-orchestration-patterns」を使用しています。 How do I handle a 3rd party API call that might take hours?
期待される結果:
Use the Async Callback Pattern: 1) Activity sends request to external system, 2) Workflow waits for signal using workflow.wait_for_condition(), 3) External system calls webhook when complete, 4) Signal handler resumes workflow with response. Include timeout in case external system never responds.
セキュリティ監査
安全Static analysis detected 24 potential security issues (external commands, weak cryptography, system reconnaissance), but all are FALSE POSITIVES. The skill contains only markdown documentation with code examples in backticks for illustration purposes. No executable code is present - this is a purely educational skill about Temporal workflow patterns with pseudo-code diagrams and best practices. The 'backtick' patterns are markdown formatting, not shell execution. The 'weak cryptography' flags are false positives from words like 'temporal' matching crypto patterns. The skill is safe to publish.
低リスクの問題 (1)
品質スコア
作れるもの
E-commerce transaction coordination
Implement distributed transactions for order processing that reserves inventory, charges payment, and fulfills orders with automatic rollback on any failure
Long-running business process automation
Create multi-step approval workflows that span days or weeks with automatic state persistence, timeout handling, and human escalation logic
Microservices orchestration architecture
Design resilient service communication patterns using entity workflows and saga compensation instead of brittle distributed transactions
これらのプロンプトを試す
Design a Temporal workflow for a [domain] transaction that involves [steps]. Include compensation logic for each step and explain how to handle partial failures.
I have a state machine with [states] and transitions. Help me design this as a Temporal workflow with proper determinism and activity separation.
My workflow failed with determinism error. The code uses [code snippet]. Explain why this violates determinism and how to fix it using workflow-safe alternatives.
I need to process [number] items per day through workflows. Design a scalable architecture using fan-out/fan-in, child workflows, and task queue partitioning.
ベストプラクティス
- Keep workflows focused on orchestration logic - put all external calls in activities
- Make all activities idempotent so retries are safe - use idempotency keys or upserts
- Always configure timeouts and retry policies - distinguish between retryable and non-retryable errors
回避
- Calling external APIs or databases directly from workflow code - always use activities
- Using datetime.now(), random(), or threading in workflows - breaks determinism and replay
- Making activities non-idempotent - retries will cause duplicate side effects