Loading...
Loading...
Review the diff between the current branch and main as a senior developer. Analyzes architecture, coding standards, security, performance, and correctness. Use when user says 'review my code', 'pre-PR review', 'review diff', 'code review before PR', 'check my changes', or 'senior review'. Do NOT use for only running tests (use a test skill), only linting (use a lint skill), or full PR preparation (use create-pr).
npx skill4agent add thommann/skills review-difforigin/mainCLAUDE.mdCLAUDE.mddocs/adr/docs/decisions/docs/arc42/decisions/git fetch origin main
git diff origin/main...HEAD
git diff origin/main...HEAD --stat
git log origin/main..HEAD --onelineCLAUDE.mdgit diff origin/main...HEAD --name-only | awk -F/ '{print $1"/"$2}' | sort -u | while read d; do
[ -f "$d/CLAUDE.md" ] && echo "READ: $d/CLAUDE.md"
donesrc/lib/src/shared/CLAUDE.mdCLAUDE.mdcatch (e)evalfile.ts:42## Review of {branch} ({N} files, {+X -Y} lines)
## Critical (must fix before merge)
- `src/api/users.ts:42` — SQL injection via `getUserByName`: user input is concatenated into
the query. Use the parameterized `db.query(..., [params])` form — see `src/api/orders.ts:78`
for the pattern.
## Important (should fix)
- `src/services/payment.ts:15` — new service does not extend `ServiceBase`. Convention per
root `CLAUDE.md` is that all services extend it for logging + error-wrapping.
## Suggestions (nice to have)
- `src/lib/utils.ts:22` — `formatDate` duplicates logic already in `src/lib/dates.ts:8`.
Consider re-using or removing the duplicate.
## What looks good
- Error handling in `src/api/auth.ts` correctly uses `AppError` subclasses.
- New tests in `tests/integration/users.spec.ts` cover both happy path and permission denial.# Did you miss any files in the diff?
git diff origin/main...HEAD --name-only | wc -l
# Your review should touch a substantial fraction of these (not necessarily every one —
# formatter-only changes and pure test additions may not need flagging).| Mistake | Correction |
|---|---|
| Re-flagging issues the formatter already caught | Skip them — focus on substance. Principle 03: don't duplicate tooling. |
| Vague "this could be cleaner" | Quote the line, propose the specific change, name a file that already does it right. |
| Only finding problems, never acknowledging good work | The "What looks good" section matters — it calibrates the reviewer's honesty and helps the author learn what's landing well. |
| Reviewing against rules from a different project | Re-read |