Skip to content
cccskills
FreePublished on GitHub

workflow-automation

Architect durable, event-driven workflows using step functions, retry strategies, idempotency, fan-out patterns, and the critical differences between orchestration approaches.

The English summary is being prepared. Showing the original description.

Works withRedis
See how to install

Files included (3)

  • SKILL.md5.7 KB
  • references/inngest.md2.2 KB
  • references/temporal.md1.8 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

Workflow Automation

You are a workflow architect who understands the fundamental tradeoff: simplicity vs. correctness. Every workflow platform sits somewhere on that spectrum. Your job is to pick the right point for the user's situation and implement it correctly.

When to Use

  • Background jobs that must complete even if the server restarts
  • Multi-step processes where partial completion is worse than failure (payments, onboarding)
  • Event-driven architectures where one event triggers multiple independent reactions
  • Scheduled/recurring tasks that need observability and retry guarantees
  • Any process where "it probably ran" is not acceptable

When NOT to Use

  • Simple fire-and-forget tasks (use a queue or a delay)
  • Synchronous request-response flows
  • Tasks under 100ms that don't involve external services

Ecosystem-Specific References

After reading the methodology below, read the reference matching your orchestration platform:

PlatformReferenceBest For
Inngestreferences/inngest.mdServerless, event-driven, fast shipping
Temporalreferences/temporal.mdComplex orchestration, human-in-the-loop
BullMQreferences/bullmq.mdSimple job queues, rate limiting, Redis stack

Core Concept: Durable Execution

Wrap each unit of work in a step, so the system can retry, resume, and checkpoint independently.

Without durable execution:
  fetch data → process → save → send email
           ↑ server crashes here
           ↓ entire pipeline reruns from scratch
           ↓ customer gets duplicate email

With durable execution:
  step("fetch")   ✓ saved
  step("process") ✓ saved
  step("save")    ← server crashes here
  step("save")    ← retries ONLY this step
  step("email")   ✓ runs once

Platform Decision Matrix

FactorInngestTemporalBullMQ
ComplexityLow (serverless functions)High (workers + server)Medium (Redis-backed)
DurabilitySteps checkpointedFull workflow replayJob-level retry
InfrastructureManaged or self-hostedRequires Temporal ServerRequires Redis
Best forServerless, event-drivenComplex orchestrationSimple job queues
Learning curve1-2 days1-2 weeks1-2 days
Language supportTS, Python, GoTS, Go, Java, Python, .NETTS/JS only

Decision Rules

  1. Serverless + event-driven? → Inngest
  2. Complex orchestration, human-in-the-loop, multi-day? → Temporal
  3. Simple job queue, Redis already in stack? → BullMQ
  4. Team of 1-3, shipping fast? → Inngest
  5. Enterprise, compliance-heavy, Java/.NET stack? → Temporal

Pattern 1: Sequential Steps

Each step depends on the previous result. Steps checkpoint independently.

step("create-db-record")       → returns user
step("create-stripe-customer") → uses user.email
step("send-welcome-email")     → uses user.email

If step 2 fails, only step 2 retries. Steps 1 and 3 are not re-executed.


Pattern 2: Fan-Out (Parallel Execution)

One event triggers multiple independent workflows. Each runs and retries independently.

Event: user/signup.completed
  → Workflow A: send-welcome-email   (independent)
  → Workflow B: create-stripe-trial  (independent)
  → Workflow C: provision-workspace  (independent)

If Workflow B fails, Workflows A and C are unaffected.


Pattern 3: Idempotency

Prevent duplicate execution when the same event fires twice.

Rule: Idempotency at the workflow level AND the external call level. Belt and suspenders.

  • Workflow level: Deduplicate by event ID or business key (e.g., order ID)
  • External call level: Use idempotency keys on payment APIs, email sends, etc.

Pattern 4: Scheduled/Recurring

Cron-triggered workflows with observability:

  • Scheduled trigger (e.g., daily at 9am)
  • Steps checkpoint independently
  • Failed runs are visible, retriable, and alertable

Pattern 5: Human-in-the-Loop

Workflows that pause and wait for external input — approval flows, multi-day processes.

workflow: purchaseWorkflow(amount)
  if amount > threshold:
    pause and wait for approval signal (up to 72h)
    if no approval → deny
  continue with purchase

Sharp Edges

IssueSeverityRule
No idempotency keys on external callsCriticalALWAYS use idempotency keys for payments, emails, mutations
Side effects in workflow code (Temporal)CriticalWorkflows must be deterministic — no I/O, no random, no clock
Giant payloads in step resultsHighSteps serialize data — keep under 256KB
No timeouts on activitiesHighALWAYS set timeouts — default infinite hangs forever
Linear retry without backoffMediumALWAYS use exponential backoff
Missing dead letter handlingHighFailed-after-all-retries jobs need a destination
Monolithic workflowsMediumBreak workflows >10 steps into child workflows

Anti-Patterns

Don'tDo
setTimeout(fn, 3600000) for delaysPlatform sleep — survives restarts
Global variables for workflow stateStep results and explicit state passing
Retry loops in application codePlatform-level retry policies
Polling in a loop for completionEvent-driven triggers or workflow signals
One giant function with all logicDecompose into steps/activities

Related Skills

Works with: error-handling-patterns, deployment-procedures

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Audit and improve web accessibility following WCAG 2.1 guidelines. Use when asked to "improve accessibility", "a11y audit", "WCAG compliance", "screen reader support", "keyboard navigation", or "make accessible".

The English summary is being prepared. Showing the original description.

RepairYourTech/cfsa-antigravity6Updated Aug 16, 2026

Structured methodology for adversarial thinking — generating attack scenarios, abuse cases, race conditions, and security edge cases against specs and implementations. Produces spec-level gap items, not code-level fixes.

The English summary is being prepared. Showing the original description.

RepairYourTech/cfsa-antigravity6Updated Aug 16, 2026

Orchestrate multiple Antigravity skills through guided workflows for SaaS MVP delivery, security audits, AI agent builds, and browser QA.

The English summary is being prepared. Showing the original description.

RepairYourTech/cfsa-antigravity6Updated Aug 16, 2026

Master REST and GraphQL API design principles to build intuitive, scalable, and maintainable APIs that delight developers. Use when designing new APIs, reviewing API specifications, or establishing API design standards.

The English summary is being prepared. Showing the original description.

RepairYourTech/cfsa-antigravity6Updated Aug 16, 2026

Manage API versioning and evolution with URL/header/query strategies, deprecation workflows, breaking change classification, sunset headers, and consumer-driven contract testing. Use when designing versioning strategy, deprecating endpoints, or evolving API contracts.

The English summary is being prepared. Showing the original description.

RepairYourTech/cfsa-antigravity6Updated Aug 16, 2026

Analyzes codebase structure, data flow, module relationships, and key patterns to generate and maintain a living architecture document (ARCHITECTURE.md).

The English summary is being prepared. Showing the original description.

RepairYourTech/cfsa-antigravity6Updated Aug 16, 2026

See all skills by RepairYourTech

Report a problem with this skill