[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7B2M89R8J2C3JXD71QM1WDF":3,"skill-same:01M7B2M89R8J2C3JXD71QM1WDF":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},"01M7B2M89R8J2C3JXD71QM1WDF","pstack-principle-type-system-discipline",null,"Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas.","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-type-system-discipline\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fpstack-principle-type-system-discipline\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: pstack-principle-type-system-discipline\ndescription: \"Apply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas.\"\n---\n\n# Type System Discipline\n\nApply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas.\n\nMake the compiler reject impossible states, mismatched primitives, and unhandled variants. Prefer defining errors and special cases out of existence over proliferating handlers. For TypeScript syntax, see the `typescript-best-practices` skill.\n\n- **Brand semantic primitives.** `UserId` and `OrderId` are strings underneath but should not be interchangeable. Give each its own type, such as a branded intersection in TypeScript or a newtype elsewhere. Validate once at creation, trust the type downstream. If two arguments share a primitive type but mean different things, brand them.\n- **External data is untyped until parsed.** RPC payloads, JSON, IPC messages, CLI args, config files, environment variables, database rows. Have a parse function at every boundary that turns unstructured input into the typed model. The **boundary-discipline** principle skill says where to put validation.\n- **Derive types from authoritative schemas.** When a protocol buffer, OpenAPI spec, GraphQL schema, database migration, design-token file, or another file owns a shape, derive from it instead of hand-rolling a parallel type. See the **encode-lessons-in-structure** principle skill.\n","# Type System Discipline\n\nApply when designing types, reviewing a function signature, or writing code in any statically-typed language. Make illegal states unrepresentable, brand semantic primitives, parse external data at boundaries, exhaust variants, derive from authoritative schemas.\n\nMake the compiler reject impossible states, mismatched primitives, and unhandled variants. Prefer defining errors and special cases out of existence over proliferating handlers. For TypeScript syntax, see the `typescript-best-practices` skill.\n\n- **Brand semantic primitives.** `UserId` and `OrderId` are strings underneath but should not be interchangeable. Give each its own type, such as a branded intersection in TypeScript or a newtype elsewhere. Validate once at creation, trust the type downstream. If two arguments share a primitive type but mean different things, brand them.\n- **External data is untyped until parsed.** RPC payloads, JSON, IPC messages, CLI args, config files, environment variables, database rows. Have a parse function at every boundary that turns unstructured input into the typed model. The **boundary-discipline** principle skill says where to put validation.\n- **Derive types from authoritative schemas.** When a protocol buffer, OpenAPI spec, GraphQL schema, database migration, design-token file, or another file owns a shape, derive from it instead of hand-rolling a parallel type. See the **encode-lessons-in-structure** principle skill.\n",{"name":5,"description":7},"main","1d52087de3c5ac2a463b108745b704f3f7eca32e","skills\u002Fpstack-principle-type-system-discipline","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-type-system-discipline",{"tool":39,"command":40},"bunx","bunx skills add sandeepsalwan1\u002Fmac-setup --skill pstack-principle-type-system-discipline",{"tool":42,"command":43},"pnpm","pnpm dlx skills add sandeepsalwan1\u002Fmac-setup --skill pstack-principle-type-system-discipline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fsandeepsalwan1\u002Fmac-setup\u002Fblob\u002Fmain\u002Fskills\u002Fpstack-principle-type-system-discipline\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",[],[]]