Principle Make Operations Idempotent
Principle for designing commands and processing loops to converge safely across crashes and retries.
- CCM score
- 62 of 100
- skills.sh installs
- 13.3K
- GitHub stars
- 5.5K
- last updated
- Nov 30, 2026
Own this skill? Claim it
What it does
- Covers state-changing operations that must reach the correct end state however many times they run or wherever a prior run stopped
- Requires each step to read current state, compare it to the goal, and apply only the difference rather than replaying intent
- Enforces that leftover locks, temp files, half-written records, and claimed jobs be recognizable as stale by the next run
- Recommends writing to a temporary path and renaming it into place, and adding a reconciliation step when outcomes depend on leftovers
- Designed for engineers building lifecycle steps, commands, or processing loops that must survive crashes, restarts, and retries
Install
$ npx -y skills add backnotprop/pstack --skill principle-make-operations-idempotent -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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.
Details
- Repository
- github.com/backnotprop/pstack
- First seen
- Nov 30, 2026
More from backnotprop/pstack
All 44- Principle Subtract Before You Add13.3K
- Principle Encode Lessons In Structure13.3K
- Principle Model The Domain13.3K
- Principle Migrate Callers Then Delete Legacy Apis13.3K
- Principle Guard The Context Window13.3K
- Principle Test Behavior Not Implementation13.3K
- Principle Redesign From First Principles13.3K
- Principle Build The Lever13.3K
- Principle Minimize Reader Load13.3K
- Principle Boundary Discipline13.3K
- Principle Exhaust The Design Space13.3K
- Principle Never Block On The Human13.2K
- Automate Me13.2K
- Principle Foundational Thinking13.2K
- Principle Attack The Premise13.2K
- Principle Sequence Verifiable Units13.2K
- Principle Outcome Oriented Execution13.2K
- Principle Separate Before Serializing Shared State13.2K
- Principle Experience First13.2K
- Make Bot Ui12.8K
- Correct12.5K
- Principle Explain The Number12.3K
- How14.1K
- Why13.9K
Similar to Principle Make Operations Idempotent
cavemanjuliusbrussee/caveman646.1K installsUltra-compressed communication mode. Cuts output tokens 65% (measured) by speaking like caveman while keeping full technical accuracy. Supports intensity levels
grill-memattpocock/skills1.6M installsA relentless interview to sharpen a plan or design.
improveshadcn/improve43.4K installsSurvey any codebase as a senior advisor and produce prioritized, self-contained implementation plans for OTHER models/agents to execute. Strictly read-only on s
systematic-debuggingobra/superpowers346.5K installsUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes
find-skillsvercel-labs/skills4.5M installsHelps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express int
hyperframes-cliheygen-com/hyperframes1.7M installsUse the HyperFrames CLI development loop: init, add, catalog, capture, lint, check, snapshot, compare, grade-compare, preview, play, present, beats, keyframes,