clean-code-ts-react
Installation
SKILL.md
Robert C. Martin (Uncle Bob) TypeScript 5.x + React 19 Best Practices
Craftsmanship principles from Robert C. Martin's Clean Code (2008), re-expressed for modern TypeScript and React. Contains 61 rules across 11 categories, prioritized by cognitive cost across a code change's lifetime. Examples use TS 5.x and React 19 idioms — but the rules are about timeless principles, not specific APIs.
What Makes This Skill Different
Three things set this apart from a generic clean-code copy:
- Modern idioms as vehicle. Examples use TS 5.x (
satisfies, branded types, discriminated unions,consttype parameters) and React 19 (function components, hooks,use(), Server Components where relevant). But the rule is always the principle, never the syntax. - "When NOT to apply" is first-class. Every rule has 2-3 concrete scenarios where the principle should bend — not generic disclaimers, real situations. Loop counters can be
i. Single-use code shouldn't be DRY. Some HOCs are unavoidable. - Meta category for principle conflicts. Category 11 names the most common tensions explicitly — DRY vs Single Responsibility, small functions vs deep modules (Ousterhout), type precision vs ergonomic APIs, tests as spec vs documentation. The mark of seniority is knowing which to bend.