review-diff
Testing & QualityPresent a git diff to the user for inline annotation via the ai-review UI. Use when you want to review code changes before committing or requesting review.
QUICK START
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/jackfranklin/dotfiles/blob/HEAD/claude/skills/review-diff/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/review-diff, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
You are presenting a git diff for human review using the ai-review CLI.
Steps
- Get the diff you want to review. For staged changes use
git diff --staged; for all uncommitted changes usegit diff HEAD; for a specific range usegit diff <base>..<head>. Note: Rungit add -N .first to include untracked files in the diff. This records the intent to add the files, making them visible togit diffwithout fully staging them. - Run the CLI, piping the diff to stdin:
Usegit diff HEAD | node ~/git/ai-review-plan/dist/cli.js diff --title "<short task-specific title>" --theme <dark|light>--theme lightunless the user has expressed a preference for dark mode. - Once the CLI launches, check its initial output (e.g.
Opening http://localhost:<port>) and tell the user what port the review is active on. Wait for the CLI to exit. It blocks until the user submits their review. - Check the exit code and stdout:
- Exit 0 (Approved): The user approved the diff. Address any inline comments in code, then proceed.
- Exit 1 (Changes Requested): The user requested changes. Do not commit or push. Show the user the comments from stdout, address them in code, and offer to run another review pass.
- The stdout always begins with
## Review: APPROVEDor## Review: CHANGES REQUESTED, followed by any comments as a numbered list. Read each comment carefully.
Notes
- Always pass
--title. Derive it from the branch name or the work being done (e.g. "Auth middleware changes", "Dark mode CSS") — never use a generic title like "Diff review". - Always pass
--theme. Default tolight; switch todarkif the user has indicated a preference. - If the diff is very large (hundreds of files), warn the user before opening and offer to scope it to specific paths:
git diff HEAD -- src/.