[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M70M84C3MN7ASJ0HBFAKT5Z6":3,"skill-same:01M70M84C3MN7ASJ0HBFAKT5Z6":62},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":28,"linkOnly":29,"markdownContent":30,"markdownBody":31,"frontMatter":32,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":13,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":42,"install":43,"resources":55},"01M70M84C3MN7ASJ0HBFAKT5Z6","typescript-best-practices",null,"TypeScript best practices. Use when reading or editing any .ts or .tsx file.","mingster\u002Fdotfiles","mingster","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F528506?v=4","01M6BVP9E23T80TBZM7S0F94RG","01M6BVP9JK6JMSX0SZ2G1VMEDW",1,"MIT","https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Ftypescript-best-practices\u002FSKILL.md",[],[18,19,20,21,22,23,24,25,26,27],"typescript","best practices","typescript best practices","file","editing","use","tsx","reading","true","when","2026-11-10 10:12:30",false,"---\nname: typescript-best-practices\ndescription: TypeScript best practices. Use when reading or editing any .ts or .tsx file.\npaths: [\"**\u002F*.ts\", \"**\u002F*.tsx\"]\ndisable-model-invocation: true\n---\n\n# TypeScript best practices\n\nApply the **type-system-discipline** principle skill first.\n\n| Rule | Summary |\n|------|---------|\n| Discriminated unions | Model variants with a `kind` literal discriminant so impossible states can't be represented. No optional-field bags. |\n| Branded types | Brand primitives with `& { readonly __brand: \"X\" }` so they can't be mixed up. Validate once at the boundary. A brand comes from a verifying type guard (`input is AgentId`), never from `as`. |\n| Constructive modeling | Build the shape so the illegal value can't be constructed. `[T, ...T[]]` for non-empty, `[T, T][]` for even length, `start` plus `duration` for a range. Not a runtime guard, not a wish for refinement types. |\n| Simplest total type | Keep `T[]` while every operation on it stays total. Strengthen to `NonEmpty\u003CT>` only where the loose type forces `!`, a cast, or a \"should never happen\" throw. |\n| `unknown` over `any` | External data is `unknown`. |\n| Schemas before guards | Before hand-writing a property-by-property type guard, use the repository's runtime schema library and infer the type from the schema, such as `z.infer`. |\n| No `as` casts | Every `as` is a runtime crash waiting. Cast only after validation. |\n| Narrowing hierarchy | Discriminant switch > `in` operator > `typeof`\u002F`instanceof` > user-defined type guard > `as`. |\n| Type guards | Must verify the claim. A lying guard is worse than `as` because the bug hides behind a name that says it's safe. Name them `isX` or `hasX`. |\n| Exhaustiveness | Inline `const _exhaustive: never = x;` in default arms so the compiler errors when a new variant is added. |\n| `satisfies` over `as` | Validates the value without widening literal types. |\n| Boundary validation | Parse where data crosses in, into a named domain type. `Record\u003Cstring, unknown>` (however spelled) stops at that parse. Trust types inside. See the **boundary-discipline** principle skill. |\n| Schema-derived types | Reach for `Pick`\u002F`Omit`\u002F`Parameters`\u002F`ReturnType`\u002F`Awaited`\u002F`typeof` before declaring a new interface. |\n| Object args | Pass objects, not positional, so argument order is self-documenting. Skip on hot paths (per-frame render, tokenizers, parsers). |\n| Real tests | Don't mock what you can run. Prefer the framework's real test primitives with leak\u002Fdisposable checks, and verify UI in a running build. Mock only what you can't run locally. |\n| Structured telemetry | Prefer structured logger diagnostics with enough context to debug from an id. No `console.log` in shipped code. |\n\nExamples: `references\u002Fpatterns.md`.\n","# TypeScript best practices\n\nApply the **type-system-discipline** principle skill first.\n\n| Rule | Summary |\n|------|---------|\n| Discriminated unions | Model variants with a `kind` literal discriminant so impossible states can't be represented. No optional-field bags. |\n| Branded types | Brand primitives with `& { readonly __brand: \"X\" }` so they can't be mixed up. Validate once at the boundary. A brand comes from a verifying type guard (`input is AgentId`), never from `as`. |\n| Constructive modeling | Build the shape so the illegal value can't be constructed. `[T, ...T[]]` for non-empty, `[T, T][]` for even length, `start` plus `duration` for a range. Not a runtime guard, not a wish for refinement types. |\n| Simplest total type | Keep `T[]` while every operation on it stays total. Strengthen to `NonEmpty\u003CT>` only where the loose type forces `!`, a cast, or a \"should never happen\" throw. |\n| `unknown` over `any` | External data is `unknown`. |\n| Schemas before guards | Before hand-writing a property-by-property type guard, use the repository's runtime schema library and infer the type from the schema, such as `z.infer`. |\n| No `as` casts | Every `as` is a runtime crash waiting. Cast only after validation. |\n| Narrowing hierarchy | Discriminant switch > `in` operator > `typeof`\u002F`instanceof` > user-defined type guard > `as`. |\n| Type guards | Must verify the claim. A lying guard is worse than `as` because the bug hides behind a name that says it's safe. Name them `isX` or `hasX`. |\n| Exhaustiveness | Inline `const _exhaustive: never = x;` in default arms so the compiler errors when a new variant is added. |\n| `satisfies` over `as` | Validates the value without widening literal types. |\n| Boundary validation | Parse where data crosses in, into a named domain type. `Record\u003Cstring, unknown>` (however spelled) stops at that parse. Trust types inside. See the **boundary-discipline** principle skill. |\n| Schema-derived types | Reach for `Pick`\u002F`Omit`\u002F`Parameters`\u002F`ReturnType`\u002F`Awaited`\u002F`typeof` before declaring a new interface. |\n| Object args | Pass objects, not positional, so argument order is self-documenting. Skip on hot paths (per-frame render, tokenizers, parsers). |\n| Real tests | Don't mock what you can run. Prefer the framework's real test primitives with leak\u002Fdisposable checks, and verify UI in a running build. Mock only what you can't run locally. |\n| Structured telemetry | Prefer structured logger diagnostics with enough context to debug from an id. No `console.log` in shipped code. |\n\nExamples: `references\u002Fpatterns.md`.\n",{"name":5,"paths":33,"description":7,"disable-model-invocation":36},[34,35],"**\u002F*.ts","**\u002F*.tsx",true,"main","d775d974eade471675ab972f749b4be9bcdad6c3","templates\u002Fagent-team\u002F.agents\u002Fskills\u002Ftypescript-best-practices","https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles","https:\u002F\u002Fgithub.com\u002Fmingster","2026-11-12 03:04:39",{"source":8,"skillName":5,"commands":44,"prompt":54,"zipAvailable":36},[45,48,51],{"tool":46,"command":47},"npx","npx skills add mingster\u002Fdotfiles --skill typescript-best-practices",{"tool":49,"command":50},"bunx","bunx skills add mingster\u002Fdotfiles --skill typescript-best-practices",{"tool":52,"command":53},"pnpm","pnpm dlx skills add mingster\u002Fdotfiles --skill typescript-best-practices","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Ftypescript-best-practices\u002FSKILL.md",[56],{"path":57,"resourceType":58,"resourceTypeDesc":59,"sizeBytes":60,"sourceHtmlUrl":61},"references\u002Fpatterns.md","REFERENCE","参考文档",9287,"https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Ftypescript-best-practices\u002Freferences\u002Fpatterns.md",[63,91,122,137,156,176],{"skillNo":64,"name":65,"nameZh":6,"description":66,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":67,"categories":68,"keywords":74,"publishedAt":28},"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",[69],{"categoryNo":70,"categoryName":71,"taxonomyType":72,"taxonomyTypeDesc":73},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[75,76,77,78,79,80,81,23,82,83,84,85,86,27,87,88,89,90],"workflow from chats","workflow","extract","cursor","docs","workflows","Rules","preferences","guidance","person","learn","convert","generate","feedback","mine","team",{"skillNo":92,"name":93,"nameZh":6,"description":94,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":95,"categories":96,"keywords":102,"publishedAt":28},"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",[97],{"categoryNo":98,"categoryName":99,"taxonomyType":100,"taxonomyTypeDesc":101},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[93,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121],"work","analytics","data","issue","read","tracker","how","product","source","design","product analytics","time","error tracking","error","parallel","observability","warehouse","returns","infrastructure",{"skillNo":123,"name":124,"nameZh":6,"description":125,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":126,"categories":127,"keywords":128,"publishedAt":28},"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",[],[129,130,131,132,133,114,134,135,136],"done","what did i get done","get","summarize","update","commits","concise","user",{"skillNo":138,"name":139,"nameZh":6,"description":140,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":141,"categories":142,"keywords":143,"publishedAt":28},"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",[],[144,145,146,147,148,149,150,151,152,153,134,154,103,155],"review","weekly review","weekly","tech debt","Synthesis","weekly synthesis","produce","debt","new","bugfix","tech","with",{"skillNo":157,"name":158,"nameZh":6,"description":159,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":160,"categories":161,"keywords":162,"publishedAt":28},"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",[],[163,164,165,166,167,168,169,170,155,171,172,173,174,175],"verify","verify this","verified","claim","local","baseline","evidence","fresh","restate","compare","it","artifacts","capture",{"skillNo":177,"name":178,"nameZh":6,"description":179,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":180,"categories":181,"keywords":185,"publishedAt":28},"01M70M81GYBZR9A093TAAP20ZG","thermo-nuclear-code-quality-review","Run an extremely strict maintainability review for abstraction quality, giant files, and spaghetti-condition growth. Use for a thermo-nuclear code quality review, thermonuclear review, deep code quality audit, or especially harsh maintainability review.","https:\u002F\u002Fgithub.com\u002Fmingster\u002Fdotfiles\u002Fblob\u002Fmain\u002Ftemplates\u002Fagent-team\u002F.agents\u002Fskills\u002Fthermo-nuclear-code-quality-review\u002FSKILL.md",[182],{"categoryNo":183,"categoryName":184,"taxonomyType":100,"taxonomyTypeDesc":101},"01JBSEEDCAT000000000000030","开发工程师",[186,187,188,144,189,190,191,192,193,194,195,196,23,197,198,26,199,200,201,202],"code quality","thermo nuclear code quality review","quality","code quality review","nuclear","code","quality review","audit","maintainability","run","growth","files","maintainability review","for","thermonuclear","deep","condition"]