code-review
Installation
SKILL.md
Code review — repo best practices
Run through this checklist on any diff. Flag violations with the specific line and the suggested fix.
Tailwind
- Prefer utilities over custom classes. If a pattern can be expressed with existing Tailwind utilities, use them. Don't add a custom class in
app/globals.cssunless the pattern repeats 3+ times with the same composition. - Use the
@themetokens (bg-surface,text-ink,border-line, etc.) — never hardcode hex in JSX. - No
style={{ ... }}unless the value is dynamic (e.g.width: ${pct}%). Static styling belongs in className. - No
@applyinglobals.css(Tailwind 4 best practice — put the utilities on the element instead, or extract a React component).
Constants + utils
- Magic numbers →
lib/constants/(e.g.SCORE_THRESHOLD_GOOD,LEADERBOARD_PAGE_SIZE). - Repeated formatting →
lib/utils/format.ts(compactStars,relativeTime,hostLabel). - Repeated scoring logic →
lib/utils/score.ts(scoreTier,TIER_TEXT_CLASS,TIER_BG_CLASS). - A helper that's used once doesn't belong in
utils/; inline it.