
principle-make-operations-idempotent
Apply when designing commands, lifecycle steps, or processing loops
by cursorFree
Description
principle-make-operations-idempotent is an agent skill from Cursor's plugins collection that applies one of its working principles when designing commands, lifecycle steps and processing loops, which run where crashes, restarts and retries are normal. The principle asks that every state-changing operation converge to the correct state however many times it runs, and wherever the previous run stopped. Each operation should answer two questions: what happens if this runs twice, and what happens if the previous run crashed halfway. The method is to derive each step from the state that exists rather than from what the previous run meant to do. The agent reads the current state, compares it with the goal, and applies only the difference. A step written this way is safe to repeat, because a repeat finds nothing left to do. Anything a run leaves behind, such as a lock, a temporary file, a half-written record or a claimed job, must be recognisable when the next run starts, so that it can be cleaned up or resumed. The reasoning is that if partial state changes the outcome of the next run, every restart turns into a debugging session. The principle is useful when designing background jobs, deployment steps or data migrations that must survive interruption. It is listed on skills.sh, where the page shows install counts and GitHub stars for the Cursor plugins repository. Install it with npx skills add https://github.com/cursor/plugins --skill principle-make-operations-idempotent.…
Highlights
- Operations converge to the correct state
- Derive steps from current state
- Only the difference is applied
- Leftover state must be recognisable
- Designed for crashes and retries
- Installs from skills.sh
Ratings & Reviews
No ratings yet
Be the first to rate principle-make-operations-idempotent.
People also visit

principle-never-block-on-the-human
Apply when tempted to ask 'should I do X?' on reversible work

principle-outcome-oriented-execution
Apply during planned rewrites and migrations with explicit phase boundaries

principle-sequence-verifiable-units
Apply to multi-step work (sweeps, migrations, runs of similar edits)

principle-build-the-lever
Apply to any non-trivial work, not just bulk work: edits, migrations, analyses

api-idempotency-retry
Design idempotency-key support and client retry guidance for a public API
principle-make-operations-idempotent FAQ
What does this principle ask?
That each state-changing operation reaches the correct state no matter how many times it runs or where a previous run stopped.
How is a step written?
Read the current state, compare it with the goal, and apply only the difference.
What about leftovers from a crash?
A lock, temporary file or claimed job must be recognisable so the next run can clean it up or resume.
How do I install it?
Run npx skills add https://github.com/cursor/plugins --skill principle-make-operations-idempotent.
What are the best principle-make-operations-idempotent alternatives?
Popular alternatives to principle-make-operations-idempotent include principle-never-block-on-the-human, principle-outcome-oriented-execution and principle-sequence-verifiable-units. See all principle-make-operations-idempotent alternatives














