[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6BVCDSKXSKAZCW75D4AYKRG":3,"skill-same:01M6BVCDSKXSKAZCW75D4AYKRG":72},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":8,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":18,"categories":19,"keywords":30,"publishedAt":47,"linkOnly":48,"markdownContent":49,"markdownBody":50,"frontMatter":51,"refName":53,"commitSha":54,"skillDirectory":55,"forksCount":15,"repositoryHtmlUrl":56,"repositoryHomepageUrl":17,"ownerHtmlUrl":57,"ownerBlogUrl":17,"ownerDescription":17,"updatedAt":58,"install":59,"resources":71},"01M6BVCDSKXSKAZCW75D4AYKRG","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.","在设计命令、生命周期步骤，或会在崩溃、重启与重试中运行的循环处理时应用。无论此前是否存在部分执行，都要收敛到相同的最终状态。","bnferguson\u002Fdotfiles","bnferguson","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F47749?v=4","01M6BV4H2TJKK8P14W86V1ZCPP","Brandon Ferguson","01M6BV4H7GJWTZJ1BVHQ1TX11Y",0,"MIT",null,"https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002Fpstack\u002Fupstream\u002Fskills\u002Fprinciple-make-operations-idempotent\u002FSKILL.md",[20,25],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQ6TQZN6R52WBJ9H8NRMQM","软件开发工程师","PROFESSION","适用职业",{"categoryNo":26,"categoryName":27,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C535MHXGXDSGN98VJTMCSK","系统架构设计模式","SCENARIO","使用场景",[31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],"principle make operations idempotent","operations","make","idempotent","run","state","lifecycle","commands","end","processing","retries","loops","true","converge","apply","when","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":52},true,"main","e63965e4644984470d4cc8b3014a8b001f0c2666","pstack\u002Fupstream\u002Fskills\u002Fprinciple-make-operations-idempotent","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fbnferguson","2026-11-11 03:04:59",{"source":9,"skillName":5,"commands":60,"prompt":70,"zipAvailable":52},[61,64,67],{"tool":62,"command":63},"npx","npx skills add bnferguson\u002Fdotfiles --skill principle-make-operations-idempotent",{"tool":65,"command":66},"bunx","bunx skills add bnferguson\u002Fdotfiles --skill principle-make-operations-idempotent",{"tool":68,"command":69},"pnpm","pnpm dlx skills add bnferguson\u002Fdotfiles --skill principle-make-operations-idempotent","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002Fpstack\u002Fupstream\u002Fskills\u002Fprinciple-make-operations-idempotent\u002FSKILL.md",[],[73,108,125,158,175,190],{"skillNo":74,"name":75,"nameZh":76,"description":77,"descriptionZh":78,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":79,"licenseFileUrl":80,"sourceHtmlUrl":81,"categories":82,"keywords":89,"publishedAt":47},"01M6BVA3RS3M016FANZ6792F9H","skill-creator","Claude 技能创建指南","Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.","创建有效技能的指南。当用户想要创建新技能（或更新现有技能），以通过专业知识、工作流或工具集成来扩展 Claude 的能力时，应使用此技能。","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002Fclaude\u002Fconfig\u002Fskills\u002Fskill-creator\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002Fclaude\u002Fconfig\u002Fskills\u002Fskill-creator\u002FSKILL.md",[83,86],{"categoryNo":84,"categoryName":85,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BRN0CV1NMDZ5TEJX1GVM29","插件与技能管理",{"categoryNo":87,"categoryName":88,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BRZZF9D7PVFN5MXSPWWD61","AI 工程师",[90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,46,107],"creator","skill creator","specialized","workflows","create","update","capabilities","knowledge","tool","integrations","guide","new skill","existing skill","users","with","for","Existing","new",{"skillNo":109,"name":110,"nameZh":111,"description":112,"descriptionZh":113,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":114,"categories":115,"keywords":122,"publishedAt":47},"01M6BV94WN2RPYM8N6PN8TBNT8","writing-shape","素材成文逐段撰写","Writing, exploit: shape raw material into an article, paragraph by paragraph.","写作，利用（exploit）：将原始素材逐段塑造成一篇文章。","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwriting-shape\u002FSKILL.md",[116,119],{"categoryNo":117,"categoryName":118,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C55A3R2M9C8CAKG3W16HTA","内容创作者",{"categoryNo":120,"categoryName":121,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8CA3WT74BY17JY9YCJY42FJ","创意写作与内容编排",[123,124],"writing shape","writing",{"skillNo":126,"name":127,"nameZh":128,"description":129,"descriptionZh":130,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":79,"licenseFileUrl":131,"sourceHtmlUrl":132,"categories":133,"keywords":140,"publishedAt":47},"01M6BV8QDFJ6PXBVK5NFBZT5M7","webapp-testing","Playwright 网页应用测试","Test local web applications using Playwright. Use when verifying frontend functionality, debugging UI behavior, capturing browser screenshots, or viewing browser logs.","使用 Playwright 测试本地 Web 应用。适用于验证前端功能、调试 UI 行为、截取浏览器截图或查看浏览器日志。","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwebapp-testing\u002FSKILL.md",[134,137],{"categoryNo":135,"categoryName":136,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BQGD5WG86P4AQ5GPSSKBFR","测试工程师",{"categoryNo":138,"categoryName":139,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BQJH394GT47X57A9Q8G7HX","测试与质量保障",[141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,46],"webapp","webapp testing","testing","browser","frontend","screenshots","playwright","test","web","debugging","ui","logs","applications","behavior","use","local","test local",{"skillNo":159,"name":160,"nameZh":161,"description":162,"descriptionZh":163,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":164,"categories":165,"keywords":172,"publishedAt":47},"01M6BV8MDXKXNVHKS3QF3YDFTF","wait-what","消息重述","Stop. That last message did not land: re-pitch it.","停。上一条消息没有被理解（没说清楚）：换一种方式重新表述。","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fwait-what\u002FSKILL.md",[166,169],{"categoryNo":167,"categoryName":168,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8BS5011KJDVSRXG1DC4P666","普通用户",{"categoryNo":170,"categoryName":171,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8C1YEW2680C003GGBD6QCKB","回复风格与输出控制",[173,174],"wait what","land",{"skillNo":176,"name":177,"nameZh":178,"description":179,"descriptionZh":180,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":181,"categories":182,"keywords":187,"publishedAt":47},"01M6BV756DJHT5BDA1HVRVHJJ7","prototype","快速原型构建","Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.","构建一个一次性原型来回答设计问题。当用户想要验证某个状态模型或逻辑是否合理，或探索 UI 应该是什么样子时使用。","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fprototype\u002FSKILL.md",[183,184],{"categoryNo":21,"categoryName":22,"taxonomyType":23,"taxonomyTypeDesc":24},{"categoryNo":185,"categoryName":186,"taxonomyType":28,"taxonomyTypeDesc":29},"01M8BT7QTSZKB08EAW9P9ZCDNQ","设计评审与架构优化",[177,188,189,151,36],"design","explore",{"skillNo":191,"name":192,"nameZh":193,"description":194,"descriptionZh":195,"repositoryFullName":9,"ownerLogin":10,"ownerAvatarUrl":11,"ownerAccountNo":12,"ownerDisplayName":13,"repositoryNo":14,"starsCount":15,"licenseSpdxId":16,"licenseFileUrl":17,"sourceHtmlUrl":196,"categories":197,"keywords":202,"publishedAt":47},"01M6BV6SBW166685KVBPWM2K4N","improve-codebase-architecture","代码库架构优化分析","Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.","扫描代码库以发现可深化改进的机会，将其以可视化 HTML 报告的形式呈现，然后对你选中的某一项进行深入质询。","https:\u002F\u002Fgithub.com\u002Fbnferguson\u002Fdotfiles\u002Fblob\u002Fmain\u002F.agents\u002Fskills\u002Fimprove-codebase-architecture\u002FSKILL.md",[198,199],{"categoryNo":185,"categoryName":186,"taxonomyType":28,"taxonomyTypeDesc":29},{"categoryNo":200,"categoryName":201,"taxonomyType":23,"taxonomyTypeDesc":24},"01M8C4ZVS0ZJKF2T2G58PW5VR2","系统架构师",[203,204,205,206],"architecture","improve","improve codebase architecture","report"]