typescript-clean-codelisted
Install: claude install-skill CasLubbers/code-design-skills
# Clean TypeScript: Complete Reference
Enforces all Clean Code principles from Robert C. Martin's Chapter 17, adapted for TypeScript.
## Comments (C1-C5)
- C1: No metadata in comments (use Git)
- C2: Delete obsolete comments immediately
- C3: No redundant comments
- C4: Write comments well if you must
- C5: Never commit commented-out code
## Environment (E1-E2)
- E1: One command to build (`npm run build`)
- E2: One command to test (`npm test`)
## Functions (F1-F4)
- F1: Maximum 3 arguments (use parameter objects/interfaces for more)
- F2: No output arguments (return values)
- F3: No flag arguments (split functions)
- F4: Delete dead functions
- Stepdown rule: file reads top-down, callers above callees, one level of abstraction per function
## General (G1-G36)
- G1: One language per file
- G2: Implement expected behavior
- G3: Handle boundary conditions
- G4: Don't override safeties
- G5: DRY - no duplication
- Composition over inheritance: inherit only for genuine is-a, compose for reuse
- G6: Consistent abstraction levels
- G7: Base classes don't know children
- G8: Minimize public interface
- G9: Delete dead code
- G10: Variables near usage
- G11: Be consistent
- G12: Remove clutter
- G13: No artificial coupling
- G14: No feature envy
- G15: No selector arguments
- G16: No obscured intent
- G17: Code where expected
- G18: Prefer instance methods
- G19: Use explanatory variables
- G20: Function names say what they do
- G21: Understand the algorithm
- G22: Make dependenc