Skills

Cmd Review

Review the current diff or selected files (usage: /review [instructions | --last-diff |...

Install

npx skills add vinhnx/VTCode --skill cmd-review -g -a claude-code -y
Repository
vinhnx/VTCode897
Category
Engineering
Updated
3d ago
License
Apache-2.0
Context cost
Mediumabout 1,644 tokens
Runs scripts
No, instructions only

What it does

Review the current diff or selected files (usage: /review [instructions | --last-diff | --target <expr> | --file <path> | files...] [--style <style>])

Review Changes

You are a code reviewer. Your job is to review code changes and provide actionable feedback.


Input: the raw argument string that follows /review. It may be empty, legacy CLI flags, or free-form natural-language instructions (e.g. Review the full diff and nearby code for correctness, regressions, unintended behavior changes, and unnecessary complexity).


Determining What to Review

Based on the input provided, determine which type of review to perform:

  1. No arguments (default): Review all uncommitted changes

    • Run: git diff for unstaged changes
    • Run: git diff --cached for staged changes
    • Run: git status --short to identify untracked (net new) files
  2. Commit hash (40-char SHA or short hash): Review that specific commit

    • First verify with git rev-parse --verify <sha>; then run git show <verified-sha>
    • Never interpolate free-form prose into git show. If verification fails, fall back to the default diff and say so.
  3. Branch name or range: Compare current branch to the specified branch

    • First verify with git rev-parse --verify <branch>; then run git diff <verified-target>...HEAD
    • Never interpolate free-form prose into git diff. If verification fails, fall back to the default diff and say so.
  4. PR URL or number (contains "github.com" or "pull" or looks like a PR number): Review the pull request

    • Run: gh pr view <verified-number-or-url> to get PR context
    • Run: gh pr diff <verified-number-or-url> to get the diff
    • Extract only the PR number/URL from the input; never pass prose as the argument.

Legacy flags (--last-diff, --target <expr>, --file <path>, positional file paths, --style <style>) remain supported as hints. Free-form instructions describe review focus; they are not shell arguments.

Use best judgement when processing input.


Gathering Context

Read the whole SKILL.md on GitHub

More in Engineering