What problem does it solve? Mutation bugs, deeply nested conditionals, and unpredictable side effects make TypeScript code hard to test and reason about. This Skill provides concrete patterns for writing pure, composable functions with immutable data structures. ## Core Features & Use Cases - Immutability enforcement: Catalog of immutable alternatives to every common array and object mutation, plus readonly and ReadonlyArray<T> typing guidance. - Composition and refactoring: Worked examples for composing small functions into pipelines, flattening deep nesting with guard clauses, and isolating impure I/O at system boundaries. - Pragmatic scope: Covers Result types for error handling, options objects for parameter groups, and early returns, while explicitly avoiding heavy FP abstractions like monads or fp-ts. - Use Case: When fixing a bug where a shared array is mutated unexpectedly, load the immutability catalog to find the correct immutable alternative and apply readonly types so the compiler prevents recurrence. ## Quick Start Ask the AI to refactor a TypeScript function that mutates its arguments into a pure function using immutable data and early returns.