[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M78ECA2YYZB2YMHS5M8YNP7M":3,"skill-same:01M78ECA2YYZB2YMHS5M8YNP7M":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":28,"repositoryHtmlUrl":29,"repositoryHomepageUrl":6,"ownerHtmlUrl":30,"ownerBlogUrl":31,"ownerDescription":32,"updatedAt":33,"install":34,"resources":46},"01M78ECA2YYZB2YMHS5M8YNP7M","principle-make-operations-idempotent",null,"Apply when designing commands, lifecycle steps, or processing loops that run amid crashes, restarts, and retries. Converge to the same end state regardless of partial prior runs.","mikeyobrien\u002Fpi-tidy-tools","mikeyobrien","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F11792047?v=4","01M78EA4XJ7CY5SB8V7EPB1581","Mikey O'Brien","01M78EA4YD4ECB9199H176CNQY",63,"MIT","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fprinciple-make-operations-idempotent\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: principle-make-operations-idempotent\ndescription: \"Apply when designing commands, lifecycle steps, or processing loops that run amid crashes, restarts, and retries. Converge to the same end state regardless of partial prior runs.\"\ndisable-model-invocation: true\n---\n\n# Make Operations Idempotent\n\nDesign operations so they converge to the correct state regardless of how many times they run or where they start from. Every state-mutating operation should answer: \"What happens if this runs twice? What happens if the previous run crashed halfway?\"\n\n**Why:** Commands, lifecycle operations, and processing loops run where crashes, restarts, and retries are normal. If partial state changes the next run's outcome, every restart becomes a debugging session.\n\n**The pattern:**\n- Convergent startup: scan for existing state, clean stale artifacts, adopt live sessions\n- Content-based cleanup: compare by content equivalence, not creation order\n- Self-healing locks: use PID-based stale lock detection\n- Idempotent scheduling: failed work respawns cleanly, fresh input regenerated after each cycle\n\n**The test:**\n1. What happens if this runs twice in a row?\n2. What happens if the previous run crashed at every possible point?\n3. Does re-execution converge to the same end state?\n\nIf any answer is \"it depends on what state was left behind,\" the operation needs a reconciliation step.\n","# Make Operations Idempotent\n\nDesign operations so they converge to the correct state regardless of how many times they run or where they start from. Every state-mutating operation should answer: \"What happens if this runs twice? What happens if the previous run crashed halfway?\"\n\n**Why:** Commands, lifecycle operations, and processing loops run where crashes, restarts, and retries are normal. If partial state changes the next run's outcome, every restart becomes a debugging session.\n\n**The pattern:**\n- Convergent startup: scan for existing state, clean stale artifacts, adopt live sessions\n- Content-based cleanup: compare by content equivalence, not creation order\n- Self-healing locks: use PID-based stale lock detection\n- Idempotent scheduling: failed work respawns cleanly, fresh input regenerated after each cycle\n\n**The test:**\n1. What happens if this runs twice in a row?\n2. What happens if the previous run crashed at every possible point?\n3. Does re-execution converge to the same end state?\n\nIf any answer is \"it depends on what state was left behind,\" the operation needs a reconciliation step.\n",{"name":5,"description":7,"disable-model-invocation":24},true,"main","b253d1504091e48e3d60ebab19535bf0d1cec363",".claude\u002Fskills\u002Fprinciple-make-operations-idempotent",3,"https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools","https:\u002F\u002Fgithub.com\u002Fmikeyobrien","mobrienv.dev","Sr. SDE @ Amazon. Austin, TX. AI Enthusiast. \r\n","2026-10-13 08:29:57",{"source":8,"skillName":5,"commands":35,"prompt":45,"zipAvailable":24},[36,39,42],{"tool":37,"command":38},"npx","npx skills add mikeyobrien\u002Fpi-tidy-tools --skill principle-make-operations-idempotent",{"tool":40,"command":41},"bunx","bunx skills add mikeyobrien\u002Fpi-tidy-tools --skill principle-make-operations-idempotent",{"tool":43,"command":44},"pnpm","pnpm dlx skills add mikeyobrien\u002Fpi-tidy-tools --skill principle-make-operations-idempotent","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fprinciple-make-operations-idempotent\u002FSKILL.md",[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M78EEXKEADXTNBVN3096T211","pi-tidy-bots-cli","Drive the pi-tidy-bots fleet runtime from an agent — init, daemonized start, status, stop, hot bot onboarding, and the HTTP+WS machine API (messages, transcripts, compaction, question cards) — all non-interactive with checked exit codes and --json shapes.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002Fskills\u002Fpi-tidy-bots-cli\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M78EES9YE4WYNC6NJZNZD628","qa-loop","Run a human-gated QA and repair loop for pi-tidy-tools.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fqa-loop\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M78EEP74RPPZYAZYEJRJ2DXK","pi-tidy-tools-ethos","Narrative guardrails for @mobrienv\u002Fpi-tidy-tools. Use when designing, implementing, reviewing, or documenting non-release changes to that package.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fpi-tidy-tools-ethos\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M78EEJAAK2GZ2FXR8PT6SPSY","npm-release","Releases one @mobrienv\u002Fpi-tidy-* workspace through GitHub and npm Trusted Publishing. Use when asked to prepare changelog entries, cut, publish, or monitor a patch, minor, major, or explicit-version release.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fnpm-release\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M78EEEWYRACQEPDPC039DEK0","build-loop","Build and independently verify one ready implementation ticket through a human-gated repair loop.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.pi\u002Fskills\u002Fbuild-loop\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M78EEA9XNRCCR1SKEFSPXPTC","why","Use for 'why does X work this way', 'why we picked Y', design rationale, regressions, postmortems, or data-backed thresholds. Discovers available MCPs and queries each evidence category (source control, issue tracker, long-form docs, real-time chat, infrastructure observability, error tracking, product analytics warehouse) in parallel, then returns a cited read on decisions and tradeoffs. Use how for runtime behavior.","https:\u002F\u002Fgithub.com\u002Fmikeyobrien\u002Fpi-tidy-tools\u002Fblob\u002Fmain\u002F.claude\u002Fskills\u002Fwhy\u002FSKILL.md",[],[]]