What problem does it solve?
Commands, lifecycle steps, and processing loops that run amid crashes, restarts, and retries often leave partial state behind, turning every restart into a debugging session. This Skill provides design principles for making state-mutating operations idempotent so re-execution always converges to the correct end state.
Core Features & Use Cases
- Convergent Startup Patterns: Scan for existing state, clean stale artifacts, and adopt live sessions instead of assuming a clean slate.
- Self-Healing Mechanisms: Apply content-based cleanup, PID-based stale lock detection, and idempotent scheduling that respawns failed work cleanly.
- Idempotency Test Checklist: Evaluate any operation with three questions—what happens if it runs twice, if it crashed at any point, and whether re-execution converges.
- Use Case: When designing a retry-able job queue or a CLI command that may be interrupted mid-run, apply these patterns so a second run reconciles leftover state rather than corrupting it.
Quick Start
Ask the agent to review your command or processing loop for idempotency using the make-operations-idempotent principles and add reconciliation steps where partial state could leak between runs.