type-system-audit

Installation
SKILL.md

Type-System Audit

Audit a repository for type-system weaknesses using bug-fix commits as hard evidence—not speculation. Identify which types allowed invalid states that caused real bugs, and recommend stricter types that would prevent entire defect classes. All findings are tied to specific commits for credibility.

Workflow

Phase 1: Identify Language and Type System

Determine the primary language(s) and type system in use. Use the table below to adapt the audit approach:

Language Nullability patterns Sum types Boundary validation File extensions
TypeScript T | null | undefined, optional chaining Discriminated unions, literal types zod, io-ts, yup .ts, .tsx
Swift Optional<T> / ?, force-unwrap ! enum with associated values Codable, custom init .swift
Kotlin T?, !!, null-safe operators sealed class / when @Serializable, require() .kt
Python Optional[T], None checks Union, Literal, TypedDict pydantic, attrs .py, .pyi

Phase 2: Commit Selection

Related skills
Installs
9
GitHub Stars
15
First Seen
Mar 29, 2026