type-system
Installation
SKILL.md
Type System Opportunity Analyzer
Analyze code for type system weaknesses. Produce concrete before/after transformations.
When to Use
- Reviewing or creating TypeScript types/interfaces
- Before or after refactoring domain models
- Code review where type safety matters
- User asks to "strengthen types", "improve type safety", or "find type issues"
Scan Categories (Priority Order)
1. Impossible States
Optional fields that are only valid in certain states. Fix with discriminated unions.
// BAD: commentId exists on LIKE_ON_POST — impossible but representable
interface Notification { type: NotificationType; commentId?: string }