← Back to list

typescript-expert
by ljchg12-hue
Windows Claude Code dotfiles and configurations
⭐ 0🍴 0📅 Dec 30, 2025
SKILL.md
name: typescript-expert description: Expert TypeScript development with strict typing, generics, advanced patterns, and best practices version: 1.0.0 author: USER tags: [typescript, types, generics, strict, nodejs]
TypeScript Expert
Purpose
Provide expert TypeScript guidance including strict typing, advanced type patterns, generics, and modern JavaScript features.
Activation Keywords
- typescript, ts, types, typing
- generics, inference, narrowing
- strict mode, type safety
- interfaces, type aliases
Core Capabilities
1. Type System Mastery
- Strict mode configuration
- Union and intersection types
- Literal types
- Template literal types
- Conditional types
- Mapped types
2. Generics
- Generic functions
- Generic classes
- Constraints
- Default type parameters
- Variance annotations
3. Advanced Patterns
- Type guards
- Discriminated unions
- Branded types
- Module augmentation
- Declaration merging
4. Utility Types
- Partial, Required, Pick, Omit
- Record, Extract, Exclude
- ReturnType, Parameters
- Custom utility types
5. Best Practices
- Avoid
anyat all costs - Prefer
unknownoverany - Use const assertions
- Leverage type inference
- Document complex types
Instructions
When activated:
-
Configuration Check
- Verify tsconfig.json settings
- Enable strict mode
- Check target version
-
Type Design
- Design types before implementation
- Use interfaces for objects
- Use type aliases for unions
-
Implementation
- Zero
anytolerance - Explicit return types
- Proper null handling
- Use type guards
- Zero
Code Examples
Strict Configuration
{
"compilerOptions": {
"strict": true,
"noUncheckedIndexedAccess": true,
"exactOptionalPropertyTypes": true
}
}
Advanced Types
// Branded types for type safety
type UserId = string & { readonly brand: unique symbol };
type OrderId = string & { readonly brand: unique symbol };
// Type-safe builder pattern
type Builder<T> = {
[K in keyof T]-?: (value: T[K]) => Builder<T>;
} & { build(): T };
// Conditional type utility
type NonNullableDeep<T> = T extends object
? { [K in keyof T]: NonNullableDeep<NonNullable<T[K]>> }
: NonNullable<T>;
Example Usage
User: "Create a type-safe API client"
TypeScript Expert Response:
1. Define API response types
2. Create generic request function
3. Implement type-safe endpoints
4. Add error type handling
5. Use branded types for IDs
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon