[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6EKPR9WSPS7CMX8Q8EZ77TJ":3,"skill-same:01M6EKPR9WSPS7CMX8Q8EZ77TJ":66},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":41,"repositoryHtmlUrl":42,"repositoryHomepageUrl":6,"ownerHtmlUrl":43,"ownerBlogUrl":6,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M6EKPR9WSPS7CMX8Q8EZ77TJ","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.","minghinmatthewlam\u002Fagent-guards","minghinmatthewlam","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F14224566?v=4","01M6EKJNHJ92TMD70DDV4AJFQA","01M6EKJNNSX01GNTK9NJ5RKHFM",46,"MIT","https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam\u002Fagent-guards\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fskills\u002Fprinciple-type-system-discipline\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"principle type system discipline","system","discipline","type system","type","writing","code","data","brand","primitives","language","false","semantic","make","types","2026-11-10 10:12:30",false,"---\nname: 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.\"\nuser-invocable: false\n---\n\n# Type System Discipline\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\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,"user-invocable":34},"main","0c773e8ba99fe384310af3f9ee59741106a53d95","plugins\u002Fpstack\u002Fskills\u002Fprinciple-type-system-discipline",3,"https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam\u002Fagent-guards","https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam","Builder. Less optimizing agents setup, more building","2026-11-08 05:41:31",{"source":8,"skillName":5,"commands":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add minghinmatthewlam\u002Fagent-guards --skill principle-type-system-discipline",{"tool":52,"command":53},"bunx","bunx skills add minghinmatthewlam\u002Fagent-guards --skill principle-type-system-discipline",{"tool":55,"command":56},"pnpm","pnpm dlx skills add minghinmatthewlam\u002Fagent-guards --skill principle-type-system-discipline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam\u002Fagent-guards\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fskills\u002Fprinciple-type-system-discipline\u002FSKILL.md",true,[60],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},"agents\u002Fopenai.yaml","REFERENCE","参考文档",43,"https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam\u002Fagent-guards\u002Fblob\u002Fmain\u002Fplugins\u002Fpstack\u002Fskills\u002Fprinciple-type-system-discipline\u002Fagents\u002Fopenai.yaml",[67,92,117,135,159,178],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":33},"01M6EKT039SVAX6PXWNJZNZ4EX","teach","Build a working mental model of code: the components and how they interact, then the interfaces, schemas, and function signatures. Use when asked to teach or explain how code works, walk through an architecture, deep-dive a subsystem, or understand a change, including code outside the current repo. For a concept with no code, use pstack:teach.","https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam\u002Fagent-guards\u002Fblob\u002Fmain\u002Fskills\u002Fteach\u002FSKILL.md",[],[69,74,75,76,77,78,79,80,24,81,82,83,84,85,86,87,88,89,90,91],"change","build","model","how","repo","understand","use","explain","with","concept","deep","for","mental model","signatures","pstack","no code","components","when",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":33},"01M6EKSX03CR18TFCATJ5ARTN7","skills-audit","Audit agent skills for triggering quality, correctness, context efficiency, redundancy, structure, failure guidance, and coverage gaps. Use when the user asks to review, improve, compare, simplify, or evaluate skills in global, repo-local, Claude, Codex, or custom skill paths.","https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam\u002Fagent-guards\u002Fblob\u002Fmain\u002Fskills\u002Fskills-audit\u002FSKILL.md",[],[99,100,101,102,103,78,104,105,106,107,108,80,109,110,111,112,113,114,115,116],"audit","skills audit","coverage","structure","codex","quality","local","guidance","paths","improve","custom skill","simplify","coverage gaps","user","context","compare","review","efficiency",{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":123,"publishedAt":33},"01M6EKSSTYVXDV0REZEF7J9X6F","repo-setup","Set up or refactor a repository so agents naturally follow its intended architecture and important mistakes fail mechanically. Use when the user invokes $repo-setup, asks to make a repo agent-friendly, or wants important repository rules enforced through structure, types, tooling, tests, or CI.","https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam\u002Fagent-guards\u002Fblob\u002Fmain\u002Fskills\u002Frepo-setup\u002FSKILL.md",[],[78,124,125,126,102,32,127,128,129,130,131,80,132,133,134,112,31],"repo setup","setup","SET","tooling","repository","up","ci","tests","Rules","refactor","architecture",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":141,"publishedAt":33},"01M6EKSPNRZKCDWWV9FK57PFPB","record-screen","Record a small MP4 while demonstrating or verifying a UI change, then attach the video as proof. Linux cloud sessions record the private virtual display; macOS records only the app window under test. Use for any repo whenever a UI change is verified or demoed.","https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam\u002Fagent-guards\u002Fblob\u002Fmain\u002Fskills\u002Frecord-screen\u002FSKILL.md",[],[142,143,144,145,146,147,148,149,78,150,151,152,153,80,154,74,155,156,157,158],"record screen","record","screen","virtual","mp4","Video","app","as","records","linux","sessions","only","test","attach","proof","cloud","ui",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":33},"01M6EKSME0SDX0X052A8ZY0SMB","ori-pr","Take an OpenRouterIncubator\u002Fori or OpenRouterTeam\u002Fopenrouter-web PR from ready to merged. Matthew runs \u002Fori-pr once he has decided the PR is ready and understands the change. Asks perry for review once CI is green, handles perry's comments, and enqueues the merge once perry approves the head and CI is green, within quiet hours.","https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam\u002Fagent-guards\u002Fblob\u002Fmain\u002Fskills\u002Fori-pr\u002FSKILL.md",[],[166,167,168,169,74,170,171,172,115,130,173,174,175,85,176,177],"pr","ori pr","take","ready","head","green","merge","perry","openrouter","web","true","comments",{"skillNo":179,"name":180,"nameZh":6,"description":181,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":182,"categories":183,"keywords":184,"publishedAt":33},"01M6EKSGFS2DZNXYFH7A9GJ4BD","new-task","Clarify a new task by stating the goal the agent believes the user wants, showing its current understanding, and asking only product-related or high-priority questions that could materially change the outcome. Use before planning or implementation when the task needs alignment.","https:\u002F\u002Fgithub.com\u002Fminghinmatthewlam\u002Fagent-guards\u002Fblob\u002Fmain\u002Fskills\u002Fnew-task\u002FSKILL.md",[],[185,186,187,153,74,188,189,80,190,191,192,193,112],"new task","task","alignment","implementation","clarify","product","planning","goal","outcome"]