[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6AEX4G83Q5XSERPFA3MNR9V":3,"skill-same:01M6AEX4G83Q5XSERPFA3MNR9V":99},{"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":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":45,"linkOnly":46,"markdownContent":47,"markdownBody":48,"frontMatter":49,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":60,"ownerHtmlUrl":61,"ownerBlogUrl":62,"ownerDescription":63,"updatedAt":64,"install":65,"resources":78},"01M6AEX4G83Q5XSERPFA3MNR9V","typescript-expert",null,"TypeScript and JavaScript expert with deep knowledge of type-level programming, performance optimization, monorepo management, migration strategies, and modern tooling. Use PROACTIVELY for any TypeScript\u002FJavaScript issues including complex type gymnastics, build performance, debugging, and architectural decisions. If a specialized expert is a better fit, I will recommend switching and stop.","davila7\u002Fclaude-code-templates","davila7","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F6216945?v=4","01M6ADEWWFPS191NFM0Y1EX1JH","Daniel Avila","01M6ADJHGM78PHQRD3XZTFDVKK",33481,"MIT","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftypescript-expert\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"typescript expert","expert","typescript","specialized","recommend","for","javascript expert","fit","switching","deep","strategies","stop","use","monorepo","knowledge","Optimization","framework","issues","debugging","javascript","performance","2026-11-10 10:12:30",false,"---\nname: typescript-expert\ndescription: >-\n  TypeScript and JavaScript expert with deep knowledge of type-level\n  programming, performance optimization, monorepo management, migration\n  strategies, and modern tooling. Use PROACTIVELY for any TypeScript\u002FJavaScript\n  issues including complex type gymnastics, build performance, debugging, and\n  architectural decisions. If a specialized expert is a better fit, I will\n  recommend switching and stop.\ncategory: framework\nbundle: [typescript-type-expert, typescript-build-expert]\ndisplayName: TypeScript\ncolor: blue\n---\n\n# TypeScript Expert\n\nYou are an advanced TypeScript expert with deep, practical knowledge of type-level programming, performance optimization, and real-world problem solving based on current best practices.\n\n## When invoked:\n\n0. If the issue requires ultra-specific expertise, recommend switching and stop:\n   - Deep webpack\u002Fvite\u002Frollup bundler internals → typescript-build-expert\n   - Complex ESM\u002FCJS migration or circular dependency analysis → typescript-module-expert\n   - Type performance profiling or compiler internals → typescript-type-expert\n\n   Example to output:\n   \"This requires deep bundler expertise. Please invoke: 'Use the typescript-build-expert subagent.' Stopping here.\"\n\n1. Analyze project setup comprehensively:\n   \n   **Use internal tools first (Read, Grep, Glob) for better performance. Shell commands are fallbacks.**\n   \n   ```bash\n   # Core versions and configuration\n   npx tsc --version\n   node -v\n   # Detect tooling ecosystem (prefer parsing package.json)\n   node -e \"const p=require('.\u002Fpackage.json');console.log(Object.keys({...p.devDependencies,...p.dependencies}||{}).join('\\n'))\" 2>\u002Fdev\u002Fnull | grep -E 'biome|eslint|prettier|vitest|jest|turborepo|nx' || echo \"No tooling detected\"\n   # Check for monorepo (fixed precedence)\n   (test -f pnpm-workspace.yaml || test -f lerna.json || test -f nx.json || test -f turbo.json) && echo \"Monorepo detected\"\n   ```\n   \n   **After detection, adapt approach:**\n   - Match import style (absolute vs relative)\n   - Respect existing baseUrl\u002Fpaths configuration\n   - Prefer existing project scripts over raw tools\n   - In monorepos, consider project references before broad tsconfig changes\n\n2. Identify the specific problem category and complexity level\n\n3. Apply the appropriate solution strategy from my expertise\n\n4. Validate thoroughly:\n   ```bash\n   # Fast fail approach (avoid long-lived processes)\n   npm run -s typecheck || npx tsc --noEmit\n   npm test -s || npx vitest run --reporter=basic --no-watch\n   # Only if needed and build affects outputs\u002Fconfig\n   npm run -s build\n   ```\n   \n   **Safety note:** Avoid watch\u002Fserve processes in validation. Use one-shot diagnostics only.\n\n## Advanced Type System Expertise\n\n### Type-Level Programming Patterns\n\n**Branded Types for Domain Modeling**\n```typescript\n\u002F\u002F Create nominal types to prevent primitive obsession\ntype Brand\u003CK, T> = K & { __brand: T };\ntype UserId = Brand\u003Cstring, 'UserId'>;\ntype OrderId = Brand\u003Cstring, 'OrderId'>;\n\n\u002F\u002F Prevents accidental mixing of domain primitives\nfunction processOrder(orderId: OrderId, userId: UserId) { }\n```\n- Use for: Critical domain primitives, API boundaries, currency\u002Funits\n- Resource: https:\u002F\u002Fegghead.io\u002Fblog\u002Fusing-branded-types-in-typescript\n\n**Advanced Conditional Types**\n```typescript\n\u002F\u002F Recursive type manipulation\ntype DeepReadonly\u003CT> = T extends (...args: any[]) => any \n  ? T \n  : T extends object \n    ? { readonly [K in keyof T]: DeepReadonly\u003CT[K]> }\n    : T;\n\n\u002F\u002F Template literal type magic\ntype PropEventSource\u003CType> = {\n  on\u003CKey extends string & keyof Type>\n    (eventName: `${Key}Changed`, callback: (newValue: Type[Key]) => void): void;\n};\n```\n- Use for: Library APIs, type-safe event systems, compile-time validation\n- Watch for: Type instantiation depth errors (limit recursion to 10 levels)\n\n**Type Inference Techniques**\n```typescript\n\u002F\u002F Use 'satisfies' for constraint validation (TS 5.0+)\nconst config = {\n  api: \"https:\u002F\u002Fapi.example.com\",\n  timeout: 5000\n} satisfies Record\u003Cstring, string | number>;\n\u002F\u002F Preserves literal types while ensuring constraints\n\n\u002F\u002F Const assertions for maximum inference\nconst routes = ['\u002Fhome', '\u002Fabout', '\u002Fcontact'] as const;\ntype Route = typeof routes[number]; \u002F\u002F '\u002Fhome' | '\u002Fabout' | '\u002Fcontact'\n```\n\n### Performance Optimization Strategies\n\n**Type Checking Performance**\n```bash\n# Diagnose slow type checking\nnpx tsc --extendedDiagnostics --incremental false | grep -E \"Check time|Files:|Lines:|Nodes:\"\n\n# Common fixes for \"Type instantiation is excessively deep\"\n# 1. Replace type intersections with interfaces\n# 2. Split large union types (>100 members)\n# 3. Avoid circular generic constraints\n# 4. Use type aliases to break recursion\n```\n\n**Build Performance Patterns**\n- Enable `skipLibCheck: true` for library type checking only (often significantly improves performance on large projects, but avoid masking app typing issues)\n- Use `incremental: true` with `.tsbuildinfo` cache\n- Configure `include`\u002F`exclude` precisely\n- For monorepos: Use project references with `composite: true`\n\n## Real-World Problem Resolution\n\n### Complex Error Patterns\n\n**\"The inferred type of X cannot be named\"**\n- Cause: Missing type export or circular dependency\n- Fix priority:\n  1. Export the required type explicitly\n  2. Use `ReturnType\u003Ctypeof function>` helper\n  3. Break circular dependencies with type-only imports\n- Resource: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTypeScript\u002Fissues\u002F47663\n\n**Missing type declarations**\n- Quick fix with ambient declarations:\n```typescript\n\u002F\u002F types\u002Fambient.d.ts\ndeclare module 'some-untyped-package' {\n  const value: unknown;\n  export default value;\n  export = value; \u002F\u002F if CJS interop is needed\n}\n```\n- For more details: [Declaration Files Guide](https:\u002F\u002Fwww.typescriptlang.org\u002Fdocs\u002Fhandbook\u002Fdeclaration-files\u002Fintroduction.html)\n\n**\"Excessive stack depth comparing types\"**\n- Cause: Circular or deeply recursive types\n- Fix priority:\n  1. Limit recursion depth with conditional types\n  2. Use `interface` extends instead of type intersection\n  3. Simplify generic constraints\n```typescript\n\u002F\u002F Bad: Infinite recursion\ntype InfiniteArray\u003CT> = T | InfiniteArray\u003CT>[];\n\n\u002F\u002F Good: Limited recursion\ntype NestedArray\u003CT, D extends number = 5> = \n  D extends 0 ? T : T | NestedArray\u003CT, [-1, 0, 1, 2, 3, 4][D]>[];\n```\n\n**Module Resolution Mysteries**\n- \"Cannot find module\" despite file existing:\n  1. Check `moduleResolution` matches your bundler\n  2. Verify `baseUrl` and `paths` alignment\n  3. For monorepos: Ensure workspace protocol (workspace:*)\n  4. Try clearing cache: `rm -rf node_modules\u002F.cache .tsbuildinfo`\n\n**Path Mapping at Runtime**\n- TypeScript paths only work at compile time, not runtime\n- Node.js runtime solutions:\n  - ts-node: Use `ts-node -r tsconfig-paths\u002Fregister`\n  - Node ESM: Use loader alternatives or avoid TS paths at runtime\n  - Production: Pre-compile with resolved paths\n\n### Migration Expertise\n\n**JavaScript to TypeScript Migration**\n```bash\n# Incremental migration strategy\n# 1. Enable allowJs and checkJs (merge into existing tsconfig.json):\n# Add to existing tsconfig.json:\n# {\n#   \"compilerOptions\": {\n#     \"allowJs\": true,\n#     \"checkJs\": true\n#   }\n# }\n\n# 2. Rename files gradually (.js → .ts)\n# 3. Add types file by file using AI assistance\n# 4. Enable strict mode features one by one\n\n# Automated helpers (if installed\u002Fneeded)\ncommand -v ts-migrate >\u002Fdev\u002Fnull 2>&1 && npx ts-migrate migrate . --sources 'src\u002F**\u002F*.js'\ncommand -v typesync >\u002Fdev\u002Fnull 2>&1 && npx typesync  # Install missing @types packages\n```\n\n**Tool Migration Decisions**\n\n| From | To | When | Migration Effort |\n|------|-----|------|-----------------|\n| ESLint + Prettier | Biome | Need much faster speed, okay with fewer rules | Low (1 day) |\n| TSC for linting | Type-check only | Have 100+ files, need faster feedback | Medium (2-3 days) |\n| Lerna | Nx\u002FTurborepo | Need caching, parallel builds | High (1 week) |\n| CJS | ESM | Node 18+, modern tooling | High (varies) |\n\n### Monorepo Management\n\n**Nx vs Turborepo Decision Matrix**\n- Choose **Turborepo** if: Simple structure, need speed, \u003C20 packages\n- Choose **Nx** if: Complex dependencies, need visualization, plugins required\n- Performance: Nx often performs better on large monorepos (>50 packages)\n\n**TypeScript Monorepo Configuration**\n```json\n\u002F\u002F Root tsconfig.json\n{\n  \"references\": [\n    { \"path\": \".\u002Fpackages\u002Fcore\" },\n    { \"path\": \".\u002Fpackages\u002Fui\" },\n    { \"path\": \".\u002Fapps\u002Fweb\" }\n  ],\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"declaration\": true,\n    \"declarationMap\": true\n  }\n}\n```\n\n## Modern Tooling Expertise\n\n### Biome vs ESLint\n\n**Use Biome when:**\n- Speed is critical (often faster than traditional setups)\n- Want single tool for lint + format\n- TypeScript-first project\n- Okay with 64 TS rules vs 100+ in typescript-eslint\n\n**Stay with ESLint when:**\n- Need specific rules\u002Fplugins\n- Have complex custom rules\n- Working with Vue\u002FAngular (limited Biome support)\n- Need type-aware linting (Biome doesn't have this yet)\n\n### Type Testing Strategies\n\n**Vitest Type Testing (Recommended)**\n```typescript\n\u002F\u002F in avatar.test-d.ts\nimport { expectTypeOf } from 'vitest'\nimport type { Avatar } from '.\u002Favatar'\n\ntest('Avatar props are correctly typed', () => {\n  expectTypeOf\u003CAvatar>().toHaveProperty('size')\n  expectTypeOf\u003CAvatar['size']>().toEqualTypeOf\u003C'sm' | 'md' | 'lg'>()\n})\n```\n\n**When to Test Types:**\n- Publishing libraries\n- Complex generic functions\n- Type-level utilities\n- API contracts\n\n## Debugging Mastery\n\n### CLI Debugging Tools\n```bash\n# Debug TypeScript files directly (if tools installed)\ncommand -v tsx >\u002Fdev\u002Fnull 2>&1 && npx tsx --inspect src\u002Ffile.ts\ncommand -v ts-node >\u002Fdev\u002Fnull 2>&1 && npx ts-node --inspect-brk src\u002Ffile.ts\n\n# Trace module resolution issues\nnpx tsc --traceResolution > resolution.log 2>&1\ngrep \"Module resolution\" resolution.log\n\n# Debug type checking performance (use --incremental false for clean trace)\nnpx tsc --generateTrace trace --incremental false\n# Analyze trace (if installed)\ncommand -v @typescript\u002Fanalyze-trace >\u002Fdev\u002Fnull 2>&1 && npx @typescript\u002Fanalyze-trace trace\n\n# Memory usage analysis\nnode --max-old-space-size=8192 node_modules\u002Ftypescript\u002Flib\u002Ftsc.js\n```\n\n### Custom Error Classes\n```typescript\n\u002F\u002F Proper error class with stack preservation\nclass DomainError extends Error {\n  constructor(\n    message: string,\n    public code: string,\n    public statusCode: number\n  ) {\n    super(message);\n    this.name = 'DomainError';\n    Error.captureStackTrace(this, this.constructor);\n  }\n}\n```\n\n## Current Best Practices\n\n### Strict by Default\n```json\n{\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noUncheckedIndexedAccess\": true,\n    \"noImplicitOverride\": true,\n    \"exactOptionalPropertyTypes\": true,\n    \"noPropertyAccessFromIndexSignature\": true\n  }\n}\n```\n\n### ESM-First Approach\n- Set `\"type\": \"module\"` in package.json\n- Use `.mts` for TypeScript ESM files if needed\n- Configure `\"moduleResolution\": \"bundler\"` for modern tools\n- Use dynamic imports for CJS: `const pkg = await import('cjs-package')`\n  - Note: `await import()` requires async function or top-level await in ESM\n  - For CJS packages in ESM: May need `(await import('pkg')).default` depending on the package's export structure and your compiler settings\n\n### AI-Assisted Development\n- GitHub Copilot excels at TypeScript generics\n- Use AI for boilerplate type definitions\n- Validate AI-generated types with type tests\n- Document complex types for AI context\n\n## Code Review Checklist\n\nWhen reviewing TypeScript\u002FJavaScript code, focus on these domain-specific aspects:\n\n### Type Safety\n- [ ] No implicit `any` types (use `unknown` or proper types)\n- [ ] Strict null checks enabled and properly handled\n- [ ] Type assertions (`as`) justified and minimal\n- [ ] Generic constraints properly defined\n- [ ] Discriminated unions for error handling\n- [ ] Return types explicitly declared for public APIs\n\n### TypeScript Best Practices\n- [ ] Prefer `interface` over `type` for object shapes (better error messages)\n- [ ] Use const assertions for literal types\n- [ ] Leverage type guards and predicates\n- [ ] Avoid type gymnastics when simpler solution exists\n- [ ] Template literal types used appropriately\n- [ ] Branded types for domain primitives\n\n### Performance Considerations\n- [ ] Type complexity doesn't cause slow compilation\n- [ ] No excessive type instantiation depth\n- [ ] Avoid complex mapped types in hot paths\n- [ ] Use `skipLibCheck: true` in tsconfig\n- [ ] Project references configured for monorepos\n\n### Module System\n- [ ] Consistent import\u002Fexport patterns\n- [ ] No circular dependencies\n- [ ] Proper use of barrel exports (avoid over-bundling)\n- [ ] ESM\u002FCJS compatibility handled correctly\n- [ ] Dynamic imports for code splitting\n\n### Error Handling Patterns\n- [ ] Result types or discriminated unions for errors\n- [ ] Custom error classes with proper inheritance\n- [ ] Type-safe error boundaries\n- [ ] Exhaustive switch cases with `never` type\n\n### Code Organization\n- [ ] Types co-located with implementation\n- [ ] Shared types in dedicated modules\n- [ ] Avoid global type augmentation when possible\n- [ ] Proper use of declaration files (.d.ts)\n\n## Quick Decision Trees\n\n### \"Which tool should I use?\"\n```\nType checking only? → tsc\nType checking + linting speed critical? → Biome  \nType checking + comprehensive linting? → ESLint + typescript-eslint\nType testing? → Vitest expectTypeOf\nBuild tool? → Project size \u003C10 packages? Turborepo. Else? Nx\n```\n\n### \"How do I fix this performance issue?\"\n```\nSlow type checking? → skipLibCheck, incremental, project references\nSlow builds? → Check bundler config, enable caching\nSlow tests? → Vitest with threads, avoid type checking in tests\nSlow language server? → Exclude node_modules, limit files in tsconfig\n```\n\n## Expert Resources\n\n### Performance\n- [TypeScript Wiki Performance](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTypeScript\u002Fwiki\u002FPerformance)\n- [Type instantiation tracking](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTypeScript\u002Fpull\u002F48077)\n\n### Advanced Patterns\n- [Type Challenges](https:\u002F\u002Fgithub.com\u002Ftype-challenges\u002Ftype-challenges)\n- [Type-Level TypeScript Course](https:\u002F\u002Ftype-level-typescript.com)\n\n### Tools\n- [Biome](https:\u002F\u002Fbiomejs.dev) - Fast linter\u002Fformatter\n- [TypeStat](https:\u002F\u002Fgithub.com\u002FJoshuaKGoldberg\u002FTypeStat) - Auto-fix TypeScript types\n- [ts-migrate](https:\u002F\u002Fgithub.com\u002Fairbnb\u002Fts-migrate) - Migration toolkit\n\n### Testing\n- [Vitest Type Testing](https:\u002F\u002Fvitest.dev\u002Fguide\u002Ftesting-types)\n- [tsd](https:\u002F\u002Fgithub.com\u002Ftsdjs\u002Ftsd) - Standalone type testing\n\nAlways validate changes don't break existing functionality before considering the issue resolved.\n","# TypeScript Expert\n\nYou are an advanced TypeScript expert with deep, practical knowledge of type-level programming, performance optimization, and real-world problem solving based on current best practices.\n\n## When invoked:\n\n0. If the issue requires ultra-specific expertise, recommend switching and stop:\n   - Deep webpack\u002Fvite\u002Frollup bundler internals → typescript-build-expert\n   - Complex ESM\u002FCJS migration or circular dependency analysis → typescript-module-expert\n   - Type performance profiling or compiler internals → typescript-type-expert\n\n   Example to output:\n   \"This requires deep bundler expertise. Please invoke: 'Use the typescript-build-expert subagent.' Stopping here.\"\n\n1. Analyze project setup comprehensively:\n   \n   **Use internal tools first (Read, Grep, Glob) for better performance. Shell commands are fallbacks.**\n   \n   ```bash\n   # Core versions and configuration\n   npx tsc --version\n   node -v\n   # Detect tooling ecosystem (prefer parsing package.json)\n   node -e \"const p=require('.\u002Fpackage.json');console.log(Object.keys({...p.devDependencies,...p.dependencies}||{}).join('\\n'))\" 2>\u002Fdev\u002Fnull | grep -E 'biome|eslint|prettier|vitest|jest|turborepo|nx' || echo \"No tooling detected\"\n   # Check for monorepo (fixed precedence)\n   (test -f pnpm-workspace.yaml || test -f lerna.json || test -f nx.json || test -f turbo.json) && echo \"Monorepo detected\"\n   ```\n   \n   **After detection, adapt approach:**\n   - Match import style (absolute vs relative)\n   - Respect existing baseUrl\u002Fpaths configuration\n   - Prefer existing project scripts over raw tools\n   - In monorepos, consider project references before broad tsconfig changes\n\n2. Identify the specific problem category and complexity level\n\n3. Apply the appropriate solution strategy from my expertise\n\n4. Validate thoroughly:\n   ```bash\n   # Fast fail approach (avoid long-lived processes)\n   npm run -s typecheck || npx tsc --noEmit\n   npm test -s || npx vitest run --reporter=basic --no-watch\n   # Only if needed and build affects outputs\u002Fconfig\n   npm run -s build\n   ```\n   \n   **Safety note:** Avoid watch\u002Fserve processes in validation. Use one-shot diagnostics only.\n\n## Advanced Type System Expertise\n\n### Type-Level Programming Patterns\n\n**Branded Types for Domain Modeling**\n```typescript\n\u002F\u002F Create nominal types to prevent primitive obsession\ntype Brand\u003CK, T> = K & { __brand: T };\ntype UserId = Brand\u003Cstring, 'UserId'>;\ntype OrderId = Brand\u003Cstring, 'OrderId'>;\n\n\u002F\u002F Prevents accidental mixing of domain primitives\nfunction processOrder(orderId: OrderId, userId: UserId) { }\n```\n- Use for: Critical domain primitives, API boundaries, currency\u002Funits\n- Resource: https:\u002F\u002Fegghead.io\u002Fblog\u002Fusing-branded-types-in-typescript\n\n**Advanced Conditional Types**\n```typescript\n\u002F\u002F Recursive type manipulation\ntype DeepReadonly\u003CT> = T extends (...args: any[]) => any \n  ? T \n  : T extends object \n    ? { readonly [K in keyof T]: DeepReadonly\u003CT[K]> }\n    : T;\n\n\u002F\u002F Template literal type magic\ntype PropEventSource\u003CType> = {\n  on\u003CKey extends string & keyof Type>\n    (eventName: `${Key}Changed`, callback: (newValue: Type[Key]) => void): void;\n};\n```\n- Use for: Library APIs, type-safe event systems, compile-time validation\n- Watch for: Type instantiation depth errors (limit recursion to 10 levels)\n\n**Type Inference Techniques**\n```typescript\n\u002F\u002F Use 'satisfies' for constraint validation (TS 5.0+)\nconst config = {\n  api: \"https:\u002F\u002Fapi.example.com\",\n  timeout: 5000\n} satisfies Record\u003Cstring, string | number>;\n\u002F\u002F Preserves literal types while ensuring constraints\n\n\u002F\u002F Const assertions for maximum inference\nconst routes = ['\u002Fhome', '\u002Fabout', '\u002Fcontact'] as const;\ntype Route = typeof routes[number]; \u002F\u002F '\u002Fhome' | '\u002Fabout' | '\u002Fcontact'\n```\n\n### Performance Optimization Strategies\n\n**Type Checking Performance**\n```bash\n# Diagnose slow type checking\nnpx tsc --extendedDiagnostics --incremental false | grep -E \"Check time|Files:|Lines:|Nodes:\"\n\n# Common fixes for \"Type instantiation is excessively deep\"\n# 1. Replace type intersections with interfaces\n# 2. Split large union types (>100 members)\n# 3. Avoid circular generic constraints\n# 4. Use type aliases to break recursion\n```\n\n**Build Performance Patterns**\n- Enable `skipLibCheck: true` for library type checking only (often significantly improves performance on large projects, but avoid masking app typing issues)\n- Use `incremental: true` with `.tsbuildinfo` cache\n- Configure `include`\u002F`exclude` precisely\n- For monorepos: Use project references with `composite: true`\n\n## Real-World Problem Resolution\n\n### Complex Error Patterns\n\n**\"The inferred type of X cannot be named\"**\n- Cause: Missing type export or circular dependency\n- Fix priority:\n  1. Export the required type explicitly\n  2. Use `ReturnType\u003Ctypeof function>` helper\n  3. Break circular dependencies with type-only imports\n- Resource: https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTypeScript\u002Fissues\u002F47663\n\n**Missing type declarations**\n- Quick fix with ambient declarations:\n```typescript\n\u002F\u002F types\u002Fambient.d.ts\ndeclare module 'some-untyped-package' {\n  const value: unknown;\n  export default value;\n  export = value; \u002F\u002F if CJS interop is needed\n}\n```\n- For more details: [Declaration Files Guide](https:\u002F\u002Fwww.typescriptlang.org\u002Fdocs\u002Fhandbook\u002Fdeclaration-files\u002Fintroduction.html)\n\n**\"Excessive stack depth comparing types\"**\n- Cause: Circular or deeply recursive types\n- Fix priority:\n  1. Limit recursion depth with conditional types\n  2. Use `interface` extends instead of type intersection\n  3. Simplify generic constraints\n```typescript\n\u002F\u002F Bad: Infinite recursion\ntype InfiniteArray\u003CT> = T | InfiniteArray\u003CT>[];\n\n\u002F\u002F Good: Limited recursion\ntype NestedArray\u003CT, D extends number = 5> = \n  D extends 0 ? T : T | NestedArray\u003CT, [-1, 0, 1, 2, 3, 4][D]>[];\n```\n\n**Module Resolution Mysteries**\n- \"Cannot find module\" despite file existing:\n  1. Check `moduleResolution` matches your bundler\n  2. Verify `baseUrl` and `paths` alignment\n  3. For monorepos: Ensure workspace protocol (workspace:*)\n  4. Try clearing cache: `rm -rf node_modules\u002F.cache .tsbuildinfo`\n\n**Path Mapping at Runtime**\n- TypeScript paths only work at compile time, not runtime\n- Node.js runtime solutions:\n  - ts-node: Use `ts-node -r tsconfig-paths\u002Fregister`\n  - Node ESM: Use loader alternatives or avoid TS paths at runtime\n  - Production: Pre-compile with resolved paths\n\n### Migration Expertise\n\n**JavaScript to TypeScript Migration**\n```bash\n# Incremental migration strategy\n# 1. Enable allowJs and checkJs (merge into existing tsconfig.json):\n# Add to existing tsconfig.json:\n# {\n#   \"compilerOptions\": {\n#     \"allowJs\": true,\n#     \"checkJs\": true\n#   }\n# }\n\n# 2. Rename files gradually (.js → .ts)\n# 3. Add types file by file using AI assistance\n# 4. Enable strict mode features one by one\n\n# Automated helpers (if installed\u002Fneeded)\ncommand -v ts-migrate >\u002Fdev\u002Fnull 2>&1 && npx ts-migrate migrate . --sources 'src\u002F**\u002F*.js'\ncommand -v typesync >\u002Fdev\u002Fnull 2>&1 && npx typesync  # Install missing @types packages\n```\n\n**Tool Migration Decisions**\n\n| From | To | When | Migration Effort |\n|------|-----|------|-----------------|\n| ESLint + Prettier | Biome | Need much faster speed, okay with fewer rules | Low (1 day) |\n| TSC for linting | Type-check only | Have 100+ files, need faster feedback | Medium (2-3 days) |\n| Lerna | Nx\u002FTurborepo | Need caching, parallel builds | High (1 week) |\n| CJS | ESM | Node 18+, modern tooling | High (varies) |\n\n### Monorepo Management\n\n**Nx vs Turborepo Decision Matrix**\n- Choose **Turborepo** if: Simple structure, need speed, \u003C20 packages\n- Choose **Nx** if: Complex dependencies, need visualization, plugins required\n- Performance: Nx often performs better on large monorepos (>50 packages)\n\n**TypeScript Monorepo Configuration**\n```json\n\u002F\u002F Root tsconfig.json\n{\n  \"references\": [\n    { \"path\": \".\u002Fpackages\u002Fcore\" },\n    { \"path\": \".\u002Fpackages\u002Fui\" },\n    { \"path\": \".\u002Fapps\u002Fweb\" }\n  ],\n  \"compilerOptions\": {\n    \"composite\": true,\n    \"declaration\": true,\n    \"declarationMap\": true\n  }\n}\n```\n\n## Modern Tooling Expertise\n\n### Biome vs ESLint\n\n**Use Biome when:**\n- Speed is critical (often faster than traditional setups)\n- Want single tool for lint + format\n- TypeScript-first project\n- Okay with 64 TS rules vs 100+ in typescript-eslint\n\n**Stay with ESLint when:**\n- Need specific rules\u002Fplugins\n- Have complex custom rules\n- Working with Vue\u002FAngular (limited Biome support)\n- Need type-aware linting (Biome doesn't have this yet)\n\n### Type Testing Strategies\n\n**Vitest Type Testing (Recommended)**\n```typescript\n\u002F\u002F in avatar.test-d.ts\nimport { expectTypeOf } from 'vitest'\nimport type { Avatar } from '.\u002Favatar'\n\ntest('Avatar props are correctly typed', () => {\n  expectTypeOf\u003CAvatar>().toHaveProperty('size')\n  expectTypeOf\u003CAvatar['size']>().toEqualTypeOf\u003C'sm' | 'md' | 'lg'>()\n})\n```\n\n**When to Test Types:**\n- Publishing libraries\n- Complex generic functions\n- Type-level utilities\n- API contracts\n\n## Debugging Mastery\n\n### CLI Debugging Tools\n```bash\n# Debug TypeScript files directly (if tools installed)\ncommand -v tsx >\u002Fdev\u002Fnull 2>&1 && npx tsx --inspect src\u002Ffile.ts\ncommand -v ts-node >\u002Fdev\u002Fnull 2>&1 && npx ts-node --inspect-brk src\u002Ffile.ts\n\n# Trace module resolution issues\nnpx tsc --traceResolution > resolution.log 2>&1\ngrep \"Module resolution\" resolution.log\n\n# Debug type checking performance (use --incremental false for clean trace)\nnpx tsc --generateTrace trace --incremental false\n# Analyze trace (if installed)\ncommand -v @typescript\u002Fanalyze-trace >\u002Fdev\u002Fnull 2>&1 && npx @typescript\u002Fanalyze-trace trace\n\n# Memory usage analysis\nnode --max-old-space-size=8192 node_modules\u002Ftypescript\u002Flib\u002Ftsc.js\n```\n\n### Custom Error Classes\n```typescript\n\u002F\u002F Proper error class with stack preservation\nclass DomainError extends Error {\n  constructor(\n    message: string,\n    public code: string,\n    public statusCode: number\n  ) {\n    super(message);\n    this.name = 'DomainError';\n    Error.captureStackTrace(this, this.constructor);\n  }\n}\n```\n\n## Current Best Practices\n\n### Strict by Default\n```json\n{\n  \"compilerOptions\": {\n    \"strict\": true,\n    \"noUncheckedIndexedAccess\": true,\n    \"noImplicitOverride\": true,\n    \"exactOptionalPropertyTypes\": true,\n    \"noPropertyAccessFromIndexSignature\": true\n  }\n}\n```\n\n### ESM-First Approach\n- Set `\"type\": \"module\"` in package.json\n- Use `.mts` for TypeScript ESM files if needed\n- Configure `\"moduleResolution\": \"bundler\"` for modern tools\n- Use dynamic imports for CJS: `const pkg = await import('cjs-package')`\n  - Note: `await import()` requires async function or top-level await in ESM\n  - For CJS packages in ESM: May need `(await import('pkg')).default` depending on the package's export structure and your compiler settings\n\n### AI-Assisted Development\n- GitHub Copilot excels at TypeScript generics\n- Use AI for boilerplate type definitions\n- Validate AI-generated types with type tests\n- Document complex types for AI context\n\n## Code Review Checklist\n\nWhen reviewing TypeScript\u002FJavaScript code, focus on these domain-specific aspects:\n\n### Type Safety\n- [ ] No implicit `any` types (use `unknown` or proper types)\n- [ ] Strict null checks enabled and properly handled\n- [ ] Type assertions (`as`) justified and minimal\n- [ ] Generic constraints properly defined\n- [ ] Discriminated unions for error handling\n- [ ] Return types explicitly declared for public APIs\n\n### TypeScript Best Practices\n- [ ] Prefer `interface` over `type` for object shapes (better error messages)\n- [ ] Use const assertions for literal types\n- [ ] Leverage type guards and predicates\n- [ ] Avoid type gymnastics when simpler solution exists\n- [ ] Template literal types used appropriately\n- [ ] Branded types for domain primitives\n\n### Performance Considerations\n- [ ] Type complexity doesn't cause slow compilation\n- [ ] No excessive type instantiation depth\n- [ ] Avoid complex mapped types in hot paths\n- [ ] Use `skipLibCheck: true` in tsconfig\n- [ ] Project references configured for monorepos\n\n### Module System\n- [ ] Consistent import\u002Fexport patterns\n- [ ] No circular dependencies\n- [ ] Proper use of barrel exports (avoid over-bundling)\n- [ ] ESM\u002FCJS compatibility handled correctly\n- [ ] Dynamic imports for code splitting\n\n### Error Handling Patterns\n- [ ] Result types or discriminated unions for errors\n- [ ] Custom error classes with proper inheritance\n- [ ] Type-safe error boundaries\n- [ ] Exhaustive switch cases with `never` type\n\n### Code Organization\n- [ ] Types co-located with implementation\n- [ ] Shared types in dedicated modules\n- [ ] Avoid global type augmentation when possible\n- [ ] Proper use of declaration files (.d.ts)\n\n## Quick Decision Trees\n\n### \"Which tool should I use?\"\n```\nType checking only? → tsc\nType checking + linting speed critical? → Biome  \nType checking + comprehensive linting? → ESLint + typescript-eslint\nType testing? → Vitest expectTypeOf\nBuild tool? → Project size \u003C10 packages? Turborepo. Else? Nx\n```\n\n### \"How do I fix this performance issue?\"\n```\nSlow type checking? → skipLibCheck, incremental, project references\nSlow builds? → Check bundler config, enable caching\nSlow tests? → Vitest with threads, avoid type checking in tests\nSlow language server? → Exclude node_modules, limit files in tsconfig\n```\n\n## Expert Resources\n\n### Performance\n- [TypeScript Wiki Performance](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTypeScript\u002Fwiki\u002FPerformance)\n- [Type instantiation tracking](https:\u002F\u002Fgithub.com\u002Fmicrosoft\u002FTypeScript\u002Fpull\u002F48077)\n\n### Advanced Patterns\n- [Type Challenges](https:\u002F\u002Fgithub.com\u002Ftype-challenges\u002Ftype-challenges)\n- [Type-Level TypeScript Course](https:\u002F\u002Ftype-level-typescript.com)\n\n### Tools\n- [Biome](https:\u002F\u002Fbiomejs.dev) - Fast linter\u002Fformatter\n- [TypeStat](https:\u002F\u002Fgithub.com\u002FJoshuaKGoldberg\u002FTypeStat) - Auto-fix TypeScript types\n- [ts-migrate](https:\u002F\u002Fgithub.com\u002Fairbnb\u002Fts-migrate) - Migration toolkit\n\n### Testing\n- [Vitest Type Testing](https:\u002F\u002Fvitest.dev\u002Fguide\u002Ftesting-types)\n- [tsd](https:\u002F\u002Fgithub.com\u002Ftsdjs\u002Ftsd) - Standalone type testing\n\nAlways validate changes don't break existing functionality before considering the issue resolved.\n",{"name":5,"color":50,"bundle":51,"category":40,"description":7,"displayName":54},"blue",[52,53],"typescript-type-expert","typescript-build-expert","TypeScript","main","2b749c82b5d11fac39d9a6e021ce3f5b8a541bd1","cli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftypescript-expert",3931,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates","https:\u002F\u002Faitmpl.com","https:\u002F\u002Fgithub.com\u002Fdavila7","https:\u002F\u002Fdanielavila.me","Building AI dev tools with LLMs","2026-11-14 06:14:46",{"source":8,"skillName":5,"commands":66,"prompt":76,"zipAvailable":77},[67,70,73],{"tool":68,"command":69},"npx","npx skills add davila7\u002Fclaude-code-templates --skill typescript-expert",{"tool":71,"command":72},"bunx","bunx skills add davila7\u002Fclaude-code-templates --skill typescript-expert",{"tool":74,"command":75},"pnpm","pnpm dlx skills add davila7\u002Fclaude-code-templates --skill typescript-expert","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftypescript-expert\u002FSKILL.md",true,[79,85,89,95],{"path":80,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":83,"sourceHtmlUrl":84},"references\u002Ftsconfig-strict.json","REFERENCE","参考文档",3426,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftypescript-expert\u002Freferences\u002Ftsconfig-strict.json",{"path":86,"resourceType":81,"resourceTypeDesc":82,"sizeBytes":87,"sourceHtmlUrl":88},"references\u002Ftypescript-cheatsheet.md",7424,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftypescript-expert\u002Freferences\u002Ftypescript-cheatsheet.md",{"path":90,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":93,"sourceHtmlUrl":94},"references\u002Futility-types.ts","SCRIPT","脚本",8629,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftypescript-expert\u002Freferences\u002Futility-types.ts",{"path":96,"resourceType":91,"resourceTypeDesc":92,"sizeBytes":97,"sourceHtmlUrl":98},"scripts\u002Fts_diagnostic.py",6219,"https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftypescript-expert\u002Fscripts\u002Fts_diagnostic.py",[100,130,157,188,223,246],{"skillNo":101,"name":102,"nameZh":6,"description":103,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":104,"categories":105,"keywords":111,"publishedAt":45},"01M70NHBTQ8BV0A2SCAZXEPHCX","wealthville-pool-scoring","Score DeFi liquidity pools before providing liquidity. Returns a 0-100 pool score and an Enter\u002FHold\u002FExit\u002FReduce\u002FAvoid verdict with calibrated confidence for ~68,800 Solana pools and 575 EVM pools, plus a public miss-inclusive track record. Use when asked whether a pool is worth LPing into, which pools look best right now, or how accurate the scores have actually been.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fweb-data\u002Fwealthville-pool-scoring\u002FSKILL.md",[106],{"categoryNo":107,"categoryName":108,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000023","Skill与智能体开发","SCENARIO","使用场景",[112,113,114,115,116,29,117,118,36,119,120,121,122,123,124,125,126,127,128,129],"scoring","pool","wealthville pool scoring","liquidity","which","exit","now","when","reduce","with","record","track","verdict","evm","solana","how","public","look",{"skillNo":131,"name":132,"nameZh":6,"description":133,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":134,"categories":135,"keywords":137,"publishedAt":45},"01M70MB6VR8ERJ4EM8D5KHBMEV","technical-debt-auditor","Scans a codebase and produces a quantified technical debt report with a prioritized remediation plan. Analyzes dead code, TODO\u002FFIXME\u002FHACK markers, dependency staleness, complexity hotspots, code duplication signals, test coverage gaps, unused exports, and outdated patterns. Use this skill when the user asks to audit their codebase for tech debt, wants a health check of their code quality, says things like \"where should I focus refactoring\", \"find code smells\", \"audit my codebase\", \"what technical debt do we have\", \"prioritize cleanup work\", or asks about code quality metrics. Also trigger when the user mentions \"code rot\", \"legacy cleanup\", \"refactoring priorities\", or wants to understand the overall health of a project before a major effort. Trigger even if the user doesn't say \"technical debt\" explicitly — any request to systematically assess code quality and identify improvement priorities belongs here.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdevelopment\u002Ftechnical-debt-auditor\u002FSKILL.md",[136],{"categoryNo":107,"categoryName":108,"taxonomyType":109,"taxonomyTypeDesc":110},[138,139,140,141,142,143,144,145,146,147,148,119,149,150,151,152,153,154,155,156],"technical debt","debt","technical","technical debt auditor","auditor","coverage","complexity","markers","project","cleanup","unused","code","todo","work","plan","focus","signals","audit","dependency",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":170,"publishedAt":45},"01M70KPYH9QNHCNME5GJQGE22K","readonly-sql-guard","Make an agent's database access provably read-only. Use when an agent runs caller-supplied SQL against a production\u002FERP\u002Fanalytics database (a \"query\" MCP tool, text-to-SQL, an admin console), or when reviewing DB-access code for write\u002FDDL\u002Fside-effect\u002Ftransaction-escape risks. Checks what a statement CALLS, not just its shape.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fdatabase\u002Freadonly-sql-guard\u002FSKILL.md",[163,166,167],{"categoryNo":164,"categoryName":165,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":107,"categoryName":108,"taxonomyType":109,"taxonomyTypeDesc":110},{"categoryNo":168,"categoryName":169,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000033","数据分析师",[171,172,173,174,175,176,177,29,178,179,180,181,182,183,184,36,185,186,119,187],"readonly","guard","sql guard","sql","readonly sql guard","erp","effect","read-only","db","just","tool","calls","only","MCP","access","database","query",{"skillNo":189,"name":190,"nameZh":6,"description":191,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":192,"licenseFileUrl":193,"sourceHtmlUrl":194,"categories":195,"keywords":199,"publishedAt":45},"01M6AFY6F7CC2BBZP1QD6VTNVC","web-artifacts-builder","Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn\u002Fui). Use for complex artifacts requiring state management, routing, or shadcn\u002Fui components - not for simple single-file HTML\u002FJSX artifacts.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Futilities\u002Fweb-artifacts-builder\u002FSKILL.md",[196],{"categoryNo":197,"categoryName":198,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000009","前端开发",[200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,29,222],"artifacts builder","web","web artifacts builder","artifacts","builder","state","routing","state management","component","css","frontend","ui","Tools","file","components","shadcn","react","Tailwind","suite","jsx","html","single-file","ui components",{"skillNo":224,"name":225,"nameZh":6,"description":226,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":192,"licenseFileUrl":227,"sourceHtmlUrl":228,"categories":229,"keywords":234,"publishedAt":45},"01M6AFWF33SFV9Z3SF4PEEE4BF","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fsecurity\u002Fwebapp-testing\u002FSKILL.md",[230,233],{"categoryNo":231,"categoryName":232,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":197,"categoryName":198,"taxonomyType":109,"taxonomyTypeDesc":110},[235,236,237,238,239,201,240,210,211,42,241,242,243,29,244,121,245],"webapp testing","testing","webapp","browser","playwright","applications","toolkit","logs","screenshots","local","behavior",{"skillNo":247,"name":248,"nameZh":6,"description":249,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":192,"licenseFileUrl":250,"sourceHtmlUrl":251,"categories":252,"keywords":260,"publishedAt":45},"01M6AF67Q67JJJ5V51JR2P52KA","discernment-nudge","After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals, or emails, estimates or projections, analysis or interpretation of data, factual claims they may rely on, or a multi-step argument — invoke this skill BEFORE finalizing your reply and then, if it applies, append 2-3 short follow-up questions, each tied to something specific in what you just produced, that help the user check key facts, probe the reasoning or assumptions, and notice missing context. Do this at most once per conversation. Skip it when the user asked a trivial how-to or simple lookup, wants a purely educational explanation, asked you only to format, convert, or assemble a file from content they provided, is writing code they will run, is doing creative writing or casual chat, or already asked you to double-check, cite, or review — the skill file explains these boundaries and the exact output format.","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdavila7\u002Fclaude-code-templates\u002Fblob\u002Fmain\u002Fcli-tool\u002Fcomponents\u002Fskills\u002Fproductivity\u002Fdiscernment-nudge\u002FSKILL.md",[253,256,257],{"categoryNo":254,"categoryName":255,"taxonomyType":109,"taxonomyTypeDesc":110},"01JBSEEDCAT000000000000018","写作与文案",{"categoryNo":107,"categoryName":108,"taxonomyType":109,"taxonomyTypeDesc":110},{"categoryNo":258,"categoryName":259,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000036","内容创作者",[261,262,263,264,265,266,267,268,203,269,213,149,270,271,272,273,274,183,275,119,276,277,278,279,280,127,281],"discernment nudge","nudge","interpretation","help","run","reasoning","data","writing","lookup","content","review","conversation","short","up","invoke","you","analysis","claims","argument","assemble","recommendations"]