[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M72ZEX0NDAY0DN9PHP0P64FD":3,"skill-same:01M72ZEX0NDAY0DN9PHP0P64FD":75},{"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":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":32,"commitSha":33,"skillDirectory":34,"forksCount":35,"repositoryHtmlUrl":36,"repositoryHomepageUrl":6,"ownerHtmlUrl":37,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":38,"install":39,"resources":52},"01M72ZEX0NDAY0DN9PHP0P64FD","typescript-pro",null,"Implements advanced TypeScript type systems, creates custom type guards, utility types, and branded types, and configures tRPC for end-to-end type safety. Use when building TypeScript applications requiring advanced generics, conditional or mapped types, discriminated unions, monorepo setup, or full-stack type safety with tRPC.","enigmaicon-eng\u002FAI-Enterprise-OS","enigmaicon-eng","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F269773191?v=4","01M72YXXYN7Q7BYRHV8RAVYNWD","01M72YXXZPW35H56D6F1XSK84D",2,"MIT","https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fclaude-skills\u002Fskills\u002Ftypescript-pro\u002FSKILL.md",[],[],"2026-11-11 15:11:14",false,"---\nname: typescript-pro\ndescription: Implements advanced TypeScript type systems, creates custom type guards, utility types, and branded types, and configures tRPC for end-to-end type safety. Use when building TypeScript applications requiring advanced generics, conditional or mapped types, discriminated unions, monorepo setup, or full-stack type safety with tRPC.\nlicense: MIT\nmetadata:\n  author: https:\u002F\u002Fgithub.com\u002FJeffallan\n  version: \"1.1.0\"\n  domain: language\n  triggers: TypeScript, generics, type safety, conditional types, mapped types, tRPC, tsconfig, type guards, discriminated unions\n  role: specialist\n  scope: implementation\n  output-format: code\n  related-skills: fullstack-guardian, api-designer\n---\n\n# TypeScript Pro\n\n## Core Workflow\n\n1. **Analyze type architecture** - Review tsconfig, type coverage, build performance\n2. **Design type-first APIs** - Create branded types, generics, utility types\n3. **Implement with type safety** - Write type guards, discriminated unions, conditional types; run `tsc --noEmit` to catch type errors before proceeding\n4. **Optimize build** - Configure project references, incremental compilation, tree shaking; re-run `tsc --noEmit` to confirm zero errors after changes\n5. **Test types** - Confirm type coverage with a tool like `type-coverage`; validate that all public APIs have explicit return types; iterate on steps 3–4 until all checks pass\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| Advanced Types | `references\u002Fadvanced-types.md` | Generics, conditional types, mapped types, template literals |\n| Type Guards | `references\u002Ftype-guards.md` | Type narrowing, discriminated unions, assertion functions |\n| Utility Types | `references\u002Futility-types.md` | Partial, Pick, Omit, Record, custom utilities |\n| Configuration | `references\u002Fconfiguration.md` | tsconfig options, strict mode, project references |\n| Patterns | `references\u002Fpatterns.md` | Builder pattern, factory pattern, type-safe APIs |\n\n## Code Examples\n\n### Branded Types\n```typescript\n\u002F\u002F Branded type for domain modeling\ntype Brand\u003CT, B extends string> = T & { readonly __brand: B };\ntype UserId  = Brand\u003Cstring, \"UserId\">;\ntype OrderId = Brand\u003Cnumber, \"OrderId\">;\n\nconst toUserId  = (id: string): UserId  => id as UserId;\nconst toOrderId = (id: number): OrderId => id as OrderId;\n\n\u002F\u002F Usage — prevents accidental id mix-ups at compile time\nfunction getOrder(userId: UserId, orderId: OrderId) { \u002F* ... *\u002F }\n```\n\n### Discriminated Unions & Type Guards\n```typescript\ntype LoadingState = { status: \"loading\" };\ntype SuccessState = { status: \"success\"; data: string[] };\ntype ErrorState   = { status: \"error\";   error: Error };\ntype RequestState = LoadingState | SuccessState | ErrorState;\n\n\u002F\u002F Type predicate guard\nfunction isSuccess(state: RequestState): state is SuccessState {\n  return state.status === \"success\";\n}\n\n\u002F\u002F Exhaustive switch with discriminated union\nfunction renderState(state: RequestState): string {\n  switch (state.status) {\n    case \"loading\": return \"Loading…\";\n    case \"success\": return state.data.join(\", \");\n    case \"error\":   return state.error.message;\n    default: {\n      const _exhaustive: never = state;\n      throw new Error(`Unhandled state: ${_exhaustive}`);\n    }\n  }\n}\n```\n\n### Custom Utility Types\n```typescript\n\u002F\u002F Deep readonly — immutable nested objects\ntype DeepReadonly\u003CT> = {\n  readonly [K in keyof T]: T[K] extends object ? DeepReadonly\u003CT[K]> : T[K];\n};\n\n\u002F\u002F Require exactly one of a set of keys\ntype RequireExactlyOne\u003CT, Keys extends keyof T = keyof T> =\n  Pick\u003CT, Exclude\u003Ckeyof T, Keys>> &\n  { [K in Keys]-?: Required\u003CPick\u003CT, K>> & Partial\u003CRecord\u003CExclude\u003CKeys, K>, never>> }[Keys];\n```\n\n### Recommended tsconfig.json\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"ES2022\",\n    \"module\": \"NodeNext\",\n    \"moduleResolution\": \"NodeNext\",\n    \"strict\": true,\n    \"noUncheckedIndexedAccess\": true,\n    \"noImplicitOverride\": true,\n    \"exactOptionalPropertyTypes\": true,\n    \"isolatedModules\": true,\n    \"declaration\": true,\n    \"declarationMap\": true,\n    \"incremental\": true,\n    \"skipLibCheck\": false\n  }\n}\n```\n\n## Constraints\n\n### MUST DO\n- Enable strict mode with all compiler flags\n- Use type-first API design\n- Implement branded types for domain modeling\n- Use `satisfies` operator for type validation\n- Create discriminated unions for state machines\n- Use `Annotated` pattern with type predicates\n- Generate declaration files for libraries\n- Optimize for type inference\n\n### MUST NOT DO\n- Use explicit `any` without justification\n- Skip type coverage for public APIs\n- Mix type-only and value imports\n- Disable strict null checks\n- Use `as` assertions without necessity\n- Ignore compiler performance warnings\n- Skip declaration file generation\n- Use enums (prefer const objects with `as const`)\n\n## Output Templates\n\nWhen implementing TypeScript features, provide:\n1. Type definitions (interfaces, types, generics)\n2. Implementation with type guards\n3. tsconfig configuration if needed\n4. Brief explanation of type design decisions\n\n## Knowledge Reference\n\nTypeScript 5.0+, generics, conditional types, mapped types, template literal types, discriminated unions, type guards, branded types, tRPC, project references, incremental compilation, declaration files, const assertions, satisfies operator\n\n[Documentation](https:\u002F\u002Fjeffallan.github.io\u002Fclaude-skills\u002Fskills\u002Flanguage\u002Ftypescript-pro\u002F)\n","# TypeScript Pro\n\n## Core Workflow\n\n1. **Analyze type architecture** - Review tsconfig, type coverage, build performance\n2. **Design type-first APIs** - Create branded types, generics, utility types\n3. **Implement with type safety** - Write type guards, discriminated unions, conditional types; run `tsc --noEmit` to catch type errors before proceeding\n4. **Optimize build** - Configure project references, incremental compilation, tree shaking; re-run `tsc --noEmit` to confirm zero errors after changes\n5. **Test types** - Confirm type coverage with a tool like `type-coverage`; validate that all public APIs have explicit return types; iterate on steps 3–4 until all checks pass\n\n## Reference Guide\n\nLoad detailed guidance based on context:\n\n| Topic | Reference | Load When |\n|-------|-----------|-----------|\n| Advanced Types | `references\u002Fadvanced-types.md` | Generics, conditional types, mapped types, template literals |\n| Type Guards | `references\u002Ftype-guards.md` | Type narrowing, discriminated unions, assertion functions |\n| Utility Types | `references\u002Futility-types.md` | Partial, Pick, Omit, Record, custom utilities |\n| Configuration | `references\u002Fconfiguration.md` | tsconfig options, strict mode, project references |\n| Patterns | `references\u002Fpatterns.md` | Builder pattern, factory pattern, type-safe APIs |\n\n## Code Examples\n\n### Branded Types\n```typescript\n\u002F\u002F Branded type for domain modeling\ntype Brand\u003CT, B extends string> = T & { readonly __brand: B };\ntype UserId  = Brand\u003Cstring, \"UserId\">;\ntype OrderId = Brand\u003Cnumber, \"OrderId\">;\n\nconst toUserId  = (id: string): UserId  => id as UserId;\nconst toOrderId = (id: number): OrderId => id as OrderId;\n\n\u002F\u002F Usage — prevents accidental id mix-ups at compile time\nfunction getOrder(userId: UserId, orderId: OrderId) { \u002F* ... *\u002F }\n```\n\n### Discriminated Unions & Type Guards\n```typescript\ntype LoadingState = { status: \"loading\" };\ntype SuccessState = { status: \"success\"; data: string[] };\ntype ErrorState   = { status: \"error\";   error: Error };\ntype RequestState = LoadingState | SuccessState | ErrorState;\n\n\u002F\u002F Type predicate guard\nfunction isSuccess(state: RequestState): state is SuccessState {\n  return state.status === \"success\";\n}\n\n\u002F\u002F Exhaustive switch with discriminated union\nfunction renderState(state: RequestState): string {\n  switch (state.status) {\n    case \"loading\": return \"Loading…\";\n    case \"success\": return state.data.join(\", \");\n    case \"error\":   return state.error.message;\n    default: {\n      const _exhaustive: never = state;\n      throw new Error(`Unhandled state: ${_exhaustive}`);\n    }\n  }\n}\n```\n\n### Custom Utility Types\n```typescript\n\u002F\u002F Deep readonly — immutable nested objects\ntype DeepReadonly\u003CT> = {\n  readonly [K in keyof T]: T[K] extends object ? DeepReadonly\u003CT[K]> : T[K];\n};\n\n\u002F\u002F Require exactly one of a set of keys\ntype RequireExactlyOne\u003CT, Keys extends keyof T = keyof T> =\n  Pick\u003CT, Exclude\u003Ckeyof T, Keys>> &\n  { [K in Keys]-?: Required\u003CPick\u003CT, K>> & Partial\u003CRecord\u003CExclude\u003CKeys, K>, never>> }[Keys];\n```\n\n### Recommended tsconfig.json\n```json\n{\n  \"compilerOptions\": {\n    \"target\": \"ES2022\",\n    \"module\": \"NodeNext\",\n    \"moduleResolution\": \"NodeNext\",\n    \"strict\": true,\n    \"noUncheckedIndexedAccess\": true,\n    \"noImplicitOverride\": true,\n    \"exactOptionalPropertyTypes\": true,\n    \"isolatedModules\": true,\n    \"declaration\": true,\n    \"declarationMap\": true,\n    \"incremental\": true,\n    \"skipLibCheck\": false\n  }\n}\n```\n\n## Constraints\n\n### MUST DO\n- Enable strict mode with all compiler flags\n- Use type-first API design\n- Implement branded types for domain modeling\n- Use `satisfies` operator for type validation\n- Create discriminated unions for state machines\n- Use `Annotated` pattern with type predicates\n- Generate declaration files for libraries\n- Optimize for type inference\n\n### MUST NOT DO\n- Use explicit `any` without justification\n- Skip type coverage for public APIs\n- Mix type-only and value imports\n- Disable strict null checks\n- Use `as` assertions without necessity\n- Ignore compiler performance warnings\n- Skip declaration file generation\n- Use enums (prefer const objects with `as const`)\n\n## Output Templates\n\nWhen implementing TypeScript features, provide:\n1. Type definitions (interfaces, types, generics)\n2. Implementation with type guards\n3. tsconfig configuration if needed\n4. Brief explanation of type design decisions\n\n## Knowledge Reference\n\nTypeScript 5.0+, generics, conditional types, mapped types, template literal types, discriminated unions, type guards, branded types, tRPC, project references, incremental compilation, declaration files, const assertions, satisfies operator\n\n[Documentation](https:\u002F\u002Fjeffallan.github.io\u002Fclaude-skills\u002Fskills\u002Flanguage\u002Ftypescript-pro\u002F)\n",{"name":5,"license":14,"metadata":23,"description":7},{"role":24,"scope":25,"author":26,"domain":27,"version":28,"triggers":29,"output-format":30,"related-skills":31},"specialist","implementation","https:\u002F\u002Fgithub.com\u002FJeffallan","language","1.1.0","TypeScript, generics, type safety, conditional types, mapped types, tRPC, tsconfig, type guards, discriminated unions","code","fullstack-guardian, api-designer","main","a4b48842f3e48549adf3dc335a8837c66da99497","examples\u002Fclaude-skills\u002Fskills\u002Ftypescript-pro",0,"https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS","https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng","2026-05-17 16:00:01",{"source":8,"skillName":5,"commands":40,"prompt":50,"zipAvailable":51},[41,44,47],{"tool":42,"command":43},"npx","npx skills add enigmaicon-eng\u002FAI-Enterprise-OS --skill typescript-pro",{"tool":45,"command":46},"bunx","bunx skills add enigmaicon-eng\u002FAI-Enterprise-OS --skill typescript-pro",{"tool":48,"command":49},"pnpm","pnpm dlx skills add enigmaicon-eng\u002FAI-Enterprise-OS --skill typescript-pro","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fclaude-skills\u002Fskills\u002Ftypescript-pro\u002FSKILL.md",true,[53,59,63,67,71],{"path":54,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":57,"sourceHtmlUrl":58},"references\u002Fadvanced-types.md","REFERENCE","参考文档",6449,"https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fclaude-skills\u002Fskills\u002Ftypescript-pro\u002Freferences\u002Fadvanced-types.md",{"path":60,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":61,"sourceHtmlUrl":62},"references\u002Fconfiguration.md",8965,"https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fclaude-skills\u002Fskills\u002Ftypescript-pro\u002Freferences\u002Fconfiguration.md",{"path":64,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":65,"sourceHtmlUrl":66},"references\u002Fpatterns.md",11213,"https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fclaude-skills\u002Fskills\u002Ftypescript-pro\u002Freferences\u002Fpatterns.md",{"path":68,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":69,"sourceHtmlUrl":70},"references\u002Ftype-guards.md",7929,"https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fclaude-skills\u002Fskills\u002Ftypescript-pro\u002Freferences\u002Ftype-guards.md",{"path":72,"resourceType":55,"resourceTypeDesc":56,"sizeBytes":73,"sourceHtmlUrl":74},"references\u002Futility-types.md",8602,"https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fclaude-skills\u002Fskills\u002Ftypescript-pro\u002Freferences\u002Futility-types.md",[76,83,90,97,104,111],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":18},"01M72ZGWW03JSE1T3TKK5NZ11Y","writing-skills","Use when creating new skills, editing existing skills, or verifying skills work before deployment","https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fsuperpowers\u002Fskills\u002Fwriting-skills\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":18},"01M72ZGT3FJT7QRM1VNQRKR0XD","writing-plans","Use when you have a spec or requirements for a multi-step task, before touching code","https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fsuperpowers\u002Fskills\u002Fwriting-plans\u002FSKILL.md",[],[],{"skillNo":91,"name":92,"nameZh":6,"description":93,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":94,"categories":95,"keywords":96,"publishedAt":18},"01M72ZGQ69DCF0SBP9JXFPWKJS","verification-before-completion","Use when about to claim work is complete, fixed, or passing, before committing or creating PRs - requires running verification commands and confirming output before making any success claims; evidence before assertions always","https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fsuperpowers\u002Fskills\u002Fverification-before-completion\u002FSKILL.md",[],[],{"skillNo":98,"name":99,"nameZh":6,"description":100,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":101,"categories":102,"keywords":103,"publishedAt":18},"01M72ZGNF126QT0MQ2D3DNGZRN","using-superpowers","Use when starting any conversation - establishes how to find and use skills, requiring Skill tool invocation before ANY response including clarifying questions","https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fsuperpowers\u002Fskills\u002Fusing-superpowers\u002FSKILL.md",[],[],{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":18},"01M72ZGHVJ9S0YXMNBHQGQ95BY","using-git-worktrees","Use when starting feature work that needs isolation from current workspace or before executing implementation plans - ensures an isolated workspace exists via native tools or git worktree fallback","https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fsuperpowers\u002Fskills\u002Fusing-git-worktrees\u002FSKILL.md",[],[],{"skillNo":112,"name":113,"nameZh":6,"description":114,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":115,"categories":116,"keywords":117,"publishedAt":18},"01M72ZGFNZCHFY2FS3ZD9MCYV9","test-driven-development","Use when implementing any feature or bugfix, before writing implementation code","https:\u002F\u002Fgithub.com\u002Fenigmaicon-eng\u002FAI-Enterprise-OS\u002Fblob\u002Fmain\u002Fexamples\u002Fsuperpowers\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[]]