code-quality
Installation
SKILL.md
Code Quality
Language-agnostic conventions that hold up over time. Optimize for the next person reading the code (often future you). Favor clarity over cleverness.
Core principles
- Prefer the smallest change that fixes the root cause, not the symptom.
- Make code obvious: clear names, one responsibility per function, early returns over deep nesting.
- Keep functions small enough to understand on one screen unless complexity is inherent and well-structured.
- Separate concerns: parsing, validation, business decisions, and side effects should not be tangled together.
- Don't add abstraction until duplication or a real domain concept demands it (rule of three). Avoid speculative generality (YAGNI). See the
minimalismskill for the full "write less" discipline. - No magic strings/numbers in core logic — promote repeated values to named constants or typed enums.
- Delete dead code, unused files, and migration leftovers when a task is done.
- Avoid broad refactors during bug fixes unless the refactor is required to fix the bug safely.