# Temporal Determinism Audit

> Audit Temporal .NET workflow code for determinism/replay safety and produce compile-ready fixes. Use when this capability is needed.

- Skill: `tomevault-io/temporal-determinism-audit` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/temporal-determinism-audit`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/temporal-determinism-audit/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/temporal-determinism-audit

---


# Temporal Determinism Audit (C#)

## When to use
Use this skill when the user:
- pastes workflow code or a workflow diff
- asks “is this safe in a workflow?”
- gets replay / nondeterminism errors
- reports flaky behavior that could be replay-related

## Required output
Always produce:
1. **Findings** (bullets; severity: `breaks replay` / `risky` / `ok`)
2. **Fix** (compile-ready patch or rewritten snippet)
3. **Placement** (Workflow / Activity / Worker / Client)
4. **Replay note** (why this matters on replay)

## Non-negotiable forbidden list (workflows)
- `Task.Run`, `Thread.Sleep`, `Task.Delay`
- `DateTime.UtcNow` (use `Workflow.Now`)
- `Guid.NewGuid()` (use `Workflow.NewGuid()`)
- Random number generators (unless via Temporal deterministic APIs)
- Locks/monitors/semaphores
- Any file/network/database IO
- Static mutable state

## Approved substitutes (workflows)
- `Workflow.DelayAsync`
- `Workflow.Now`
- `Workflow.NewGuid()`
- Deterministic control flow + calling Activities for side effects

## Common rewrite patterns
- Move side effects into `[Activity]` methods
- Use activity retry options (don’t “hide” failures)
- Replace timers/delays with Temporal workflow timers

## If context is missing
Assume code is workflow code unless the user states otherwise, and explicitly state that assumption.

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/rebeccapowell) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-13 -->

