Skip to content
Back to skills

Temporal Workflows

ASecurity

Author durable Temporal workflows safely: determinism constraints, idempotent activities, versioning and retries

  • 5 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
developmentgoapibackend

Works with

  • api

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add AdityaaaTiwari/ANVIL --skill temporal-workflows --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Temporal Workflows?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Temporal Workflows
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/adityaaatiwari-temporal-workflows/badge)](https://www.skillsdirectory.com/skills/adityaaatiwari-temporal-workflows)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
description: Author durable Temporal workflows safely: determinism constraints, idempotent activities, versioning and retries
profile: standard
tags: temporal, workflows, backend, distributed-systems
---

# Temporal workflows

Use when writing or modifying Temporal workflow definitions, activities, task queues, or worker setups.

## Workflow determinism (non-negotiable)
Workflow replay re-executes your workflow function from event history:
- Never use `Date.now()`, `Math.random()`, `crypto.randomUUID()`, network calls, filesystem I/O, or non-deterministic map iteration inside workflow code. Use Temporal's deterministic SDK APIs (`workflow.uuid4`, `sleep`, `condition`).
- Isolate every external API call, DB write, and side effect inside **Activities** executed via `proxyActivities`.

## Activities, timeouts and heartbeats
- Set explicit `startToCloseTimeout` on every activity (and `scheduleToCloseTimeout` where queue lag matters). Send `heartbeat()` inside long-running loops so workers detect stalls promptly.
- Make every activity idempotent (keyed by workflow ID + activity ID or business key) because Temporal retries activities at-least-once on transient failures.
- Throw `ApplicationFailure.nonRetryable(...)` for permanent validation or business errors so workers do not retry dead requests until expiry.

## Evolution and deployment
Wrap breaking control-flow edits on live running workflows in `patched(...)` / `getVersion(...)` gates and drain workers carefully before removing old branches.

## Verify
Replay existing production/fixture event histories with `TestWorkflowEnvironment` / workflow replayer to catch non-determinism before deploying.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.