[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BVRR42DXE4W2C7DRXQMGVY":3,"skill-same:01M6BVRR42DXE4W2C7DRXQMGVY":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":10,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":17,"categories":18,"keywords":29,"publishedAt":46,"linkOnly":47,"markdownContent":48,"markdownBody":49,"frontMatter":50,"refName":52,"commitSha":53,"skillDirectory":54,"forksCount":14,"repositoryHtmlUrl":55,"repositoryHomepageUrl":16,"ownerHtmlUrl":56,"ownerBlogUrl":16,"ownerDescription":16,"updatedAt":57,"install":58,"resources":70},"01M6BVRR42DXE4W2C7DRXQMGVY","principle-make-operations-idempotent","操作幂等性设计","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.","在设计会在崩溃、重启和重试中运行的命令、生命周期步骤或处理循环时适用。无论先前是否存在部分执行，都应收敛到相同的最终状态。","mingster\u002Fdotfiles","mingster","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F528506?v=4","01M6BVP9E23T80TBZM7S0F94RG","01M6BVP9JK6JMSX0SZ2G1VMEDW",1,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Fprinciple-make-operations-idempotent\u002FSKILL.md",[19,24],{"categoryNo":20,"categoryName":21,"taxonomyType":22,"taxonomyTypeDesc":23},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":25,"categoryName":26,"taxonomyType":27,"taxonomyTypeDesc":28},"01M8CAAMN19HMY7B3JXN2CBP29","工程实践准则","SCENARIO","使用场景",[30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],"principle make operations idempotent","idempotent","operations","make","state","run","lifecycle","loops","converge","processing","end","commands","true","retries","when","apply","2026-11-10 10:12:30",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 the previous run stopped. 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 idea:** 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. A step written this way is safe to repeat, because a repeat finds nothing left to do.\n\nAnything a run leaves behind, such as a lock, a temporary file, a half-written record, or a claimed job, must be recognizable as stale by the next run. Judge staleness by evidence that stays true wherever the previous run could have stopped, not only in the common case. A marker that the next run cannot judge turns every crash into manual cleanup. For example, write to a temporary path and rename it into place, or compare artifacts by content instead of by creation order.\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 the previous run stopped. 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 idea:** 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. A step written this way is safe to repeat, because a repeat finds nothing left to do.\n\nAnything a run leaves behind, such as a lock, a temporary file, a half-written record, or a claimed job, must be recognizable as stale by the next run. Judge staleness by evidence that stays true wherever the previous run could have stopped, not only in the common case. A marker that the next run cannot judge turns every crash into manual cleanup. For example, write to a temporary path and rename it into place, or compare artifacts by content instead of by creation order.\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":51},true,"main","d775d974eade471675ab972f749b4be9bcdad6c3","templates\u002Fagent-team\u002F.agents\u002Fskills\u002Fprinciple-make-operations-idempotent","https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fmingster","2026-11-15 03:23:26",{"source":9,"skillName":5,"commands":59,"prompt":69,"zipAvailable":51},[60,63,66],{"tool":61,"command":62},"npx","npx skills add mingster\u002Fdotfiles --skill principle-make-operations-idempotent",{"tool":64,"command":65},"bunx","bunx skills add mingster\u002Fdotfiles --skill principle-make-operations-idempotent",{"tool":67,"command":68},"pnpm","pnpm dlx skills add mingster\u002Fdotfiles --skill principle-make-operations-idempotent","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Fprinciple-make-operations-idempotent\u002FSKILL.md",[],[72,80,104,130,145,164],{"skillNo":73,"name":74,"nameZh":16,"description":75,"descriptionZh":16,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":10,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":79},"01M7DRC1SJMNMFRXKQW0A9Z67C","tune-agent-docs","Cut words from agent guide files (role files, team docs, AGENTS.md) without changing any rule. Use when asked to tune, trim or shrink agent docs.","https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Ftune-agent-docs\u002FSKILL.md",[],[],"2026-11-15 14:19:17",{"skillNo":81,"name":82,"nameZh":16,"description":83,"descriptionZh":16,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":10,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":46},"01M70M8J3PA9F7TJA4DK95GE8N","workflow-from-chats","Extract durable working preferences from recent Cursor chats and convert them into skills, rules, or workflow docs. Use when asked to learn preferences, mine feedback, personalize workflows, or generate team\u002Fperson-specific agent guidance.","https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Fworkflow-from-chats\u002FSKILL.md",[],[87,88,89,90,91,92,93,94,95,96,97,98,99,44,100,101,102,103],"workflow","workflow from chats","mine","feedback","generate","cursor","person","guidance","preferences","use","Rules","workflows","docs","learn","convert","team","extract",{"skillNo":105,"name":106,"nameZh":16,"description":107,"descriptionZh":16,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":10,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":46},"01M70M8DK87GX45FFZCC840SW2","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\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Fwhy\u002FSKILL.md",[],[106,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129],"analytics","parallel","observability","warehouse","returns","infrastructure","source","data","issue","read","tracker","how","product","work","design","error","error tracking","time","product analytics",{"skillNo":131,"name":132,"nameZh":16,"description":133,"descriptionZh":16,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":10,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":134,"categories":135,"keywords":136,"publishedAt":46},"01M70M89EYB7RB4WT9EBQ19VEW","what-did-i-get-done","Summarize authored commits over a user-specified time period into a concise update","https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Fwhat-did-i-get-done\u002FSKILL.md",[],[137,138,139,140,141,128,142,143,144],"done","what did i get done","get","concise","commits","update","user","summarize",{"skillNo":146,"name":147,"nameZh":16,"description":148,"descriptionZh":16,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":10,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":46},"01M70M887Z6CVVHAM294BC9SG3","weekly-review","Produce a weekly synthesis of authored commits with highlights by bugfix, tech debt, and net-new work","https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Fweekly-review\u002FSKILL.md",[],[152,153,154,155,156,124,157,141,158,159,160,161,162,163],"review","weekly review","weekly","weekly synthesis","with","tech","bugfix","tech debt","new","debt","produce","Synthesis",{"skillNo":165,"name":166,"nameZh":16,"description":167,"descriptionZh":16,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":10,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":16,"sourceHtmlUrl":168,"categories":169,"keywords":170,"publishedAt":46},"01M70M86M3WNW7S7TZ1NVKSGT7","verify-this","Verify a claim with fresh local evidence: restate it falsifiably, capture baseline and treatment, compare artifacts, and return VERIFIED, NOT VERIFIED, or INCONCLUSIVE.","https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Fverify-this\u002FSKILL.md",[],[171,172,156,173,174,175,176,177,178,179,180,181,182,183],"verify","verify this","artifacts","it","compare","restate","verified","claim","capture","local","baseline","evidence","fresh"]