What problem does it solve? Codebases accumulate complexity through deep nesting, repeated validation, hidden mutations, and silent failures. This Skill provides a consistent philosophy for writing internal logic so that data flows naturally and invalid states become impossible. ## Core Features & Use Cases - The 5 Laws of Elegant Defense: Guard clauses, parse-don't-validate, atomic predictability, fail-fast behavior, and intentional naming. - Broad Applicability: Applies to backend services, React components, hooks, state management, and any code where functionality matters. - Adherence Checklist: A five-point verification list to run before completing any coding task. - Use Case: When refactoring a tangled function with nested conditionals, apply the Law of the Early Exit to flatten the logic and the Parse-Don't-Validate law to move type checks to the boundary. ## Quick Start Review this function using the 5 Laws of Elegant Defense and refactor it to use guard clauses and fail-fast error handling.