[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B2KH2KDRRPBH1930Y3HC5C":3,"skill-same:01M7B2KH2KDRRPBH1930Y3HC5C":51},{"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":16,"sourceHtmlUrl":17,"categories":18,"keywords":19,"publishedAt":20,"linkOnly":21,"markdownContent":22,"markdownBody":23,"frontMatter":24,"refName":25,"commitSha":26,"skillDirectory":27,"forksCount":14,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M7B2KH2KDRRPBH1930Y3HC5C","pstack-principle-model-the-domain",null,"Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.","sandeepsalwan1\u002Fmac-setup","sandeepsalwan1","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F118837112?v=4","01M7B2ETGSAY4K5RNVZPF6MEEG","Sandeep Salwan","01M7B2ETHDG8W38G9GV8PR146B",0,"MIT","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fpstack-principle-model-the-domain\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fpstack-principle-model-the-domain\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pstack-principle-model-the-domain\ndescription: \"Apply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.\"\n---\n\n# Model the Domain\n\nApply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.\n\nEncode the real domain in a data structure instead of scattering it across conditionals. A structure that matches the domain makes invalid states unrepresentable and deletes branches. Choosing it at write time is cheap. Recovering it later reads as a refactor and gets deferred.\n\nReach for:\n\n- A state machine instead of scattered booleans, phases, or lifecycle checks.\n- A typed model instead of loose parameters or repeated shape assumptions.\n- A map, registry, lookup table, or discriminated union instead of branching spread across files.\n- A reducer or command\u002Fevent model instead of ad hoc state mutations.\n- A module organized around one body of domain knowledge instead of a sequence such as load, validate, transform, and save. Execution order is not ownership.\n- A small module boundary that gathers repeated behavior, ownership, or invariants.\n- A queue, cache, index, graph, tree, or normalized collection where the access pattern calls for it.\n- Any other structure that fits. When none fits, work out what the code must never allow and how the data gets read, then find the structure that encodes exactly that.\n\nDo not force an abstraction. Prefer boring code if the current shape is already clear, local, and unlikely to grow. Be skeptical of an abstraction that adds indirection without removing branches, duplicated rules, invalid states, or lifecycle risk.\n\nThe sign that you skipped this is a new feature that grows an existing if\u002Felse chain by one more branch, or a second boolean that must stay in sync with the first. Temporal decomposition is another sign. Phase-named modules repeat the same domain rules across steps.\n","# Model the Domain\n\nApply when writing stateful logic, or when code branches a lot or repeats a shape assumption across files.\n\nEncode the real domain in a data structure instead of scattering it across conditionals. A structure that matches the domain makes invalid states unrepresentable and deletes branches. Choosing it at write time is cheap. Recovering it later reads as a refactor and gets deferred.\n\nReach for:\n\n- A state machine instead of scattered booleans, phases, or lifecycle checks.\n- A typed model instead of loose parameters or repeated shape assumptions.\n- A map, registry, lookup table, or discriminated union instead of branching spread across files.\n- A reducer or command\u002Fevent model instead of ad hoc state mutations.\n- A module organized around one body of domain knowledge instead of a sequence such as load, validate, transform, and save. Execution order is not ownership.\n- A small module boundary that gathers repeated behavior, ownership, or invariants.\n- A queue, cache, index, graph, tree, or normalized collection where the access pattern calls for it.\n- Any other structure that fits. When none fits, work out what the code must never allow and how the data gets read, then find the structure that encodes exactly that.\n\nDo not force an abstraction. Prefer boring code if the current shape is already clear, local, and unlikely to grow. Be skeptical of an abstraction that adds indirection without removing branches, duplicated rules, invalid states, or lifecycle risk.\n\nThe sign that you skipped this is a new feature that grows an existing if\u002Felse chain by one more branch, or a second boolean that must stay in sync with the first. Temporal decomposition is another sign. Phase-named modules repeat the same domain rules across steps.\n",{"name":5,"description":7},"main","1d52087de3c5ac2a463b108745b704f3f7eca32e","skills\u002Fpstack-principle-model-the-domain","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1","sandeeps.tech","GenAI @ Amazon | Builder","2026-11-13 09:45:54",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add sandeepsalwan1\u002Fmac-setup --skill pstack-principle-model-the-domain",{"tool":39,"command":40},"bunx","bunx skills add sandeepsalwan1\u002Fmac-setup --skill pstack-principle-model-the-domain",{"tool":42,"command":43},"pnpm","pnpm dlx skills add sandeepsalwan1\u002Fmac-setup --skill pstack-principle-model-the-domain","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fpstack-principle-model-the-domain\u002FSKILL.md",true,[47],{"path":48,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":16},"LICENSE","许可证",1067,[52,60,68,76,84,92],{"skillNo":53,"name":54,"nameZh":6,"description":55,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":56,"sourceHtmlUrl":57,"categories":58,"keywords":59,"publishedAt":20},"01M7B2NQWYHKR94T1P7BTC8V14","teach","Teach the user a new skill or concept, within this workspace.","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fteach\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fteach\u002FSKILL.md",[],[],{"skillNo":61,"name":62,"nameZh":6,"description":63,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":64,"sourceHtmlUrl":65,"categories":66,"keywords":67,"publishedAt":20},"01M7B2NJ7N4B1W33GY3KCE6HVY","stop-overthinking","Manually-invoked skill that stops overthinking and forces a short, practical decision. Use only when the user explicitly invokes stop-overthinking.","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fstop-overthinking\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fstop-overthinking\u002FSKILL.md",[],[],{"skillNo":69,"name":70,"nameZh":6,"description":71,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":72,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":20},"01M7B2NAJEG8FCG4NTTSQZ95QP","remind","Rewrite the last response simpler and shorter in plain English, prefixed with a 3-5 sentence TLDR of the conversation so far. Manual-only, invoked as \u002Fremind.","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fremind\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fremind\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":80,"sourceHtmlUrl":81,"categories":82,"keywords":83,"publishedAt":20},"01M7B2N8BSH4VY69BM98QKW2XV","read-all-adrs","Read every ADR markdown file in the project's docs\u002Fadr\u002F folder so you have full context on past decisions. Use only when the user explicitly calls it.","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fread-all-adrs\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fread-all-adrs\u002FSKILL.md",[],[],{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":88,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":20},"01M7B2N09R80Y1ECQVFH6YQWQ8","pstack-why","Find evidence for design choices and historical constraints through relevant authorized read-only sources; distinguish facts, inferences, and gaps.","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fpstack-why\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fpstack-why\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":96,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":20},"01M7B2MY9HZ0F1RZ93VTFVVQRR","pstack-unslop","Cut AI tells from any writing.","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fpstack-unslop\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fpstack-unslop\u002FSKILL.md",[],[]]