java-clean-codelisted
Install: claude install-skill CasLubbers/code-design-skills
# Clean Java: complete reference
The full catalog. For depth on one area use the focused skills: `java-clean-names`, `java-clean-functions`, `java-clean-comments`, `java-clean-general`, `java-clean-tests`, `java-boy-scout`.
## Names
- **N1** Names reveal intent. If it needs a comment, rename it.
- **N2** Name at the caller's level of abstraction — `ordersByCustomer()`, not `getOrderHashMap()`.
- **N3** Use standard nomenclature: domain terms, pattern names, `find`/`create`/`delete` consistently.
- **N4** Unambiguous. `rename(source, target)` beats `rename(a, b)`.
- **N5** Length matches scope. `var` shifts the weight onto the name.
- **N6** No encodings: no `strName`, no `m_count`, no `IUserRepository`, no `UserServiceImpl`.
- **N7** The name describes every side effect. A getter that loads is `getOrLoad`.
- **N8** No noise words: `Manager`, `Helper`, `Data`, `Info`, `Util` distinguish nothing.
- **N9** Conventions: `PascalCase` noun types, `camelCase` verb methods, `UPPER_SNAKE` constants, predicate booleans (`isActive`, `hasExpired`). Record-style accessors (`order.total()`) over `getTotal()` in new domain types.
## Methods
- **F1** One thing, one level of abstraction.
- **F2** Small. If you cannot name it precisely, it does more than one thing.
- **F3** Three parameters maximum. Group the rest into a record.
- **F4** No boolean flag arguments — split the method, or pass an enum.
- **F5** Guard clauses over nesting. Return early.
- **F6** Never return null. `Optional<T