Skip to content

commandGit and releases

Review Changes

Reviews your own uncommitted changes before you commit and lists problems by severity, so you catch them before a reviewer does.

npx workspacetemplates add review-changes --tool claude-code

Writes 1 file to .claude/commands/

.claude/commands/review-changes.md14 lines · 1.2 KBFile
---
description: Reviews your own uncommitted changes before you commit and lists problems by severity, so you catch them before a reviewer does.
argument-hint: "[area to focus on, optional]"
---

Review my uncommitted changes. Focus from the user: $ARGUMENTS

1. Run `git status --short`, `git diff` and `git diff --staged`. Read untracked files that are new code too.
2. For each changed function, open the surrounding file so you judge it in context, and search for its callers.
3. Check, in order: bugs and unhandled cases (null, empty, off-by-one, async errors); security (user input, secrets, injection); behavior changes not mentioned by the user; missing or weak tests for new logic; leftover `console.log`, `print`, `debugger`, TODOs and commented-out code; unrelated edits that belong in another commit; files that should be ignored.
4. Run the project's lint and fast tests and include failures.
5. Do not edit anything.

Report findings as **Critical**, **Should fix** and **Nit**, each with `file:line`, the problem and a one-line fix. If nothing is wrong, say what you checked. End with a suggestion for how to split the work into commits if it covers more than one concern, then ask which findings to fix.

What it does

Most embarrassing review comments are things you would have spotted yourself with five minutes and fresh eyes: a leftover log line, a missing null check, a test that proves nothing. This command reads your working tree like a reviewer would.

It covers staged and unstaged changes plus new files, and sorts findings by how much they matter. It does not edit anything unless you ask.

Example

you › /review-changes

agent › Critical: src/payments/refund.ts:58 awaits nothing, so errors from the gateway are swallowed.
Should fix: new function applyCredit has no test; .env.local is untracked and not ignored.
Nit: console.log in Checkout.tsx:12.
Lint passes, 2 tests fail in refund.test.ts. Suggest two commits: refund fix, then credit feature. Fix the critical one?

Questions

Does it change my files?
No. It only reports. You choose which findings it should fix afterward.
Does it look at untracked files?
Yes, new files that contain code are read as well, since they are part of what you are about to commit.
  • Branch Cleanup

    CommandGit and releases

    Free
  • Changelog Entry

    CommandGit and releases

    Free
  • Cherry Pick Fix

    CommandGit and releases

    Free
  • Commit Message

    CommandGit and releases

    Free