Skip to content
Back to skills

Principle Make Operations Idempotent

ASecurity

For steps that retry after crashes, make every rerun reach one end state.

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
ai-agentsgo

Security analysis

A100/100

Scanned November 30, 2026

npx -y skills add jueyi6/empstack --skill principle-make-operations-idempotent --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Principle Make Operations Idempotent?

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

Security grade badge for Principle Make Operations Idempotent
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/jueyi6-principle-make-operations-idempotent/badge)](https://www.skillsdirectory.com/skills/jueyi6-principle-make-operations-idempotent)

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
---
name: principle-make-operations-idempotent
description: For steps that retry after crashes, make every rerun reach one end state.
disable-model-invocation: true
---

# Make Operations Idempotent

Design every state-changing operation to converge to the correct state however many times it runs and wherever the previous run stopped.

Derive each step from the state that exists, not from what the previous run meant to do. Read the current state, compare it to the goal, and apply only the difference.

Anything a run leaves behind (a lock, a temporary file, a half-written record, a claimed job) must be recognizable as stale by the next run, by evidence that holds wherever the previous run could have stopped. Write to a temporary path and rename it into place.

The test: what happens if this runs twice? What if the previous run crashed at every possible point? If the answer depends on what was left behind, add a reconciliation step.

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 ai-agents →

Comments

Loading comments…

Newsletter

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