Loading...
Loading...
Core code quality principles for writing maintainable code. Use when reviewing code for design violations, assessing code quality, or applying architectural patterns like composition, immutability, and fail-fast.
npx skill4agent add weegigs/claude-kitbash principles| Principle | Description |
|---|---|
| Imperative shell, functional core—separate pure logic from I/O |
| Principle | Description |
|---|---|
| Make illegal states unrepresentable via type design |
| One reason to change per unit |
| Validated types at boundaries |
| Prefer composition over inheritance |
| Open for extension, closed for modification |
| No hidden globals or implicit state |
| Surface errors immediately with context |
| Errors should be identifiable to allow action |
| Const/readonly by default |
| Unions/enums over magic strings |
| Left-hand side is the happy path (Go style early returns) |