null-safety
Installation
SKILL.md
Activation Contract
Load this skill when reviewing refactor plans for: null safety, nullability, Optional, NPE.
Hard Rules
- Flag dereferences without clear guarantees, nullable returns, and ambiguous null semantics.
- Prefer boundary checks, NonNull annotations where used, clear defaults, or Null Object only when justified.
- Do not introduce Optional in fields, parameters, or DTOs without explicit reason.
- Preserve observable behavior; label functional changes as follow-up.
- Require evidence for every recommendation, or mark it as a hypothesis.
Decision Gates
| Signal | Action |
|---|---|
| Concrete evidence exists | Create a finding with file, lines, symbol, benefit, validation, and rollback. |
| Evidence is incomplete | Mark as hypothesis and lower confidence. |
| Recommendation is cosmetic or speculative | Omit it unless maintainability benefit is clear. |