MR
Mayur Rathi
@mayurrathi
⭐ 40.7k GitHub stars

Workflow Orchestration Patterns

Workflow Orchestration Patterns is an design AI skill with a core value of Design durable workflows with Temporal for distributed systems. It helps developers solve real-world problems in the design domain, boosting efficiency, automating repetitive tasks, and optimizing workflows.

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 ...

Last verified on: 2026-07-07

Quick Facts

Category design
Works With Claude
Source sickn33/antigravity-awesome-skills
Stars ⭐ 40.7k
Last Verified 2026-07-07
Risk Level Low
mkdir -p ./skills/workflow-orchestration-patterns && curl -sfL https://raw.githubusercontent.com/sickn33/antigravity-awesome-skills/main/skills/workflow-orchestration-patterns/SKILL.md -o ./skills/workflow-orchestration-patterns/SKILL.md

Run in terminal / PowerShell. Requires curl (Unix) or PowerShell 5+ (Windows).

Skill Content

# Workflow Orchestration Patterns


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


Use this skill when


- Working on workflow orchestration patterns tasks or workflows

- Needing guidance, best practices, or checklists for workflow orchestration patterns


Do not use this skill when


- The task is unrelated to workflow orchestration patterns

- You need a different domain or tool outside this scope


Instructions


- Clarify goals, constraints, and required inputs.

- Apply relevant best practices and validate outcomes.

- Provide actionable steps and verification.

- If detailed examples are required, open `resources/implementation-playbook.md`.


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)


Critical Design Decision: Workflows vs Activities


**The Fundamental Rule** (Source: temporal.io/blog/workflow-engine-principles):


- **Workflows** = Orchestration logic and decision-making

- **Activities** = External interactions (APIs, databases, network calls)


Workflows (Orchestration)


**Characteristics:**


- Contain business logic and coordination

- **MUST be deterministic** (same inputs → same outputs)

- **Cannot** perform direct external calls

- State automatically preserved across failures

- Can run for years despite infrastructure failures


**Example workflow tasks:**


- Decide which steps to execute

- Handle compensation logic

- Manage timeouts and retries

- Coordinate child workflows


Activities (External Interactions)


**Characteristics:**


- Handle all external system interactions

- Can be non-deterministic (API calls, DB writes)

- Include built-in timeouts and retry logic

- **Must be idempotent** (calling N times = calling once)

- Short-lived (seconds to minutes typically)


**Example activity tasks:**


- Call payment gateway API

- Write to database

- Send emails or notifications

- Query external services


Design Decision Framework


text
Does it touch external systems? → Activity
Is it orchestration/decision logic? → Workflow

Core Workflow Patterns


1. Saga Pattern with Compensation


**Purpose**: Implement distributed transactions with rollback capability


**Pattern** (Source: temporal.io/blog/compensating-actions-part-of-a-complete-breakfast-with-sagas):


text
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**


1. Reserve inventory (compensation: release inventory)

2. Charge payment (compensation: refund payment)

3. Fulfill order (compensation: cancel fulfillment)


**Critical Requirements:**


- Compensations must be idempotent

- Register compensation BEFORE executing step

- Run compensations in reverse order

- Handle partial failures gracefully


2. Entity Workflows (Actor Model)


**Purpose**: Long-lived workflow representing single entity instance


**Pattern** (Source: docs.temporal.io/evaluate/use-cases-design-patterns):


- One workflow execution = one entity (cart, account, inventory ite

🎯 Best For

  • UI designers
  • Product designers
  • Claude users
  • Designers
  • Creative professionals

💡 Use Cases

  • Generating component mockups
  • Creating design system tokens
  • Design system documentation
  • Component specification creation

📖 How to Use This Skill

  1. 1

    Install the Skill

    Copy the install command from the Terminal tab and run it. The SKILL.md file downloads to your local skills directory.

  2. 2

    Load into Your AI Assistant

    Open Claude and reference the skill. Paste the SKILL.md content or use the system prompt tab.

  3. 3

    Apply Workflow Orchestration Patterns to Your Work

    Provide context for your task — paste source material, describe your audience, or share existing work to guide the AI.

  4. 4

    Review and Refine

    Edit the AI output for accuracy, tone, and completeness. Add human insight where the AI lacks context.

❓ Frequently Asked Questions

Does this work with Figma?

Some design skills integrate with Figma plugins. Check the Works With section for supported tools.

Does Workflow Orchestration Patterns generate production-ready design specs?

It generates detailed specifications that developers can use directly. Review and adjust for your specific design system.

How do I install Workflow Orchestration Patterns?

Copy the install command from the Terminal tab and run it. The skill downloads to ./skills/workflow-orchestration-patterns/SKILL.md, ready to use.

Can I customize this skill for my team?

Absolutely. Edit the SKILL.md file to add team-specific instructions, examples, or workflows.

⚠️ Common Mistakes to Avoid

Skipping usability testing

AI-generated designs should be validated with real users before development.

Not reading the full skill

Skills contain important context and edge cases beyond the quick start.

🔗 Related Skills